From 3a9f9a67fc7e203fb8c9b90c5efffefb140a2b37 Mon Sep 17 00:00:00 2001 From: Thomas Padioleau Date: Tue, 17 Dec 2024 16:09:26 +0100 Subject: [PATCH] Update cmake and PDI and add kokkos, kokkos-kernels and kokkos-tools in the docker image - Update PDI to v1.8 from github (previously in gitlab) - Update cmake to v3.27 - Install Ginkgo on Release, to minimize the image size - Install Kokkos, Kokkos-fft, Kokkos Kernels and Kokkos Tools: - Serial backend in `/opt/serial` - OpenMP backend (Serial disabled) in `/opt/openmp` See merge request gysela-developpers/gyselalibxx!804 -------------------------------------------- --- docker/gyselalibxx_env/Dockerfile | 56 ++++++++++++++++++++++++++++--- 1 file changed, 51 insertions(+), 5 deletions(-) diff --git a/docker/gyselalibxx_env/Dockerfile b/docker/gyselalibxx_env/Dockerfile index 912a8ebb9..a82f01d08 100644 --- a/docker/gyselalibxx_env/Dockerfile +++ b/docker/gyselalibxx_env/Dockerfile @@ -4,6 +4,7 @@ FROM ubuntu:jammy COPY bash_run /bin/ ENV BASH_ENV=/etc/profile +ENV PATH=/opt/cmake-3.27/bin:${PATH:+:${PATH}} SHELL ["/bin/bash", "-c"] @@ -18,17 +19,15 @@ RUN chmod +x /bin/bash_run \ apt-utils \ ca-certificates \ wget \ - && echo "deb [ arch=amd64 ] https://raw.githubusercontent.com/pdidev/repo/pdi-master.ubuntu jammy main" > /etc/apt/sources.list.d/pdi.list \ - && wget -O /etc/apt/trusted.gpg.d/pdidev-archive-keyring.gpg https://raw.githubusercontent.com/pdidev/repo/pdi-master.ubuntu/pdidev-archive-keyring.gpg \ + && echo "deb [ arch=amd64 ] https://repo.pdi.dev/ubuntu jammy main" > /etc/apt/sources.list.d/pdi.list \ + && wget -O /etc/apt/trusted.gpg.d/pdidev-archive-keyring.gpg https://repo.pdi.dev/ubuntu/pdidev-archive-keyring.gpg \ && chmod a+r /etc/apt/trusted.gpg.d/pdidev-archive-keyring.gpg \ && apt-get update -y \ && apt-get install -y --no-install-recommends \ build-essential \ clang-format \ - cmake \ doxygen \ pkg-config \ - cmake-data \ git \ libfftw3-dev \ liblapacke-dev \ @@ -41,13 +40,60 @@ RUN chmod +x /bin/bash_run \ pdiplugin-set-value \ python3-pip \ libpdi-dev \ + && wget https://cmake.org/files/v3.27/cmake-3.27.9-linux-x86_64.tar.gz \ + && tar --extract --file cmake-3.27.9-linux-x86_64.tar.gz \ + && mv cmake-3.27.9-linux-x86_64 /opt/cmake-3.27 \ && git clone -b v1.8.0 https://github.com/ginkgo-project/ginkgo.git \ && cd ginkgo \ - && cmake -S . -B build -DCMAKE_BUILD_TYPE=RelWithDebInfo -DGINKGO_BUILD_TESTS=OFF -DGINKGO_BUILD_EXAMPLES=OFF -DGINKGO_BUILD_BENCHMARKS=OFF \ + && cmake -DCMAKE_BUILD_TYPE=Release -DGINKGO_BUILD_TESTS=OFF -DGINKGO_BUILD_EXAMPLES=OFF -DGINKGO_BUILD_BENCHMARKS=OFF -B build \ && cmake --build build \ && cmake --install build \ && cd .. \ && rm -rf ginkgo \ + && git clone --branch 4.4.01 --depth 1 https://github.com/kokkos/kokkos.git \ + && git clone --branch develop-spline-kernels-v2 --depth 1 https://github.com/yasahi-hpc/kokkos-kernels \ + && git clone --branch develop --depth 1 https://github.com/kokkos/kokkos-tools.git \ + && git clone --branch v0.2.1 --depth 1 https://github.com/kokkos/kokkos-fft.git \ + && export Kokkos_ROOT=/opt/serial/kokkos \ + && export KokkosFFT_ROOT=/opt/serial/kokkos-fft \ + && export KokkosKernels_ROOT=/opt/serial/kokkos-kernels \ + && export KokkosTools_ROOT=/opt/serial/kokkos-tools \ + && cmake -DCMAKE_BUILD_TYPE=Release -DKokkos_ENABLE_DEPRECATED_CODE_4=OFF -DKokkos_ENABLE_SERIAL=ON -B build -S kokkos \ + && cmake --build build \ + && cmake --install build --prefix $Kokkos_ROOT \ + && rm -rf build \ + && cmake -DCMAKE_BUILD_TYPE=Release -B build -S kokkos-fft \ + && cmake --build build \ + && cmake --install build --prefix $KokkosFFT_ROOT \ + && rm -rf build \ + && cmake -DCMAKE_BUILD_TYPE=Release -B build -S kokkos-kernels \ + && cmake --build build \ + && cmake --install build --prefix $KokkosKernels_ROOT \ + && rm -rf build \ + && cmake -DCMAKE_BUILD_TYPE=Release -B build -S kokkos-tools \ + && cmake --build build \ + && cmake --install build --prefix $KokkosTools_ROOT \ + && rm -rf build \ + && export Kokkos_ROOT=/opt/openmp/kokkos \ + && export KokkosFFT_ROOT=/opt/openmp/kokkos-fft \ + && export KokkosKernels_ROOT=/opt/openmp/kokkos-kernels \ + && export KokkosTools_ROOT=/opt/openmp/kokkos-tools \ + && cmake -DCMAKE_BUILD_TYPE=Release -DKokkos_ENABLE_DEPRECATED_CODE_4=OFF -DKokkos_ENABLE_OPENMP=ON -B build -S kokkos \ + && cmake --build build \ + && cmake --install build --prefix $Kokkos_ROOT \ + && rm -rf build \ + && cmake -DCMAKE_BUILD_TYPE=Release -B build -S kokkos-fft \ + && cmake --build build \ + && cmake --install build --prefix $KokkosFFT_ROOT \ + && rm -rf build \ + && cmake -DCMAKE_BUILD_TYPE=Release -B build -S kokkos-kernels \ + && cmake --build build \ + && cmake --install build --prefix $KokkosKernels_ROOT \ + && rm -rf build \ + && cmake -DCMAKE_BUILD_TYPE=Release -B build -S kokkos-tools \ + && cmake --build build \ + && cmake --install build --prefix $KokkosTools_ROOT \ + && rm -rf build kokkos kokkos-fft kokkos-kernels kokkos-tools \ && git clone -b 2.14.2 https://github.com/danmar/cppcheck.git \ && cd cppcheck \ && cmake -S . -B build \