Skip to content

Commit 43dd72c

Browse files
committed
fixup! fixup! ci: added rocm gha build
1 parent 7a5d1dc commit 43dd72c

File tree

6 files changed

+53
-13
lines changed

6 files changed

+53
-13
lines changed

scripts/ci/cmake/ci-ubuntu20.04-rocm-serial.cmake

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,8 @@ ADIOS2_USE_SZ:BOOL=ON
2222
ADIOS2_USE_ZeroMQ:STRING=ON
2323
ADIOS2_USE_ZFP:BOOL=ON
2424
ADIOS2_USE_Kokkos:BOOL=ON
25+
ADIOS2_USE_Sodium:BOOL=OFF
26+
ADIOS2_USE_Catalyst:BOOL=OFF
2527
2628
Python_ROOT_DIR:PATH=${PY_ROOT}
2729
Python_FIND_STRATEGY:STRING=LOCATION

scripts/ci/images/Dockerfile.ci-spack-ubuntu20.04-base

Lines changed: 12 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -2,34 +2,39 @@
22
ARG BASE_IMAGE=ecpe4s/ubuntu20.04-runner-amd64-gcc-11.4:2023.08.01
33
FROM $BASE_IMAGE
44

5-
ARG E4S_VERSION=23.08
5+
ARG E4S_VERSION=24.05
66
ARG ENABLED_ENVS="serial,ompi,mpich"
7+
ARG EXTERNAL_PACKAGES
78
ARG EXTRA_VARIANTS
8-
ARG EXTRA_PACKAGES
9+
910

1011
# Clone and patch spack
1112
WORKDIR /
1213
RUN if ! [ -d /spack ]; then \
1314
git clone --depth 1 --single-branch --branch e4s-${E4S_VERSION} https://github.com/spack/spack; \
15+
else \
16+
git fetch --all && git checkout -t origin/e4s-${E4S_VERSION}; \
1417
fi
1518

19+
COPY 0001-mpich-support-ch3-sock.patch /spack
1620
COPY packages.yaml /etc/spack/packages.yaml
21+
22+
WORKDIR /spack
1723
# TODO: Patch only needed until we merge https://github.com/spack/spack/pull/40964
18-
#COPY 0001-mpich-support-ch3-sock.patch /spack
24+
RUN if [ ${E4S_VERSION%.*} -le 23 ]; then git apply 0001-mpich-support-ch3-sock.patch; fi
1925

2026
# Install base specs
21-
WORKDIR /spack
2227
RUN . /spack/share/spack/setup-env.sh && \
28+
spack external find ${EXTERNAL_PACKAGES} && \
2329
spack mirror add E4S "https://cache.e4s.io/${E4S_VERSION}" && \
2430
export ADIOS_SPEC_NO_MPI="adios2~mpi${EXTRA_VARIANTS}" && \
25-
export ADIOS_SPEC_OPENMPI="adios2+mpi${EXTRA_VARIANTS}^openmpi" && \
26-
export ADIOS_SPEC_MPICH="adios2+mpi${EXTRA_VARIANTS}^mpich" && \
31+
export ADIOS_SPEC_OPENMPI="adios2+mpi${EXTRA_VARIANTS} ^openmpi" && \
32+
export ADIOS_SPEC_MPICH="adios2+mpi${EXTRA_VARIANTS} ^mpich" && \
2733
spack config add "config:checksum:false" && \
2834
spack config add "config:build_jobs:$(nproc)" && \
2935
spack config add "concretizer:unify:true" && \
3036
if echo "$ENABLED_ENVS" | grep -q serial; then \
3137
spack env create adios2-ci-serial && \
32-
spack -e adios2-ci-serial add ${EXTRA_PACKAGES} && \
3338
spack -e adios2-ci-serial add ${ADIOS_SPEC_NO_MPI} && \
3439
spack -e adios2-ci-serial concretize && \
3540
spack -e adios2-ci-serial install \
@@ -40,7 +45,6 @@ RUN . /spack/share/spack/setup-env.sh && \
4045
fi && \
4146
if echo "$ENABLED_ENVS" | grep -q ompi ; then \
4247
spack env create adios2-ci-ompi && \
43-
spack -e adios2-ci-ompi add ${EXTRA_PACKAGES} && \
4448
spack -e adios2-ci-ompi add ${ADIOS_SPEC_OPENMPI} && \
4549
spack -e adios2-ci-ompi concretize && \
4650
spack -e adios2-ci-ompi install \
@@ -51,7 +55,6 @@ RUN . /spack/share/spack/setup-env.sh && \
5155
fi && \
5256
if echo "$ENABLED_ENVS" | grep -q mpich; then \
5357
spack env create adios2-ci-mpich && \
54-
spack -e adios2-ci-mpich add ${EXTRA_PACKAGES} && \
5558
spack -e adios2-ci-mpich add ${ADIOS_SPEC_MPICH} && \
5659
spack -e adios2-ci-mpich concretize && \
5760
spack -e adios2-ci-mpich install \
Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
ARG BASE_IMAGE=rocm/dev-ubuntu-22.04
2+
FROM $BASE_IMAGE
3+
4+
# Base dependencies for building VTK-m projects
5+
RUN apt update && \
6+
DEBIAN_FRONTEND=noninteractive apt install -y --no-install-recommends \
7+
ccache \
8+
cmake \
9+
curl \
10+
g++ \
11+
gfortran-11 \
12+
git \
13+
git-lfs \
14+
git-lfs \
15+
libcurl4-gnutls-dev \
16+
make \
17+
mpich \
18+
ninja-build \
19+
pkg-config \
20+
rocthrust-dev \
21+
\
22+
&& \
23+
apt clean

