From 32daeec5af45918cab7db70c4b0acdd076172b2b Mon Sep 17 00:00:00 2001 From: kholland-intel Date: Mon, 31 Jan 2022 16:44:24 -0600 Subject: [PATCH 1/7] Added a SOS Dockerfile script and a README --- scripts/docker/Dockerfile | 109 ++++++++++++++++++++++++++++++++++++++ scripts/docker/README.md | 76 ++++++++++++++++++++++++++ 2 files changed, 185 insertions(+) create mode 100644 scripts/docker/Dockerfile create mode 100644 scripts/docker/README.md diff --git a/scripts/docker/Dockerfile b/scripts/docker/Dockerfile new file mode 100644 index 00000000..31f6d8bd --- /dev/null +++ b/scripts/docker/Dockerfile @@ -0,0 +1,109 @@ +FROM ubuntu:20.04 +#FROM intel/oneapi-basekit:devel-ubuntu18.04 + + +ENV DK_INSTALL=/usr/sos +ENV DEBIAN_FRONTEND=noninteractive + +RUN apt-get update -y +RUN apt-get install -y git +RUN apt-get install -y vim +RUN apt-get install -y build-essential +RUN apt-get install -y wget +RUN apt-get install -y automake # installs autoconf +RUN apt-get install -y libtool +RUN apt-get install -y flex +RUN apt-get install -y python +RUN apt-get install -y libhwloc-dev + +#Packages added on Travis +RUN apt-get install -y libev-libevent-dev +RUN apt-get install -y libev-dev +RUN apt-get install -y mpich + +# Build Libevent +WORKDIR $DK_INSTALL +RUN wget https://github.com/libevent/libevent/releases/download/release-2.1.10-stable/libevent-2.1.10-stable.tar.gz +RUN tar -xzvf libevent-2.1.10-stable.tar.gz +WORKDIR libevent-2.1.10-stable +RUN ./autogen.sh +RUN ./configure --prefix=$DK_INSTALL/libevent-2.1.10-stable/install +RUN make clean all install + +# Build PMIx +WORKDIR $DK_INSTALL +RUN git clone -b v4.1.1rc6 --depth 10 https://github.com/pmix/pmix pmix +WORKDIR pmix +RUN ./autogen.pl +RUN ./configure --prefix=$DK_INSTALL/pmix/install --with-libevent=$DK_INSTALL/libevent-2.1.10-stable/install --without-libev --disable-debug CFLAGS=-O3 --disable-shared --enable-static +RUN make +RUN make install + +# Build PRRTE +WORKDIR $DK_INSTALL +RUN git clone -b v2.0.0 --depth 10 https://github.com/pmix/prrte prrte +WORKDIR prrte +RUN ./autogen.pl +RUN ./configure --prefix=$DK_INSTALL/prrte/install --with-pmix=$DK_INSTALL/pmix/install --without-slurm --with-libevent=$DK_INSTALL/libevent-2.1.10-stable/install --without-libev --disable-shared --enable-static +RUN make +RUN make install + +# Build Libfabric +WORKDIR $DK_INSTALL +RUN git clone -b v1.7.x --depth 10 https://github.com/ofiwg/libfabric.git libfabric +WORKDIR libfabric +RUN ./autogen.sh +# To build basic Libfabric +RUN ./configure --prefix=$DK_INSTALL/libfabric/install +# If running with oneapi clang compilers: + #RUN ./configure --prefix=$DK_INSTALL/libfabric/install-oneapi CC=clang CXX=clang++ +# If running with GNI provider: + #RUN ./configure --prefix=$DK_INSTALL/libfabric/install-gni --enable-gni --disable-verbs --disable-sockets --disable-udp --disable-psm --disable-tcp +RUN make +RUN make install + +# Build Portals 4 +WORKDIR $DK_INSTALL +RUN git clone --depth 10 https://github.com/regrant/portals4.git portals4 +WORKDIR portals4 +RUN ./autogen.sh +RUN ./configure --prefix=$DK_INSTALL/portals4/install --enable-zero-mrs --enable-reliable-udp --disable-pmi-from-portals +RUN make +RUN make install + +# Build UCX +WORKDIR $DK_INSTALL +RUN git clone -b v1.9.0 --depth 10 https://github.com/openucx/ucx.git +WORKDIR ucx +RUN ./autogen.sh +RUN ./configure --prefix=$DK_INSTALL/ucx/install --enable-mt --disable-numa --without-java +RUN make +RUN make install + +# Build SOS +WORKDIR $DK_INSTALL +RUN git clone https://github.com/Sandia-OpenSHMEM/SOS.git +WORKDIR SOS +RUN ./autogen.sh +# To Build SOS w/ Basic Libfabric +RUN ./configure --prefix=$DK_INSTALL/SOS/install --with-ofi=$DK_INSTALL/libfabric/install --without-ucx --without-portals4 --enable-pmi-simple --disable-fortran +# To Build SOS w/ oneapi compilers + #RUN ./configure --prefix=$DK_INSTALL/SOS/install-oneapi --with-ofi=$DK_INSTALL/libfabric/install-oneapi --without-ucx --without-portals4 --enable-pmi-simple CC=clang CXX=clang++ --disable-fortran +# To Build SOS w/ GNI provider + #RUN ./configure --prefix=$DK_INSTALL/SOS/install-gni --with-ofi=$DK_INSTALL/libfabric/install-gni --without-ucx --without-portals4 --enable-pmi-simple --enable-ofi-mr=basic --enable-completion-polling --disable-fortran +# To Build SOS w/ Libfabric & PMIx + #RUN ./configure --prefix=$DK_INSTALL/SOS/install --with-ofi=$DK_INSTALL/libfabric/install --without-ucx --without-portals4 --with-pmix=$DK_INSTALL/pmix/install --disable-shared --enable-static +# To Build SOS w/ Portals 4 + #RUN ./configure --prefix=$DK_INSTALL/SOS/install-portals --with-ofi=$DK_INSTALL/portals4/install --without-ucx --without-ofi --enable-pmi-simple +# To Build SOS w/ UCX + #RUN ./configure --prefix=$DK_INSTALL/SOS/install-ucx --with-ucx=$DK_INSTALL/ucx/install --without-ofi --without-portals4 --enable-pmi-simple +RUN make +RUN make install +RUN make check TESTS= -j + +#Start PRRTE Server and Use prun to run tests +#RUN make check TESTS= -j +#ENV PATH=$DK_INSTALL/prrte/install/bin:$PATH +#RUN prte --daemonize --host localhost:4 --allow-run-as-root +#RUN SHMEM_INFO=1 make VERBOSE=1 TEST_RUNNER="prun -np 2" check +#RUN pterm diff --git a/scripts/docker/README.md b/scripts/docker/README.md new file mode 100644 index 00000000..1331702f --- /dev/null +++ b/scripts/docker/README.md @@ -0,0 +1,76 @@ +# Sandia-OpenSHMEM Docker Image +Sandia-OpenSHMEM (SOS) utlizes Docker images to provide users a means to create +containers that provide a configurable Ubuntu sandbox for running Sadia +OpenSHMEM (SOS) applications and benchmarks. + +## Creating SOS Containers from the Prebuilt Docker Images +Coming Soon: Information regarding the SOS public dockerhub repos and prebuilt +images. + +## Creating SOS Containers from the Dockerfile +This Dockerfile provides a configurable Ubuntu sandbox for running Sadia +OpenSHMEM (SOS) applications and benchmarks. + +### Building the Image from the Dockerfile +To build the image from the Dockerfile, run the following run the following +command in the directory that contains the Dockerfile: + +``` +$ docker build -t . +``` + +Where `` represents the name being used to label the image. +The "docker build" command will use the Dockerfile to build the docker image +from which containers can be created. +To create an interactive container from the image run the following command: + +``` +$ docker run -it +``` + +Where the `-it` option makes the container interactive and allows the user to +actually step into the container and execute commands in the new environment. + +### Dockerfile Options +Throughout the Dockerfile there are lines that can be commented/uncommented to +configure a particular testing environment and SOS build. + +#### Ubuntu Image +The first option this file provides is the the type of Ubuntu image docker +should pull from. + +By default the Dockerfile pulls a lightweight Ubuntu 20.04 image. +The other option (which is commnented out) is for OneAPI image which uses +Ubunutu 18.04. The idea for this image was to allow users to test/run SOS +applications with non gcc compilers. + +#### Building Libafabic +The next set of options are presented when it comes time to build Libfabric. + +By default, a basic libfabric configuration is built and installed to an +"install" directory. +The next option is to build Libfabric with the non-gcc compilers, in this +case, using clang and clang++. +Another option is to enable the GNI provider while building Libfabric. + +#### Building SOS +Another set of options are presented when Building SOS. + +By default, SOS is built with a basic Libfabric provider. +The next few options are: +* Build SOS with oneapi compilers (i.e. clang and clang++) +* Build SOS with the GNI provider +* Build SOS with the Libfabric provider and PMIx +* Build SOS with Portals 4 +* Build SOS with UCX + +As a reminder which ever configuration option is chosen must be uncommented, +while the other options must be commented. + +#### Enabling the PRRTE Server +The last portion of code that is optional in this Dockerfile is that which +enables the PRRTE Server. +This is mostly used to run SOS tests when the GNI provider has been enabled in +the Libfabric build. +When testing on the GNI provider uncomment out the lines in this portion to +build a container which runs "make check" on the PRRTE Server. From 4bf133fd47feadd3b494c16c1931a5ffeb8f7ab5 Mon Sep 17 00:00:00 2001 From: kholland-intel Date: Thu, 10 Feb 2022 15:08:43 -0600 Subject: [PATCH 2/7] Addressed PR comments Fixed README typos, updated working directory to "/home/sos", etc. --- scripts/docker/Dockerfile | 79 ++++++++++++++++++++------------------- scripts/docker/README.md | 10 ++--- 2 files changed, 45 insertions(+), 44 deletions(-) diff --git a/scripts/docker/Dockerfile b/scripts/docker/Dockerfile index 31f6d8bd..ae116043 100644 --- a/scripts/docker/Dockerfile +++ b/scripts/docker/Dockerfile @@ -1,109 +1,110 @@ FROM ubuntu:20.04 #FROM intel/oneapi-basekit:devel-ubuntu18.04 - -ENV DK_INSTALL=/usr/sos +ENV SOS_INSTALL=/home/sos +RUN mkdir /home/sos ENV DEBIAN_FRONTEND=noninteractive +ENV CC=gcc +ENV CXX=g++ +# For OneAPI Compilers use clang and clang++ + #ENV CC=clang + #ENV CXX=clang++ -RUN apt-get update -y -RUN apt-get install -y git -RUN apt-get install -y vim -RUN apt-get install -y build-essential -RUN apt-get install -y wget -RUN apt-get install -y automake # installs autoconf -RUN apt-get install -y libtool -RUN apt-get install -y flex -RUN apt-get install -y python -RUN apt-get install -y libhwloc-dev +RUN apt-get update -y && apt-get install -y \ + git \ + vim \ + build-essential \ + wget \ + automake \ + libtool \ + flex \ + python \ + libhwloc-dev #Packages added on Travis -RUN apt-get install -y libev-libevent-dev -RUN apt-get install -y libev-dev -RUN apt-get install -y mpich +RUN apt-get install -y libev-libevent-dev \ + libev-dev \ + mpich # Build Libevent -WORKDIR $DK_INSTALL +WORKDIR $SOS_INSTALL RUN wget https://github.com/libevent/libevent/releases/download/release-2.1.10-stable/libevent-2.1.10-stable.tar.gz RUN tar -xzvf libevent-2.1.10-stable.tar.gz WORKDIR libevent-2.1.10-stable RUN ./autogen.sh -RUN ./configure --prefix=$DK_INSTALL/libevent-2.1.10-stable/install +RUN ./configure --prefix=$SOS_INSTALL/libevent-2.1.10-stable/install RUN make clean all install # Build PMIx -WORKDIR $DK_INSTALL +WORKDIR $SOS_INSTALL RUN git clone -b v4.1.1rc6 --depth 10 https://github.com/pmix/pmix pmix WORKDIR pmix RUN ./autogen.pl -RUN ./configure --prefix=$DK_INSTALL/pmix/install --with-libevent=$DK_INSTALL/libevent-2.1.10-stable/install --without-libev --disable-debug CFLAGS=-O3 --disable-shared --enable-static +RUN ./configure --prefix=$SOS_INSTALL/pmix/install --with-libevent=$SOS_INSTALL/libevent-2.1.10-stable/install --without-libev --disable-debug CFLAGS=-O3 --disable-shared --enable-static RUN make RUN make install # Build PRRTE -WORKDIR $DK_INSTALL +WORKDIR $SOS_INSTALL RUN git clone -b v2.0.0 --depth 10 https://github.com/pmix/prrte prrte WORKDIR prrte RUN ./autogen.pl -RUN ./configure --prefix=$DK_INSTALL/prrte/install --with-pmix=$DK_INSTALL/pmix/install --without-slurm --with-libevent=$DK_INSTALL/libevent-2.1.10-stable/install --without-libev --disable-shared --enable-static +RUN ./configure --prefix=$SOS_INSTALL/prrte/install --with-pmix=$SOS_INSTALL/pmix/install --without-slurm --with-libevent=$SOS_INSTALL/libevent-2.1.10-stable/install --without-libev --disable-shared --enable-static RUN make RUN make install # Build Libfabric -WORKDIR $DK_INSTALL +WORKDIR $SOS_INSTALL RUN git clone -b v1.7.x --depth 10 https://github.com/ofiwg/libfabric.git libfabric WORKDIR libfabric RUN ./autogen.sh # To build basic Libfabric -RUN ./configure --prefix=$DK_INSTALL/libfabric/install -# If running with oneapi clang compilers: - #RUN ./configure --prefix=$DK_INSTALL/libfabric/install-oneapi CC=clang CXX=clang++ +RUN ./configure --prefix=$SOS_INSTALL/libfabric/install # If running with GNI provider: - #RUN ./configure --prefix=$DK_INSTALL/libfabric/install-gni --enable-gni --disable-verbs --disable-sockets --disable-udp --disable-psm --disable-tcp + #RUN ./configure --prefix=$SOS_INSTALL/libfabric/install-gni --enable-gni --disable-verbs --disable-sockets --disable-udp --disable-psm --disable-tcp RUN make RUN make install # Build Portals 4 -WORKDIR $DK_INSTALL +WORKDIR $SOS_INSTALL RUN git clone --depth 10 https://github.com/regrant/portals4.git portals4 WORKDIR portals4 RUN ./autogen.sh -RUN ./configure --prefix=$DK_INSTALL/portals4/install --enable-zero-mrs --enable-reliable-udp --disable-pmi-from-portals +RUN ./configure --prefix=$SOS_INSTALL/portals4/install --enable-zero-mrs --enable-reliable-udp --disable-pmi-from-portals RUN make RUN make install # Build UCX -WORKDIR $DK_INSTALL +WORKDIR $SOS_INSTALL RUN git clone -b v1.9.0 --depth 10 https://github.com/openucx/ucx.git WORKDIR ucx RUN ./autogen.sh -RUN ./configure --prefix=$DK_INSTALL/ucx/install --enable-mt --disable-numa --without-java +RUN ./configure --prefix=$SOS_INSTALL/ucx/install --enable-mt --disable-numa --without-java RUN make RUN make install # Build SOS -WORKDIR $DK_INSTALL +WORKDIR $SOS_INSTALL RUN git clone https://github.com/Sandia-OpenSHMEM/SOS.git WORKDIR SOS RUN ./autogen.sh # To Build SOS w/ Basic Libfabric -RUN ./configure --prefix=$DK_INSTALL/SOS/install --with-ofi=$DK_INSTALL/libfabric/install --without-ucx --without-portals4 --enable-pmi-simple --disable-fortran -# To Build SOS w/ oneapi compilers - #RUN ./configure --prefix=$DK_INSTALL/SOS/install-oneapi --with-ofi=$DK_INSTALL/libfabric/install-oneapi --without-ucx --without-portals4 --enable-pmi-simple CC=clang CXX=clang++ --disable-fortran +RUN ./configure --prefix=$SOS_INSTALL/SOS/install --with-ofi=$SOS_INSTALL/libfabric/install --without-ucx --without-portals4 --enable-pmi-simple --disable-fortran # To Build SOS w/ GNI provider - #RUN ./configure --prefix=$DK_INSTALL/SOS/install-gni --with-ofi=$DK_INSTALL/libfabric/install-gni --without-ucx --without-portals4 --enable-pmi-simple --enable-ofi-mr=basic --enable-completion-polling --disable-fortran + #RUN ./configure --prefix=$SOS_INSTALL/SOS/install-gni --with-ofi=$SOS_INSTALL/libfabric/install-gni --without-ucx --without-portals4 --enable-pmi-simple --enable-ofi-mr=basic --enable-completion-polling --disable-fortran # To Build SOS w/ Libfabric & PMIx - #RUN ./configure --prefix=$DK_INSTALL/SOS/install --with-ofi=$DK_INSTALL/libfabric/install --without-ucx --without-portals4 --with-pmix=$DK_INSTALL/pmix/install --disable-shared --enable-static + #RUN ./configure --prefix=$SOS_INSTALL/SOS/install --with-ofi=$SOS_INSTALL/libfabric/install --without-ucx --without-portals4 --with-pmix=$SOS_INSTALL/pmix/install --disable-shared --enable-static # To Build SOS w/ Portals 4 - #RUN ./configure --prefix=$DK_INSTALL/SOS/install-portals --with-ofi=$DK_INSTALL/portals4/install --without-ucx --without-ofi --enable-pmi-simple + #RUN ./configure --prefix=$SOS_INSTALL/SOS/install-portals --with-ofi=$SOS_INSTALL/portals4/install --without-ucx --without-ofi --enable-pmi-simple # To Build SOS w/ UCX - #RUN ./configure --prefix=$DK_INSTALL/SOS/install-ucx --with-ucx=$DK_INSTALL/ucx/install --without-ofi --without-portals4 --enable-pmi-simple + #RUN ./configure --prefix=$SOS_INSTALL/SOS/install-ucx --with-ucx=$SOS_INSTALL/ucx/install --without-ofi --without-portals4 --enable-pmi-simple RUN make RUN make install RUN make check TESTS= -j #Start PRRTE Server and Use prun to run tests #RUN make check TESTS= -j -#ENV PATH=$DK_INSTALL/prrte/install/bin:$PATH +#ENV PATH=$SOS_INSTALL/prrte/install/bin:$PATH #RUN prte --daemonize --host localhost:4 --allow-run-as-root #RUN SHMEM_INFO=1 make VERBOSE=1 TEST_RUNNER="prun -np 2" check #RUN pterm diff --git a/scripts/docker/README.md b/scripts/docker/README.md index 1331702f..f6e59990 100644 --- a/scripts/docker/README.md +++ b/scripts/docker/README.md @@ -1,15 +1,15 @@ # Sandia-OpenSHMEM Docker Image Sandia-OpenSHMEM (SOS) utlizes Docker images to provide users a means to create -containers that provide a configurable Ubuntu sandbox for running Sadia -OpenSHMEM (SOS) applications and benchmarks. +containers that provide a configurable Ubuntu sandbox for running SOS +applications and benchmarks. ## Creating SOS Containers from the Prebuilt Docker Images -Coming Soon: Information regarding the SOS public dockerhub repos and prebuilt +Coming Soon: Information regarding the SOS public Docker Hub repos and prebuilt images. ## Creating SOS Containers from the Dockerfile -This Dockerfile provides a configurable Ubuntu sandbox for running Sadia -OpenSHMEM (SOS) applications and benchmarks. +This Dockerfile provides a configurable Ubuntu sandbox for running SOS +applications and benchmarks. ### Building the Image from the Dockerfile To build the image from the Dockerfile, run the following run the following From 70759dcce64caa0d0fd4aabdb074f6f7916fb379 Mon Sep 17 00:00:00 2001 From: kholland-intel Date: Thu, 10 Feb 2022 16:26:57 -0600 Subject: [PATCH 3/7] Added steps in the Dockerfile to build Hydra --- scripts/docker/Dockerfile | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/scripts/docker/Dockerfile b/scripts/docker/Dockerfile index ae116043..f0ffe1fb 100644 --- a/scripts/docker/Dockerfile +++ b/scripts/docker/Dockerfile @@ -28,13 +28,22 @@ RUN apt-get install -y libev-libevent-dev \ # Build Libevent WORKDIR $SOS_INSTALL -RUN wget https://github.com/libevent/libevent/releases/download/release-2.1.10-stable/libevent-2.1.10-stable.tar.gz +RUN wget -c https://github.com/libevent/libevent/releases/download/release-2.1.10-stable/libevent-2.1.10-stable.tar.gz RUN tar -xzvf libevent-2.1.10-stable.tar.gz WORKDIR libevent-2.1.10-stable RUN ./autogen.sh RUN ./configure --prefix=$SOS_INSTALL/libevent-2.1.10-stable/install RUN make clean all install +# Build Hydra +WORKDIR $SOS_INSTALL +RUN wget -c https://www.mpich.org/static/downloads/4.0/hydra-4.0.tar.gz +RUN tar -xzvf hydra-4.0.tar.gz +WORKDIR hydra-4.0 +RUN ./autogen.sh +RUN ./configure --prefix=$SOS_INSTALL/hydra-4.0/install +RUN make all install + # Build PMIx WORKDIR $SOS_INSTALL RUN git clone -b v4.1.1rc6 --depth 10 https://github.com/pmix/pmix pmix From 4ebf5b512ed422445dc9b3f2b488906c030433c8 Mon Sep 17 00:00:00 2001 From: kholland-intel Date: Thu, 3 Mar 2022 18:16:45 -0600 Subject: [PATCH 4/7] Fixed OneAPI/clang issue Added OneAPI binaries to the Dockerfile builder's path for OneAPI compilers --- scripts/docker/Dockerfile | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/scripts/docker/Dockerfile b/scripts/docker/Dockerfile index f0ffe1fb..744f05ae 100644 --- a/scripts/docker/Dockerfile +++ b/scripts/docker/Dockerfile @@ -1,12 +1,15 @@ FROM ubuntu:20.04 + +#For OneAPI compilers, the compilers must be added to the builders path #FROM intel/oneapi-basekit:devel-ubuntu18.04 +#ENV PATH=/opt/intel/oneapi/compiler/latest/linux/bin:$PATH ENV SOS_INSTALL=/home/sos RUN mkdir /home/sos ENV DEBIAN_FRONTEND=noninteractive ENV CC=gcc ENV CXX=g++ -# For OneAPI Compilers use clang and clang++ +# For OneAPI compilers use clang and clang++ #ENV CC=clang #ENV CXX=clang++ From a722f1f1423d1bbed6f79b90f871e79cd03269ed Mon Sep 17 00:00:00 2001 From: kholland-intel Date: Thu, 10 Mar 2022 10:32:45 -0600 Subject: [PATCH 5/7] Small edit changes in comments and README --- scripts/docker/Dockerfile | 14 +++++++------- scripts/docker/README.md | 31 +++++++++++++++---------------- 2 files changed, 22 insertions(+), 23 deletions(-) diff --git a/scripts/docker/Dockerfile b/scripts/docker/Dockerfile index 744f05ae..4762d4e3 100644 --- a/scripts/docker/Dockerfile +++ b/scripts/docker/Dockerfile @@ -72,7 +72,7 @@ WORKDIR libfabric RUN ./autogen.sh # To build basic Libfabric RUN ./configure --prefix=$SOS_INSTALL/libfabric/install -# If running with GNI provider: +# To build Libfabric to use GNI provider: #RUN ./configure --prefix=$SOS_INSTALL/libfabric/install-gni --enable-gni --disable-verbs --disable-sockets --disable-udp --disable-psm --disable-tcp RUN make RUN make install @@ -100,21 +100,21 @@ WORKDIR $SOS_INSTALL RUN git clone https://github.com/Sandia-OpenSHMEM/SOS.git WORKDIR SOS RUN ./autogen.sh -# To Build SOS w/ Basic Libfabric +# To build SOS w/ basic Libfabric RUN ./configure --prefix=$SOS_INSTALL/SOS/install --with-ofi=$SOS_INSTALL/libfabric/install --without-ucx --without-portals4 --enable-pmi-simple --disable-fortran -# To Build SOS w/ GNI provider +# To build SOS to use GNI provider #RUN ./configure --prefix=$SOS_INSTALL/SOS/install-gni --with-ofi=$SOS_INSTALL/libfabric/install-gni --without-ucx --without-portals4 --enable-pmi-simple --enable-ofi-mr=basic --enable-completion-polling --disable-fortran -# To Build SOS w/ Libfabric & PMIx +# To build SOS w/ Libfabric & PMIx #RUN ./configure --prefix=$SOS_INSTALL/SOS/install --with-ofi=$SOS_INSTALL/libfabric/install --without-ucx --without-portals4 --with-pmix=$SOS_INSTALL/pmix/install --disable-shared --enable-static -# To Build SOS w/ Portals 4 +# To build SOS w/ Portals 4 #RUN ./configure --prefix=$SOS_INSTALL/SOS/install-portals --with-ofi=$SOS_INSTALL/portals4/install --without-ucx --without-ofi --enable-pmi-simple -# To Build SOS w/ UCX +# To build SOS w/ UCX #RUN ./configure --prefix=$SOS_INSTALL/SOS/install-ucx --with-ucx=$SOS_INSTALL/ucx/install --without-ofi --without-portals4 --enable-pmi-simple RUN make RUN make install RUN make check TESTS= -j -#Start PRRTE Server and Use prun to run tests +#Start PRRTE Server and use prun to run tests #RUN make check TESTS= -j #ENV PATH=$SOS_INSTALL/prrte/install/bin:$PATH #RUN prte --daemonize --host localhost:4 --allow-run-as-root diff --git a/scripts/docker/README.md b/scripts/docker/README.md index f6e59990..5f4b5da4 100644 --- a/scripts/docker/README.md +++ b/scripts/docker/README.md @@ -1,5 +1,5 @@ -# Sandia-OpenSHMEM Docker Image -Sandia-OpenSHMEM (SOS) utlizes Docker images to provide users a means to create +# Sandia OpenSHMEM Docker Image +Sandia OpenSHMEM (SOS) utlizes Docker images to provide users a means to create containers that provide a configurable Ubuntu sandbox for running SOS applications and benchmarks. @@ -12,8 +12,8 @@ This Dockerfile provides a configurable Ubuntu sandbox for running SOS applications and benchmarks. ### Building the Image from the Dockerfile -To build the image from the Dockerfile, run the following run the following -command in the directory that contains the Dockerfile: +To build the image from the Dockerfile, run the following command in the +directory that contains the Dockerfile: ``` $ docker build -t . @@ -36,41 +36,40 @@ Throughout the Dockerfile there are lines that can be commented/uncommented to configure a particular testing environment and SOS build. #### Ubuntu Image -The first option this file provides is the the type of Ubuntu image docker +The first option this file provides is the type of Ubuntu image docker should pull from. By default the Dockerfile pulls a lightweight Ubuntu 20.04 image. The other option (which is commnented out) is for OneAPI image which uses Ubunutu 18.04. The idea for this image was to allow users to test/run SOS -applications with non gcc compilers. +applications with non-gcc compilers. #### Building Libafabic The next set of options are presented when it comes time to build Libfabric. -By default, a basic libfabric configuration is built and installed to an -"install" directory. -The next option is to build Libfabric with the non-gcc compilers, in this -case, using clang and clang++. -Another option is to enable the GNI provider while building Libfabric. +By default, a basic Libfabric configuration is built and installed to an +"install" directory (This option is currently uncommented). +The other option is to enable the GNI provider while building Libfabric. (For +this option uncomment the line of code "To build Libfabric to use GNI provider") #### Building SOS Another set of options are presented when Building SOS. By default, SOS is built with a basic Libfabric provider. The next few options are: -* Build SOS with oneapi compilers (i.e. clang and clang++) * Build SOS with the GNI provider * Build SOS with the Libfabric provider and PMIx * Build SOS with Portals 4 * Build SOS with UCX -As a reminder which ever configuration option is chosen must be uncommented, -while the other options must be commented. +As a reminder, the chosen SOS configuration option must be uncommented, while +the other options must be commented out. #### Enabling the PRRTE Server The last portion of code that is optional in this Dockerfile is that which enables the PRRTE Server. This is mostly used to run SOS tests when the GNI provider has been enabled in the Libfabric build. -When testing on the GNI provider uncomment out the lines in this portion to -build a container which runs "make check" on the PRRTE Server. +When testing on the GNI provider uncomment out the lines under "Start PRRTE +Server and use prun to run tests" to build a container which runs "make check" +on the PRRTE Server. From 31d97c1df862d0cf56015ca4a4dd40088498fcd3 Mon Sep 17 00:00:00 2001 From: kholland-intel Date: Fri, 18 Mar 2022 12:56:48 -0500 Subject: [PATCH 6/7] Added a README note regarding UCX errors with icx --- scripts/docker/Dockerfile | 18 +++++++++--------- scripts/docker/README.md | 5 +++++ 2 files changed, 14 insertions(+), 9 deletions(-) diff --git a/scripts/docker/Dockerfile b/scripts/docker/Dockerfile index 4762d4e3..ee69fb30 100644 --- a/scripts/docker/Dockerfile +++ b/scripts/docker/Dockerfile @@ -10,8 +10,8 @@ ENV DEBIAN_FRONTEND=noninteractive ENV CC=gcc ENV CXX=g++ # For OneAPI compilers use clang and clang++ - #ENV CC=clang - #ENV CXX=clang++ +# ENV CC=icx +# ENV CXX=icpx RUN apt-get update -y && apt-get install -y \ git \ @@ -87,13 +87,13 @@ RUN make RUN make install # Build UCX -WORKDIR $SOS_INSTALL -RUN git clone -b v1.9.0 --depth 10 https://github.com/openucx/ucx.git -WORKDIR ucx -RUN ./autogen.sh -RUN ./configure --prefix=$SOS_INSTALL/ucx/install --enable-mt --disable-numa --without-java -RUN make -RUN make install +#WORKDIR $SOS_INSTALL +#RUN git clone -b v1.9.0 --depth 10 https://github.com/openucx/ucx.git +#WORKDIR ucx +#RUN ./autogen.sh +#RUN ./configure --prefix=$SOS_INSTALL/ucx/install --enable-mt --disable-numa --without-java +#RUN make +#RUN make install # Build SOS WORKDIR $SOS_INSTALL diff --git a/scripts/docker/README.md b/scripts/docker/README.md index 5f4b5da4..4d1fd313 100644 --- a/scripts/docker/README.md +++ b/scripts/docker/README.md @@ -44,6 +44,11 @@ The other option (which is commnented out) is for OneAPI image which uses Ubunutu 18.04. The idea for this image was to allow users to test/run SOS applications with non-gcc compilers. +Note: Currenlty, building the UCX libraries with the `icx` compiler leads to a +build error. When starting from the OneAPI image and using the `icx` compiler, +the Dockerfile lines which build UCX (the lines directly under "Build UCX") must +be commented out. + #### Building Libafabic The next set of options are presented when it comes time to build Libfabric. From 8d3208890ae718f1064e827fa103a848eb1c84af Mon Sep 17 00:00:00 2001 From: kholland-intel Date: Tue, 22 Mar 2022 15:03:51 -0500 Subject: [PATCH 7/7] Updated Dockerfile to build libs with make -j Also, address grammatical errors in the README --- scripts/docker/Dockerfile | 14 +++++++------- scripts/docker/README.md | 12 ++++++------ 2 files changed, 13 insertions(+), 13 deletions(-) diff --git a/scripts/docker/Dockerfile b/scripts/docker/Dockerfile index ee69fb30..1e7e47a7 100644 --- a/scripts/docker/Dockerfile +++ b/scripts/docker/Dockerfile @@ -53,7 +53,7 @@ RUN git clone -b v4.1.1rc6 --depth 10 https://github.com/pmix/pmix pmix WORKDIR pmix RUN ./autogen.pl RUN ./configure --prefix=$SOS_INSTALL/pmix/install --with-libevent=$SOS_INSTALL/libevent-2.1.10-stable/install --without-libev --disable-debug CFLAGS=-O3 --disable-shared --enable-static -RUN make +RUN make -j RUN make install # Build PRRTE @@ -62,7 +62,7 @@ RUN git clone -b v2.0.0 --depth 10 https://github.com/pmix/prrte prrte WORKDIR prrte RUN ./autogen.pl RUN ./configure --prefix=$SOS_INSTALL/prrte/install --with-pmix=$SOS_INSTALL/pmix/install --without-slurm --with-libevent=$SOS_INSTALL/libevent-2.1.10-stable/install --without-libev --disable-shared --enable-static -RUN make +RUN make -j RUN make install # Build Libfabric @@ -74,7 +74,7 @@ RUN ./autogen.sh RUN ./configure --prefix=$SOS_INSTALL/libfabric/install # To build Libfabric to use GNI provider: #RUN ./configure --prefix=$SOS_INSTALL/libfabric/install-gni --enable-gni --disable-verbs --disable-sockets --disable-udp --disable-psm --disable-tcp -RUN make +RUN make -j RUN make install # Build Portals 4 @@ -83,7 +83,7 @@ RUN git clone --depth 10 https://github.com/regrant/portals4.git portals4 WORKDIR portals4 RUN ./autogen.sh RUN ./configure --prefix=$SOS_INSTALL/portals4/install --enable-zero-mrs --enable-reliable-udp --disable-pmi-from-portals -RUN make +RUN make -j RUN make install # Build UCX @@ -92,7 +92,7 @@ RUN make install #WORKDIR ucx #RUN ./autogen.sh #RUN ./configure --prefix=$SOS_INSTALL/ucx/install --enable-mt --disable-numa --without-java -#RUN make +#RUN make -j #RUN make install # Build SOS @@ -110,11 +110,11 @@ RUN ./configure --prefix=$SOS_INSTALL/SOS/install --with-ofi=$SOS_INSTALL/libfab #RUN ./configure --prefix=$SOS_INSTALL/SOS/install-portals --with-ofi=$SOS_INSTALL/portals4/install --without-ucx --without-ofi --enable-pmi-simple # To build SOS w/ UCX #RUN ./configure --prefix=$SOS_INSTALL/SOS/install-ucx --with-ucx=$SOS_INSTALL/ucx/install --without-ofi --without-portals4 --enable-pmi-simple -RUN make +RUN make -j RUN make install RUN make check TESTS= -j -#Start PRRTE Server and use prun to run tests +#Start PRRTE server and use prun to run tests #RUN make check TESTS= -j #ENV PATH=$SOS_INSTALL/prrte/install/bin:$PATH #RUN prte --daemonize --host localhost:4 --allow-run-as-root diff --git a/scripts/docker/README.md b/scripts/docker/README.md index 4d1fd313..46251d9c 100644 --- a/scripts/docker/README.md +++ b/scripts/docker/README.md @@ -44,18 +44,18 @@ The other option (which is commnented out) is for OneAPI image which uses Ubunutu 18.04. The idea for this image was to allow users to test/run SOS applications with non-gcc compilers. -Note: Currenlty, building the UCX libraries with the `icx` compiler leads to a +Note: Currently, building the UCX libraries with the `icx` compiler leads to a build error. When starting from the OneAPI image and using the `icx` compiler, the Dockerfile lines which build UCX (the lines directly under "Build UCX") must be commented out. -#### Building Libafabic +#### Building Libfabric The next set of options are presented when it comes time to build Libfabric. By default, a basic Libfabric configuration is built and installed to an "install" directory (This option is currently uncommented). The other option is to enable the GNI provider while building Libfabric. (For -this option uncomment the line of code "To build Libfabric to use GNI provider") +this option uncomment the line of code under "To build Libfabric to use GNI provider") #### Building SOS Another set of options are presented when Building SOS. @@ -75,6 +75,6 @@ The last portion of code that is optional in this Dockerfile is that which enables the PRRTE Server. This is mostly used to run SOS tests when the GNI provider has been enabled in the Libfabric build. -When testing on the GNI provider uncomment out the lines under "Start PRRTE -Server and use prun to run tests" to build a container which runs "make check" -on the PRRTE Server. +When testing on the GNI provider uncomment the lines under "Start PRRTE server +and use prun to run tests" to build a container which runs "make check" on the +PRRTE server.