From 0f35ff95922360d37762043039672d8e0e4d29ae Mon Sep 17 00:00:00 2001 From: mloubout Date: Sun, 14 Apr 2024 11:53:36 -0400 Subject: [PATCH 1/2] docker: fix oneapi setup --- docker/Dockerfile.devito | 2 +- docker/Dockerfile.intel | 10 ++++++++-- 2 files changed, 9 insertions(+), 3 deletions(-) diff --git a/docker/Dockerfile.devito b/docker/Dockerfile.devito index aeda36d615..635e5d7899 100644 --- a/docker/Dockerfile.devito +++ b/docker/Dockerfile.devito @@ -26,7 +26,7 @@ RUN python3 -m venv /venv && \ /venv/bin/pip install --no-cache-dir --upgrade pip && \ /venv/bin/pip install --no-cache-dir jupyter && \ /venv/bin/pip install --no-cache-dir wheel && \ - eval "$MPI4PY_FLAGS /venv/bin/pip install --no-cache-dir mpi4py" && \ + eval $MPI4PY_FLAGS /venv/bin/pip install --no-cache-dir mpi4py && \ /venv/bin/pip install --no-cache-dir -e /app/devito[extras,mpi,tests] && \ rm -rf ~/.cache/pip diff --git a/docker/Dockerfile.intel b/docker/Dockerfile.intel index 48757d9776..5b75f203b5 100644 --- a/docker/Dockerfile.intel +++ b/docker/Dockerfile.intel @@ -59,6 +59,8 @@ RUN apt-get update -y && apt-get dist-upgrade -y && \ # Development packages libigc-dev intel-igc-cm libigdfcl-dev libigfxcmrt-dev level-zero-dev +ENV MPI4PY_FLAGS='. /opt/intel/oneapi/setvars.sh intel64' + ############################################################## # ICC image # This is a legacy setup that is not built anymore but kept for reference @@ -70,12 +72,13 @@ RUN apt-get update -y && apt-get install -y intel-oneapi-compiler-dpcpp-cpp-and- rm -rf /var/lib/apt/lists/* # Devito config +ENV I_MPI_CC="icc" +ENV I_MPI_CXX="icpc" ENV DEVITO_ARCH="icc" ENV DEVITO_LANGUAGE="openmp" ENV DEVITO_PLATFORM="intel64" # MPICC compiler for mpi4py ENV MPICC=mpiicc -ENV MPI4PY_FLAGS='. /opt/intel/oneapi/setvars.sh && CFLAGS="-cc=icc"' ############################################################## # ICX OpenMP image @@ -87,11 +90,12 @@ RUN apt-get update -y && apt-get install -y intel-oneapi-compiler-dpcpp-cpp inte rm -rf /var/lib/apt/lists/* # Devito config +ENV I_MPI_CC="icx" +ENV I_MPI_CXX="icpx" ENV DEVITO_ARCH="icx" ENV DEVITO_LANGUAGE="openmp" # MPICC compiler for mpi4py ENV MPICC=mpiicc -ENV MPI4PY_FLAGS='. /opt/intel/oneapi/setvars.sh && CFLAGS="-cc=icx"' ############################################################## # ICX SYCL CPU image @@ -102,6 +106,7 @@ FROM icx as cpu-sycl ENV DEVITO_ARCH="sycl" ENV DEVITO_LANGUAGE="sycl" ENV DEVITO_PLATFORM="intel64" +ENV MPICC=sycl ############################################################## # ICX SYCL GPU image @@ -112,3 +117,4 @@ FROM icx as gpu-sycl ENV DEVITO_ARCH="sycl" ENV DEVITO_LANGUAGE="sycl" ENV DEVITO_PLATFORM="intelgpuX" +ENV MPICC=sycl From 74577c2f4836d8242d26daecf743d341c72f4ac2 Mon Sep 17 00:00:00 2001 From: mloubout Date: Sun, 14 Apr 2024 17:43:24 -0400 Subject: [PATCH 2/2] docker: make sure mpi4py version requirement is met using the requirement file --- docker/Dockerfile.devito | 4 ++-- docker/Dockerfile.intel | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/docker/Dockerfile.devito b/docker/Dockerfile.devito index 635e5d7899..7908497ca5 100644 --- a/docker/Dockerfile.devito +++ b/docker/Dockerfile.devito @@ -26,8 +26,8 @@ RUN python3 -m venv /venv && \ /venv/bin/pip install --no-cache-dir --upgrade pip && \ /venv/bin/pip install --no-cache-dir jupyter && \ /venv/bin/pip install --no-cache-dir wheel && \ - eval $MPI4PY_FLAGS /venv/bin/pip install --no-cache-dir mpi4py && \ - /venv/bin/pip install --no-cache-dir -e /app/devito[extras,mpi,tests] && \ + eval "$MPI4PY_FLAGS /venv/bin/pip install --no-cache-dir -r /app/devito/requirements-mpi.txt" && \ + /venv/bin/pip install --no-cache-dir -e /app/devito[extras,tests] && \ rm -rf ~/.cache/pip # Usefull utilities diff --git a/docker/Dockerfile.intel b/docker/Dockerfile.intel index 5b75f203b5..24e57ea147 100644 --- a/docker/Dockerfile.intel +++ b/docker/Dockerfile.intel @@ -59,7 +59,7 @@ RUN apt-get update -y && apt-get dist-upgrade -y && \ # Development packages libigc-dev intel-igc-cm libigdfcl-dev libigfxcmrt-dev level-zero-dev -ENV MPI4PY_FLAGS='. /opt/intel/oneapi/setvars.sh intel64' +ENV MPI4PY_FLAGS='. /opt/intel/oneapi/setvars.sh intel64 && ' ############################################################## # ICC image