Skip to content

Commit

Permalink
deps: drop deprecated ICC in favor of ICX
Browse files Browse the repository at this point in the history
  • Loading branch information
mloubout committed Jul 17, 2023
1 parent 83af5d0 commit 4202291
Show file tree
Hide file tree
Showing 8 changed files with 44 additions and 84 deletions.
12 changes: 1 addition & 11 deletions .github/workflows/docker-bases.yml
Original file line number Diff line number Diff line change
Expand Up @@ -101,16 +101,6 @@ jobs:
build-args: 'arch=icx'
tags: 'devitocodes/bases:cpu-icx'

- name: ICC image
uses: docker/build-push-action@v3
with:
context: .
file: './docker/Dockerfile.cpu'
push: true
target: 'icc'
build-args: 'arch=icc'
tags: 'devitocodes/bases:cpu-icc'

#######################################################
################### Nvidia nvhpc ######################
#######################################################
Expand Down Expand Up @@ -250,7 +240,7 @@ jobs:
context: .
file: './docker/Dockerfile.amd'
push: true
target: 'aomp'
target: 'amdclang'
tags: devitocodes/bases:amd

- name: AMD HIP image
Expand Down
6 changes: 0 additions & 6 deletions .github/workflows/docker-devito.yml
Original file line number Diff line number Diff line change
Expand Up @@ -43,12 +43,6 @@ jobs:
test: 'tests/test_operator.py'
runner: ubuntu-latest

- base: 'bases:cpu-icc'
tag: "icc"
flag: ''
test: 'tests/test_operator.py'
runner: ubuntu-latest

- base: 'bases:cpu-icx'
tag: "icx"
flag: ''
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/pytest-core-mpi.yml
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ jobs:
runs-on: ubuntu-latest
strategy:
matrix:
arch: [gcc, icc, icx]
arch: [gcc, icx]

steps:
- name: Checkout devito
Expand Down
24 changes: 8 additions & 16 deletions .github/workflows/pytest-core-nompi.yml
Original file line number Diff line number Diff line change
Expand Up @@ -37,9 +37,8 @@ jobs:
pytest-ubuntu-py38-gcc8-omp,
pytest-ubuntu-py39-gcc9-omp,
pytest-osx-py37-clang-omp,
pytest-docker-py37-gcc-omp,
pytest-docker-py37-icc-omp,
pytest-docker-py38-icx-omp
pytest-docker-py39-gcc-omp,
pytest-docker-py39-icx-omp
]
set: [base, adjoint]
include:
Expand Down Expand Up @@ -92,26 +91,19 @@ jobs:
language: "C"
sympy: "1.9"

- name: pytest-docker-py37-gcc-omp
python-version: '3.7'
- name: pytest-docker-py39-gcc-omp
python-version: '3.9'
os: ubuntu-latest
arch: "gcc"
language: "openmp"
sympy: "1.10"
sympy: "1.12"

- name: pytest-docker-py37-icc-omp
python-version: '3.7'
os: ubuntu-22.04
arch: "icc"
language: "openmp"
sympy: "1.11"

- name: pytest-docker-py38-icx-omp
python-version: '3.8'
- name: pytest-docker-py39-icx-omp
python-version: '3.9'
os: ubuntu-22.04
arch: "icx"
language: "openmp"
sympy: "1.11"
sympy: "1.12"

- set: base
test-set: 'not adjoint'
Expand Down
12 changes: 6 additions & 6 deletions .github/workflows/tutorials.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ jobs:
tutos-ubuntu-gcc-py37,
tutos-osx-gcc-py37,
tutos-osx-clang-py37,
tutos-docker-gcc-py37
tutos-docker-gcc-py39
]

include:
Expand All @@ -51,7 +51,7 @@ jobs:
compiler: clang
language: "C"

- name: tutos-docker-gcc-py37
- name: tutos-docker-gcc-py39
os: ubuntu-latest
compiler: gcc
language: "openmp"
Expand All @@ -61,7 +61,7 @@ jobs:
uses: actions/checkout@v3

- name: Set up Python 3.7
if: matrix.name != 'tutos-docker-gcc-py37'
if: "!contains(matrix.name, 'docker')"
uses: actions/setup-python@v4
with:
python-version: 3.7
Expand All @@ -72,21 +72,21 @@ jobs:
xcode-version: latest-stable

- name: Build docker image
if: matrix.name == 'tutos-docker-gcc-py37'
if: "contains(matrix.name, 'docker')"
run: |
docker build . --file docker/Dockerfile.devito --tag devito_img
- name: Set run prefix
run: |
if [ "${{ matrix.name }}" == 'tutos-docker-gcc-py37' ]; then
if [ "${{ matrix.name }}" == 'tutos-docker-gcc-py39' ]; then
echo "RUN_CMD=docker run --rm --name testrun devito_img" >> $GITHUB_ENV
else
echo "RUN_CMD=" >> $GITHUB_ENV
fi
id: set-run

- name: Install dependencies
if: matrix.name != 'tutos-docker-gcc-py37'
if: matrix.name != 'tutos-docker-gcc-py39'
run: |
python -m pip install --upgrade pip
pip install -e .[tests,extras]
Expand Down
62 changes: 21 additions & 41 deletions docker/Dockerfile.amd
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ WORKDIR /tmp

