diff --git a/scripts/ci/cmake/ci-ubuntu20.04-rocm-serial.cmake b/scripts/ci/cmake/ci-ubuntu20.04-rocm-serial.cmake index 0aefb04993..4e2cb75cd6 100644 --- a/scripts/ci/cmake/ci-ubuntu20.04-rocm-serial.cmake +++ b/scripts/ci/cmake/ci-ubuntu20.04-rocm-serial.cmake @@ -22,6 +22,8 @@ ADIOS2_USE_SZ:BOOL=ON ADIOS2_USE_ZeroMQ:STRING=ON ADIOS2_USE_ZFP:BOOL=ON ADIOS2_USE_Kokkos:BOOL=ON +ADIOS2_USE_Sodium:BOOL=OFF +ADIOS2_USE_Catalyst:BOOL=OFF Python_ROOT_DIR:PATH=${PY_ROOT} Python_FIND_STRATEGY:STRING=LOCATION diff --git a/scripts/ci/images/Dockerfile.ci-spack-ubuntu20.04-base b/scripts/ci/images/Dockerfile.ci-spack-ubuntu20.04-base index 3a96586fe4..199b3d730e 100644 --- a/scripts/ci/images/Dockerfile.ci-spack-ubuntu20.04-base +++ b/scripts/ci/images/Dockerfile.ci-spack-ubuntu20.04-base @@ -2,34 +2,39 @@ ARG BASE_IMAGE=ecpe4s/ubuntu20.04-runner-amd64-gcc-11.4:2023.08.01 FROM $BASE_IMAGE -ARG E4S_VERSION=23.08 +ARG E4S_VERSION=24.05 ARG ENABLED_ENVS="serial,ompi,mpich" +ARG EXTERNAL_PACKAGES ARG EXTRA_VARIANTS -ARG EXTRA_PACKAGES + # Clone and patch spack WORKDIR / RUN if ! [ -d /spack ]; then \ git clone --depth 1 --single-branch --branch e4s-${E4S_VERSION} https://github.com/spack/spack; \ + else \ + git fetch --all && git checkout -t origin/e4s-${E4S_VERSION}; \ fi +COPY 0001-mpich-support-ch3-sock.patch /spack COPY packages.yaml /etc/spack/packages.yaml + +WORKDIR /spack # TODO: Patch only needed until we merge https://github.com/spack/spack/pull/40964 -#COPY 0001-mpich-support-ch3-sock.patch /spack +RUN if [ ${E4S_VERSION%.*} -le 23 ]; then git apply 0001-mpich-support-ch3-sock.patch; fi # Install base specs -WORKDIR /spack RUN . /spack/share/spack/setup-env.sh && \ + spack external find ${EXTERNAL_PACKAGES} && \ spack mirror add E4S "https://cache.e4s.io/${E4S_VERSION}" && \ export ADIOS_SPEC_NO_MPI="adios2~mpi${EXTRA_VARIANTS}" && \ - export ADIOS_SPEC_OPENMPI="adios2+mpi${EXTRA_VARIANTS}^openmpi" && \ - export ADIOS_SPEC_MPICH="adios2+mpi${EXTRA_VARIANTS}^mpich" && \ + export ADIOS_SPEC_OPENMPI="adios2+mpi${EXTRA_VARIANTS} ^openmpi" && \ + export ADIOS_SPEC_MPICH="adios2+mpi${EXTRA_VARIANTS} ^mpich" && \ spack config add "config:checksum:false" && \ spack config add "config:build_jobs:$(nproc)" && \ spack config add "concretizer:unify:true" && \ if echo "$ENABLED_ENVS" | grep -q serial; then \ spack env create adios2-ci-serial && \ - spack -e adios2-ci-serial add ${EXTRA_PACKAGES} && \ spack -e adios2-ci-serial add ${ADIOS_SPEC_NO_MPI} && \ spack -e adios2-ci-serial concretize && \ spack -e adios2-ci-serial install \ @@ -40,7 +45,6 @@ RUN . /spack/share/spack/setup-env.sh && \ fi && \ if echo "$ENABLED_ENVS" | grep -q ompi ; then \ spack env create adios2-ci-ompi && \ - spack -e adios2-ci-ompi add ${EXTRA_PACKAGES} && \ spack -e adios2-ci-ompi add ${ADIOS_SPEC_OPENMPI} && \ spack -e adios2-ci-ompi concretize && \ spack -e adios2-ci-ompi install \ @@ -51,7 +55,6 @@ RUN . /spack/share/spack/setup-env.sh && \ fi && \ if echo "$ENABLED_ENVS" | grep -q mpich; then \ spack env create adios2-ci-mpich && \ - spack -e adios2-ci-mpich add ${EXTRA_PACKAGES} && \ spack -e adios2-ci-mpich add ${ADIOS_SPEC_MPICH} && \ spack -e adios2-ci-mpich concretize && \ spack -e adios2-ci-mpich install \ diff --git a/scripts/ci/images/Dockerfile.ci-spack-ubuntu22.04-rocm-base b/scripts/ci/images/Dockerfile.ci-spack-ubuntu22.04-rocm-base new file mode 100644 index 0000000000..6e0ba983d1 --- /dev/null +++ b/scripts/ci/images/Dockerfile.ci-spack-ubuntu22.04-rocm-base @@ -0,0 +1,23 @@ +ARG BASE_IMAGE=rocm/dev-ubuntu-22.04 +FROM $BASE_IMAGE + +# Base dependencies for building VTK-m projects +RUN apt update && \ + DEBIAN_FRONTEND=noninteractive apt install -y --no-install-recommends \ + ccache \ + cmake \ + curl \ + g++ \ + gfortran-11 \ + git \ + git-lfs \ + git-lfs \ + libcurl4-gnutls-dev \ + make \ + mpich \ + ninja-build \ + pkg-config \ + rocthrust-dev \ + \ + && \ + apt clean diff --git a/scripts/ci/images/build-rocm.sh b/scripts/ci/images/build-rocm.sh index f86ebacd07..5a8b485777 100755 --- a/scripts/ci/images/build-rocm.sh +++ b/scripts/ci/images/build-rocm.sh @@ -6,10 +6,20 @@ set -ex docker build \ --progress=plain \ --rm \ - --build-arg BASE_IMAGE="ecpe4s/ubuntu20.04:24.02" \ + --build-arg BASE_IMAGE="rocm/dev-ubuntu-22.04" \ + -f ./Dockerfile.ci-spack-ubuntu22.04-rocm-base \ + -t ghcr.io/ornladios/adios2:ci-spack-ubuntu20.04-rocm-base \ + . + +# Build the base image +docker build \ + --progress=plain \ + --rm \ + --build-arg BASE_IMAGE="ghcr.io/ornladios/adios2:ci-spack-ubuntu20.04-rocm-base" \ --build-arg ENABLED_ENVS="serial" \ - --build-arg E4S_VERSION="24.02" \ - --build-arg EXTRA_PACKAGES="hip@6 kokkos@4.2" \ + --build-arg EXTERNAL_PACKAGES="hip rocprim" \ + --build-arg E4S_VERSION="24.05" \ + --build-arg EXTRA_VARIANTS="+kokkos+rocm amdgpu_target=gfx906 ^hip@6" \ -f ./Dockerfile.ci-spack-ubuntu20.04-base \ -t ghcr.io/ornladios/adios2:ci-spack-ubuntu20.04-rocm \ . diff --git a/scripts/ci/images/packages.yaml b/scripts/ci/images/packages.yaml index 484d7bef60..6db53028f6 100644 --- a/scripts/ci/images/packages.yaml +++ b/scripts/ci/images/packages.yaml @@ -2,7 +2,7 @@ packages: all: target: [haswell] adios2: - require: '+blosc+bzip2+zfp+sz+png+sst+dataman+ssc+hdf5+python+fortran' + require: '+blosc2+bzip2+zfp+sz+png+sst+dataman+hdf5+python+fortran' mpich: require: 'device=ch3:sock' openmpi: diff --git a/scripts/ci/setup-run/ci-ubuntu20.04-rocm.sh b/scripts/ci/setup-run/ci-ubuntu20.04-rocm.sh index d5954614d0..d907c9b68e 100644 --- a/scripts/ci/setup-run/ci-ubuntu20.04-rocm.sh +++ b/scripts/ci/setup-run/ci-ubuntu20.04-rocm.sh @@ -1,5 +1,7 @@ #!/bin/bash +export CMAKE_PREFIX_PATH="${CMAKE_PREFIX_PATH}:/opt/rocm/" + update-alternatives --set gcc "$(update-alternatives --list gcc | grep gcc-11)" update-alternatives --set g++ "$(update-alternatives --list g++ | grep g++-11)" update-alternatives --set gfortran "$(update-alternatives --list gfortran | grep gfortran-11)"