Skip to content

Commit

Permalink
Resolve "Ensure recent Spack recipes are used."
Browse files Browse the repository at this point in the history
Closes #216

See merge request gysela-developpers/gyselalibxx!461

--------------------------------------------

Co-authored-by: Etienne Malaboeuf <eti.malaboeuf@gmail.com>
  • Loading branch information
tpadioleau and etiennemlb committed Apr 19, 2024
1 parent e06dc85 commit 3c6fe3e
Show file tree
Hide file tree
Showing 2 changed files with 24 additions and 15 deletions.
6 changes: 4 additions & 2 deletions prepare.gyselalibxx.sh
Original file line number Diff line number Diff line change
Expand Up @@ -47,14 +47,16 @@ fi

PREPARE_BUILD_GENERATOR="Unix Makefiles"

echo "[PREPARE] Sourcing environment file: '${PREPARE_TOOLCHAIN_PATH}/environment.sh'."

source -- "${PREPARE_TOOLCHAIN_PATH}/environment.sh"

if which ninja >/dev/null 2>&1; then
PREPARE_BUILD_GENERATOR="Ninja"
fi

echo "[PREPARE] Using build system: '${PREPARE_BUILD_GENERATOR}'."

source -- "${PREPARE_TOOLCHAIN_PATH}/environment.sh"

PREPARE_BUILD_CMAKE_FLAG="${@:4}"

cmake \
Expand Down
33 changes: 20 additions & 13 deletions toolchains/mi250.hipcc.adastra.spack/prepare.sh
Original file line number Diff line number Diff line change
Expand Up @@ -17,10 +17,12 @@ module load spack-MI250-3.1.0

# Inject PDI recipes into our local repo.
git clone https://github.com/pdidev/spack pdi.spack || true
cd pdi.spack && git pull && cd ..
cp -rf -- pdi.spack/packages "${SPACK_USER_PREFIX}/config_user_spack/local-repo"

# NOTE: A sparse checkout would be great.
git clone https://github.com/spack/spack spack.spack || true
cd spack.spack && git pull && cd ..
# NOTE: We may be overriding some CINES modified recipes.
cp -rf -- spack.spack/var/spack/repos/builtin/packages/ginkgo "${SPACK_USER_PREFIX}/config_user_spack/local-repo/packages"

Expand All @@ -30,16 +32,21 @@ echo "Preparing the Spack environment..."
# # ongoing issue a CiINES to fix the issue.
# echo "# Disabled" >"${SPACK_USER_PREFIX}/config_user_spack/mirrors.yaml"

# GCC based with hipcc for the ROCm variant:
spack install --no-check-signature --reuse-deps \
libyaml@0.2.5%gcc@12.1 build_system=autotools arch=linux-rhel8-zen3 \
paraconf@1.0.0%gcc@12.1~fortran~ipo~shared~tests build_system=cmake build_type=Release generator==ninja arch=linux-rhel8-zen3 \
pdi@1.6.0%gcc@12.1~benchs~docs+fortran~ipo+python~tests build_system=cmake build_type=Release generator==ninja arch=linux-rhel8-zen3 \
pdiplugin-decl-hdf5@1.6.0%gcc@12.1~benchs~fortran~ipo~mpi~tests build_system=cmake build_type=Release generator==ninja arch=linux-rhel8-zen3 \
ginkgo@1.7.0%gcc@12.1~cuda~develtools~full_optimizations~hwloc~ipo~mpi+openmp+rocm~sde~shared~sycl amdgpu_target=gfx90a build_system=cmake build_type=Release generator==ninja arch=linux-rhel8-zen3 \
eigen@3.4.0%gcc@12.1~ipo build_system=cmake build_type=Release generator==ninja arch=linux-rhel8-zen3 \
cmake@3.27.7%gcc@12.1~doc+ncurses+ownlibs build_system=generic build_type=Release arch=linux-rhel8-zen3 \
ninja@1.11.1%gcc@12.1+re2c build_system=generic arch=linux-rhel8-zen3

# Ensure we expose modules for every installed software.
spack module tcl refresh --delete-tree --yes-to-all
# NOTE: We do two passes because Spack is bugged and even though we specified
# ninja/cmake as explicit target it does NOT register it that way, thus failing
# to generate modules for it.
for ((i = 0; i < 2; ++i)); do
# GCC based with hipcc for the ROCm variant:
spack install --no-check-signature --reuse-deps \
libyaml@0.2.5%gcc@12.1 build_system=autotools arch=linux-rhel8-zen3 \
paraconf@1.0.0%gcc@12.1~fortran~ipo~shared~tests build_system=cmake build_type=Release generator==ninja arch=linux-rhel8-zen3 \
pdi@1.6.0%gcc@12.1~benchs~docs+fortran~ipo+python~tests build_system=cmake build_type=Release generator==ninja arch=linux-rhel8-zen3 \
pdiplugin-decl-hdf5@1.6.0%gcc@12.1~benchs~fortran~ipo~mpi~tests build_system=cmake build_type=Release generator==ninja arch=linux-rhel8-zen3 \
ginkgo@1.7.0%gcc@12.1~cuda~develtools~full_optimizations~hwloc~ipo~mpi+openmp+rocm~sde~shared~sycl amdgpu_target=gfx90a build_system=cmake build_type=Release generator==ninja arch=linux-rhel8-zen3 \
eigen@3.4.0%gcc@12.1~ipo build_system=cmake build_type=Release generator==ninja arch=linux-rhel8-zen3 \
cmake@3.27.7%gcc@12.1~doc+ncurses+ownlibs build_system=generic build_type=Release arch=linux-rhel8-zen3 \
ninja@1.11.1%gcc@12.1+re2c build_system=generic arch=linux-rhel8-zen3

# Ensure we expose modules for every installed software.
spack module tcl refresh --delete-tree --yes-to-all
done

0 comments on commit 3c6fe3e

Please sign in to comment.