scripts/ci/images/build-rocm.sh

Lines changed: 13 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,10 +6,20 @@ set -ex
66
docker build \
77
--progress=plain \
88
--rm \
9-
--build-arg BASE_IMAGE="ecpe4s/ubuntu20.04:24.02" \
9+
--build-arg BASE_IMAGE="rocm/dev-ubuntu-22.04" \
10+
-f ./Dockerfile.ci-spack-ubuntu22.04-rocm-base \
11+
-t ghcr.io/ornladios/adios2:ci-spack-ubuntu20.04-rocm-base \
12+
.
13+
14+
# Build the base image
15+
docker build \
16+
--progress=plain \
17+
--rm \
18+
--build-arg BASE_IMAGE="ghcr.io/ornladios/adios2:ci-spack-ubuntu20.04-rocm-base" \
1019
--build-arg ENABLED_ENVS="serial" \
11-
--build-arg E4S_VERSION="24.02" \
12-
--build-arg EXTRA_PACKAGES="hip@6 [email protected]" \
20+
--build-arg EXTERNAL_PACKAGES="hip rocprim" \
21+
--build-arg E4S_VERSION="24.05" \
22+
--build-arg EXTRA_VARIANTS="+kokkos+rocm amdgpu_target=gfx906 ^hip@6" \
1323
-f ./Dockerfile.ci-spack-ubuntu20.04-base \
1424
-t ghcr.io/ornladios/adios2:ci-spack-ubuntu20.04-rocm \
1525
.

scripts/ci/images/packages.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ packages:
22
all:
33
target: [haswell]
44
adios2:
5-
require: '+blosc+bzip2+zfp+sz+png+sst+dataman+ssc+hdf5+python+fortran'
5+
require: '+blosc2+bzip2+zfp+sz+png+sst+dataman+hdf5+python+fortran'
66
mpich:
77
require: 'device=ch3:sock'
88
openmpi:

scripts/ci/setup-run/ci-ubuntu20.04-rocm.sh

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
#!/bin/bash
22

3+
export CMAKE_PREFIX_PATH="${CMAKE_PREFIX_PATH}:/opt/rocm/"
4+
35
update-alternatives --set gcc "$(update-alternatives --list gcc | grep gcc-11)"
46
update-alternatives --set g++ "$(update-alternatives --list g++ | grep g++-11)"
57
update-alternatives --set gfortran "$(update-alternatives --list gfortran | grep gfortran-11)"

0 commit comments

Comments
 (0)