From 7f2b5e8854a602c2668e63e148a72ffbaa54806a Mon Sep 17 00:00:00 2001 From: vsoch Date: Mon, 27 Nov 2023 21:48:15 -0700 Subject: [PATCH 1/3] wip to add exaMPM missing Cababa_Grid.hpp Signed-off-by: vsoch --- exaMPM/Dockerfile | 87 +++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 87 insertions(+) create mode 100644 exaMPM/Dockerfile diff --git a/exaMPM/Dockerfile b/exaMPM/Dockerfile new file mode 100644 index 0000000..5673b03 --- /dev/null +++ b/exaMPM/Dockerfile @@ -0,0 +1,87 @@ +ARG tag=latest +FROM ubuntu:${tag} + +# see run details: https://github.com/ECP-copa/ExaMPM/wiki/Run + +ENV DEBIAN_FRONTEND=noninteractive +RUN apt-get update && \ + apt-get -qq install -y --no-install-recommends \ + openssh-client openssh-server \ + locales \ + ca-certificates \ + curl \ + wget \ + libhdf5-serial-dev \ + apt-utils \ + cmake \ + clang \ + clang-format \ + doxygen \ + mpich \ + libmpich-dev \ + git \ + jq \ + build-essential \ + python3-pip \ + libgtest-dev && \ + rm -rf /var/lib/apt/lists/* + +ENV KOKKOS_SRC_DIR=/opt/kokkos +ENV KOKKOS_INSTALL_DIR=$KOKKOS_SRC_DIR/build/install +ENV MAKE_CXX_FLAG="MPICXX=mpic++" + +RUN python3 -m pip install clang-format +RUN git clone https://github.com/kokkos/kokkos.git /opt/kokkos && \ + cd /opt/kokkos && \ + git checkout 3.4.01 && \ + mkdir build && cd build && \ + cmake -D CMAKE_BUILD_TYPE="Release" \ + -D CMAKE_INSTALL_PREFIX=$KOKKOS_INSTALL_DIR \ + -D Kokkos_ENABLE_OPENMP=ON \ + -D Kokkos_ENABLE_SERIAL=ON .. && \ + make install + +ENV CABANA_INSTALL_DIR=/opt/Cabana/build/install +RUN git clone https://github.com/ECP-copa/Cabana.git /opt/Cabana && \ + cd /opt/Cabana && \ + git checkout 0.4.0 && \ + mkdir build && cd build && \ + cmake \ + -D CMAKE_BUILD_TYPE="Release" \ + -D CMAKE_PREFIX_PATH=$KOKKOS_INSTALL_DIR \ + -D CMAKE_INSTALL_PREFIX="$CABANA_INSTALL_DIR" \ + -D Cabana_REQUIRE_OPENMP=ON \ + -D Cabana_ENABLE_EXAMPLES=ON \ + -D Cabana_ENABLE_TESTING=ON \ + -D Cabana_REQUIRE_HDF5=ON \ + -D Cabana_ENABLE_PERFORMANCE_TESTING=OFF \ + -D Cabana_ENABLE_CAJITA=ON .. && \ + make install + +# Basic Examples are here +# /opt/Cabana/build/example +RUN git clone https://github.com/ECP-copa/CabanaPIC /opt/cabanaPIC && \ + cd /opt/cabanaPIC && \ + mkdir build && cd build && \ + cmake -DCMAKE_PREFIX_PATH=$CABANA_INSTALL_DIR .. && \ + make && make install + +# executable is cbnpic (uses kokkos) +# /opt/cabanaPIC/build + +# Install exaMPM +RUN git clone https://github.com/ECP-copa/ExaMPM /opt/exaMPM && \ + cd /opt/exaMPM && \ + mkdir build && \ + cd build && \ + cmake -D CMAKE_BUILD_TYPE="Release" -D CMAKE_PREFIX_PATH=$CABANA_INSTALL_DIR -D CMAKE_INSTALL_PREFIX=install .. && \ + make install + +# Hack for ssh for now... +RUN echo " LogLevel ERROR" >> /etc/ssh/ssh_config && \ + echo " StrictHostKeyChecking no" >> /etc/ssh/ssh_config && \ + echo " UserKnownHostsFile=/dev/null" >> /etc/ssh/ssh_config && \ + cd /root && \ + mkdir -p /run/sshd && \ + ssh-keygen -t rsa -N "" -f /root/.ssh/id_rsa && chmod og+rX . && \ + cd .ssh && cat id_rsa.pub > authorized_keys && chmod 644 authorized_keys From 7aa4ab3cf4b09de449e0217e9a0db04ea0bffec4 Mon Sep 17 00:00:00 2001 From: vsoch Date: Tue, 28 Nov 2023 10:37:04 -0700 Subject: [PATCH 2/3] add exampm final build Signed-off-by: vsoch --- exaMPM/Dockerfile | 25 ++++++++++--------------- 1 file changed, 10 insertions(+), 15 deletions(-) diff --git a/exaMPM/Dockerfile b/exaMPM/Dockerfile index 5673b03..6f8e5da 100644 --- a/exaMPM/Dockerfile +++ b/exaMPM/Dockerfile @@ -12,6 +12,7 @@ RUN apt-get update && \ curl \ wget \ libhdf5-serial-dev \ + libhdf5-mpi-dev \ apt-utils \ cmake \ clang \ @@ -23,6 +24,7 @@ RUN apt-get update && \ jq \ build-essential \ python3-pip \ + unzip \ libgtest-dev && \ rm -rf /var/lib/apt/lists/* @@ -33,7 +35,6 @@ ENV MAKE_CXX_FLAG="MPICXX=mpic++" RUN python3 -m pip install clang-format RUN git clone https://github.com/kokkos/kokkos.git /opt/kokkos && \ cd /opt/kokkos && \ - git checkout 3.4.01 && \ mkdir build && cd build && \ cmake -D CMAKE_BUILD_TYPE="Release" \ -D CMAKE_INSTALL_PREFIX=$KOKKOS_INSTALL_DIR \ @@ -42,9 +43,10 @@ RUN git clone https://github.com/kokkos/kokkos.git /opt/kokkos && \ make install ENV CABANA_INSTALL_DIR=/opt/Cabana/build/install -RUN git clone https://github.com/ECP-copa/Cabana.git /opt/Cabana && \ +RUN wget https://github.com/ECP-copa/Cabana/archive/refs/tags/0.6.1.zip && \ + unzip 0.6.1.zip && \ + mv Cabana-0.6.1/ /opt/Cabana && \ cd /opt/Cabana && \ - git checkout 0.4.0 && \ mkdir build && cd build && \ cmake \ -D CMAKE_BUILD_TYPE="Release" \ @@ -58,25 +60,18 @@ RUN git clone https://github.com/ECP-copa/Cabana.git /opt/Cabana && \ -D Cabana_ENABLE_CAJITA=ON .. && \ make install -# Basic Examples are here -# /opt/Cabana/build/example -RUN git clone https://github.com/ECP-copa/CabanaPIC /opt/cabanaPIC && \ - cd /opt/cabanaPIC && \ - mkdir build && cd build && \ - cmake -DCMAKE_PREFIX_PATH=$CABANA_INSTALL_DIR .. && \ - make && make install - -# executable is cbnpic (uses kokkos) -# /opt/cabanaPIC/build - # Install exaMPM RUN git clone https://github.com/ECP-copa/ExaMPM /opt/exaMPM && \ cd /opt/exaMPM && \ mkdir build && \ cd build && \ - cmake -D CMAKE_BUILD_TYPE="Release" -D CMAKE_PREFIX_PATH=$CABANA_INSTALL_DIR -D CMAKE_INSTALL_PREFIX=install .. && \ + cmake -D CMAKE_BUILD_TYPE="Release" \ + -D CMAKE_PREFIX_PATH=$CABANA_INSTALL_DIR \ + -D CMAKE_INSTALL_PREFIX=install .. && \ make install +WORKDIR /opt/exaMPM/build/examples + # Hack for ssh for now... RUN echo " LogLevel ERROR" >> /etc/ssh/ssh_config && \ echo " StrictHostKeyChecking no" >> /etc/ssh/ssh_config && \ From b27a0de61f4e8f8adc0d174965ad3ea471825ed7 Mon Sep 17 00:00:00 2001 From: vsoch Date: Tue, 28 Nov 2023 10:43:50 -0700 Subject: [PATCH 3/3] forgot to add to build config Signed-off-by: vsoch --- .github/workflows/docker-builds.yaml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/docker-builds.yaml b/.github/workflows/docker-builds.yaml index 50f332c..e6b5925 100644 --- a/.github/workflows/docker-builds.yaml +++ b/.github/workflows/docker-builds.yaml @@ -22,6 +22,7 @@ jobs: ["hpl-spack", "ghcr.io/converged-computing/metric-hpl-spack:latest"], ["hpl", "ghcr.io/converged-computing/metric-hpl:latest"], ["ior", "ghcr.io/converged-computing/metric-ior:latest"], + ["exaMPM", "ghcr.io/converged-computing/metric-exampm:latest"], ["cabanaPIC", "ghcr.io/converged-computing/metric-cabanapic:latest"], ["charmpp", "ghcr.io/converged-computing/metric-charmpp:latest"], ["qmcpack", "ghcr.io/converged-computing/metric-qmcpack:latest"],