# Install UCX
RUN cd /tmp/ \
&& git clone https://github.com/openucx/ucx.git -b ${UCX_BRANCH} \
&& git clone --depth 1 https://github.com/openucx/ucx.git -b ${UCX_BRANCH} \
&& cd ucx \
&& ./autogen.sh \
&& mkdir build \
Expand All @@ -82,8 +82,26 @@ RUN cd /tmp/ \
&& make -j ${nproc} \
&& make install

# Install OpenMPI
RUN cd /tmp \
&& git clone --depth 1 --recursive https://github.com/open-mpi/ompi.git -b ${OMPI_BRANCH} \
&& cd ompi \
&& ./autogen.pl \
&& mkdir build \
&& cd build \
&& ../configure --prefix=$OMPI_HOME --with-ucx=$UCX_HOME \
CC=amdclang CXX=amdclang++ FC=amdflang F90=amdflang \
--enable-mca-no-build=btl-uct \
--without-verbs \
--with-pmix \
--enable-mpi \
--enable-mpi-fortran=yes \
--disable-debug \
&& make -j ${nproc} \
&& make install

# Cleanup
RUN rm -rf /tmp/ucx
RUN rm -rf /tmp/ucx && rm -rf /tmp/ompi

# Adding OpenMPI and UCX to Environment
ENV PATH=$OMPI_HOME/bin:$UCX_HOME/bin:$PATH \
Expand Down Expand Up @@ -117,26 +135,7 @@ CMD ["/bin/bash"]
# AOMP for GPUs (OpenMP offloading)
########################################################################
# This will only trigger if arch is aomp since the final stage depends on it
FROM sdk-base as aomp

# Install OpenMPI
RUN cd /tmp \
&& git clone --recursive https://github.com/open-mpi/ompi.git -b ${OMPI_BRANCH} \
&& cd ompi \
&& ./autogen.pl \
&& mkdir build \
&& cd build \
&& ../configure --prefix=$OMPI_HOME --with-ucx=$UCX_HOME \
CC=amdclang CXX=amdclang++ FC=amdflang F90=amdflang \
--enable-mca-no-build=btl-uct \
--without-verbs \
--with-pmix \
--enable-mpi \
--enable-mpi-fortran=yes \
--disable-debug \
&& make -j ${nproc} \
&& make install
RUN RUN rm -rf /tmp/ompi
FROM sdk-base as amdclang

# MPI env
ENV OMPI_CC="amdclang"
Expand All @@ -153,25 +152,6 @@ ENV DEVITO_LANGUAGE="openmp"
# This will only trigger if arch is hip since the final stage depends on it
FROM sdk-base as hip

# Install OpenMPI
RUN cd /tmp \
&& git clone --recursive https://github.com/open-mpi/ompi.git -b ${OMPI_BRANCH} \
&& cd ompi \
&& ./autogen.pl \
&& mkdir build \
&& cd build \
&& ../configure --prefix=$OMPI_HOME --with-ucx=$UCX_HOME \
CC=hipcc CXX=hipcc FC=hipfort F90=hipfort \
--enable-mca-no-build=btl-uct \
--without-verbs \
--with-pmix \
--enable-mpi \
--enable-mpi-fortran=yes \
--disable-debug \
&& make -j ${nproc} \
&& make install
RUN RUN rm -rf /tmp/ompi

# MPI env
ENV OMPI_CC="hipcc"
ENV OMPI_CXX="hipcc"
Expand Down
6 changes: 5 additions & 1 deletion docker/Dockerfile.cpu
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@

ARG pyversion=python:3.9
ARG arch=gcc
ARG OMPI_BRANCH="v4.1.4"

# Base image
FROM ${pyversion}-slim-bullseye as base
Expand Down Expand Up @@ -34,8 +35,10 @@ CMD ["/bin/bash"]
##############################################################
FROM base as gcc

ARG OMPI_BRANCH="v4.1.4"
# Install OpenMPI
RUN mkdir -p /deps && mkdir -p /opt/openmpi && cd /deps && \
git clone --recursive --branch v4.1.4 https://github.com/open-mpi/ompi.git openmpi && \
git clone --depth 1 --recursive --branch ${OMPI_BRANCH} https://github.com/open-mpi/ompi.git openmpi && \
cd openmpi && ./autogen.pl && \
mkdir build && cd build && \
../configure --prefix=/opt/openmpi/ \
Expand Down Expand Up @@ -71,6 +74,7 @@ ENV FI_PROVIDER_PATH $I_MPI_ROOT/libfabric/lib/prov:/usr/lib64/libfabric:${LD_LI

##############################################################
# ICC image
# This is a legacy setup that is not built anymore but kept for reference
##############################################################
FROM oneapi as icc

Expand Down
4 changes: 2 additions & 2 deletions docker/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,9 @@ Devito provides several images that target different architectures and compilers

We provide two CPU images:
- `devito:gcc-*` with the standard GNU gcc compiler.
- `devito:icc-*` with the Intel C compiler for Intel architectures.
- `devito:icx-*` with the Intel C compiler for Intel architectures.

These images provide a working environment for any CPU architecture and come with [Devito], `gcc/icc` and `mpi` preinstalled, and utilities such as `jupyter` for usability and exploration of the package.
These images provide a working environment for any CPU architecture and come with [Devito], `gcc/icx` and `mpi` preinstalled, and utilities such as `jupyter` for usability and exploration of the package.

To run this image locally, you will first need to install `docker`. Then, the following commands will get you started:

Expand Down

0 comments on commit 4202291

Please sign in to comment.