Skip to content

Commit 06d3837

Browse files
committed
docker: update compilers to more recent versions
1 parent 82cdb29 commit 06d3837

3 files changed

Lines changed: 31 additions & 14 deletions

File tree

.github/workflows/pytest-gpu.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@ jobs:
5757
base: "devitocodes/bases:nvidia-nvc"
5858
tags: ["self-hosted", "nvidiagpu"]
5959
test_drive_cmd: "nvidia-smi"
60-
flags: '--gpus all --rm -t --name testrun-nvc'
60+
flags: '--init --gpus all --rm -t --name testrun-nvc'
6161

6262
- name: pytest-gpu-omp-amd
6363
test_files: "tests/test_adjoint.py tests/test_gpu_common.py tests/test_gpu_openmp.py"
@@ -66,7 +66,7 @@ jobs:
6666
test_drive_cmd: "rocm-smi"
6767
# Attach the AMD GPU devices `/dev` and add user to video and render (109 on wampa) group
6868
# Options from https://rocmdocs.amd.com/en/latest/ROCm_Virtualization_Containers/ROCm-Virtualization-&-Containers.html
69-
flags: "--network=host --device=/dev/kfd --device=/dev/dri --ipc=host --group-add video --group-add $(getent group render | cut -d: -f3) --cap-add=SYS_PTRACE --security-opt seccomp=unconfined --rm -t --name testrun-amd"
69+
flags: "--init --network=host --device=/dev/kfd --device=/dev/dri --ipc=host --group-add video --group-add $(getent group render | cut -d: -f3) --cap-add=SYS_PTRACE --security-opt seccomp=unconfined --rm -t --name testrun-amd"
7070

7171
steps:
7272
- name: Checkout devito

docker/Dockerfile.amd

Lines changed: 21 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -3,12 +3,12 @@
33
# Based on https://github.com/amd/InfinityHub-CI/tree/main/base-gpu-mpi-rocm-docker
44
##############################################################
55

6-
ARG ROCM_VERSION=5.5.1
6+
ARG ROCM_VERSION=6.3.2
77

88
FROM rocm/dev-ubuntu-22.04:${ROCM_VERSION}-complete as sdk-base
99

10-
ARG UCX_BRANCH="v1.13.1"
11-
ARG OMPI_BRANCH="v4.1.4"
10+
ARG UCX_BRANCH="v1.14.1"
11+
ARG OMPI_BRANCH="v5.0.6"
1212

1313
# Update and Install basic Linux development tools
1414
RUN rm /etc/apt/sources.list.d/* \
@@ -46,7 +46,7 @@ ENV ROCM_HOME=/opt/rocm \
4646
OMPI_HOME=/opt/ompi
4747

4848
# Until rocm base has it fixed
49-
RUN ln -s /opt/rocm/llvm/bin/offload-arch /opt/rocm/bin/offload-arch
49+
RUN ln -s /opt/rocm/llvm/bin/offload-arch /opt/rocm/bin/offload-arch | echo "offload-arch already exis"
5050

5151
# Install tmpi
5252
RUN curl https://raw.githubusercontent.com/Azrael3000/tmpi/master/tmpi -o /usr/local/bin/tmpi
@@ -73,10 +73,14 @@ RUN cd /tmp/ \
7373
--without-knem \
7474
--without-xpmem \
7575
--without-cuda \
76+
--without-java \
77+
--enable-mt \
7678
--enable-optimizations \
7779
--disable-logging \
7880
--disable-debug \
7981
--disable-examples \
82+
--disable-assertions \
83+
--disable-params-check \
8084
&& make -j ${nproc} \
8185
&& make install
8286

@@ -87,17 +91,22 @@ RUN cd /tmp \
8791
&& ./autogen.pl \
8892
&& mkdir build \
8993
&& cd build \
90-
&& ../configure --prefix=$OMPI_HOME --with-ucx=$UCX_HOME \
91-
CC=amdclang CXX=amdclang++ FC=amdflang F90=amdflang \
92-
--enable-mca-no-build=btl-uct \
94+
&& ../configure CC=amdclang CXX=amdclang++ FC=amdflang F90=amdflang \
95+
--prefix=$OMPI_HOME \
96+
--with-ucx=$UCX_HOME \
97+
--with-rocm=$ROCM_HOME \
98+
--enable-mca-no-build=btl-uct \
9399
--without-verbs \
94-
--with-pmix \
95-
--enable-mpi \
96-
--enable-mpi-fortran=yes \
100+
--enable-mpi1-compatibility \
101+
--enable-mpi-fortran=no \
97102
--disable-debug \
98103
&& make -j ${nproc} \
99104
&& make install
100105

106+
# UCX config
107+
ENV UCX_WARN_UNUSED_ENV_VARS=n
108+
ENV UCX_TLS=sm,self,rocm,rocm_copy,rocm_ipc
109+
101110
# Cleanup
102111
RUN rm -rf /tmp/ucx && rm -rf /tmp/ompi
103112

@@ -137,6 +146,7 @@ FROM sdk-base as amdclang
137146
# MPI env
138147
ENV OMPI_CC="amdclang"
139148
ENV OMPI_CXX="amdclang++"
149+
ENV MPICC="amdclang"
140150

141151
# Devito env
142152
ENV DEVITO_ARCH="aomp"
@@ -152,6 +162,7 @@ FROM sdk-base as hip
152162
# MPI env
153163
ENV OMPI_CC="hipcc"
154164
ENV OMPI_CXX="hipcc"
165+
ENV MPICC="MPICC"
155166

156167
# Devito env
157168
ENV DEVITO_ARCH="hip"

docker/Dockerfile.cpu

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ RUN apt-get update && \
1818
# Install for basic base not containing it
1919
RUN apt-get install -y vim wget git flex libnuma-dev tmux \
2020
numactl hwloc curl \
21-
autoconf libtool build-essential procps
21+
autoconf libtool build-essential procps software-properties-common
2222

2323
# Install tmpi
2424
RUN curl https://raw.githubusercontent.com/Azrael3000/tmpi/master/tmpi -o /usr/local/bin/tmpi
@@ -37,6 +37,12 @@ CMD ["/bin/bash"]
3737
##############################################################
3838
FROM base as gcc
3939

40+
# Install gcc 13 for better hardware and software support
41+
RUN add-apt-repository ppa:ubuntu-toolchain-r/test -y && apt update && \
42+
apt install gcc-13 g++-13 -y && \
43+
update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-13 100 && \
44+
update-alternatives --install /usr/bin/g++ g++ /usr/bin/g++-13 100
45+
4046
ARG OMPI_BRANCH="v4.1.4"
4147
# Install OpenMPI
4248
RUN mkdir -p /deps && mkdir -p /opt/openmpi && cd /deps && \
@@ -47,7 +53,7 @@ RUN mkdir -p /deps && mkdir -p /opt/openmpi && cd /deps && \
4753
--enable-mca-no-build=btl-uct --enable-mpi1-compatibility && \
4854
make -j ${nproc} && \
4955
make install && \
50-
rm -rf /deps/openmpi
56+
cd /deps && rm -rf /deps/openmpi
5157

5258
# Set OpenMPI path
5359
ENV PATH=${PATH}:/opt/openmpi/bin

0 commit comments

Comments
 (0)