From 6b2bcd9f6970cc243c42a72c666e8f9933489640 Mon Sep 17 00:00:00 2001 From: G-Ragghianti Date: Thu, 20 Mar 2025 16:35:56 -0400 Subject: [PATCH] Adding in require CI file --- .github/workflows/env_setup.sh | 37 ++++++++++++++++++++++++++++++++++ 1 file changed, 37 insertions(+) create mode 100755 .github/workflows/env_setup.sh diff --git a/.github/workflows/env_setup.sh b/.github/workflows/env_setup.sh new file mode 100755 index 00000000..603db775 --- /dev/null +++ b/.github/workflows/env_setup.sh @@ -0,0 +1,37 @@ +# This file should be "sourced" into your environment + +# Show the executed command, but don't affect spawned shells +trap 'echo "# $BASH_COMMAND"' DEBUG # Show commands + +echo "Loading environment" +if [[ -z "$SPACK_SETUP" || ! -e "$SPACK_SETUP" ]]; then + echo Error! Environment variable \$SPACK_SETUP must point + echo to a valid setup-env.sh Spack setup script. + exit 1 +fi +source $SPACK_SETUP +spack env activate dplasma + +HIP=OFF +CUDA=OFF +if [ "$DEVICE" = "gpu_nvidia" ]; then + spack load cuda + CUDA=ON +elif [ "$DEVICE" = "gpu_amd" ];then + HIP=ON +fi + + +# Disable RECURSIVE in CI tests until a real solution to https://github.com/ICLDisco/parsec/issues/548 is implemented +! read -d '' BUILD_CONFIG << EOF + -G Ninja + -DCMAKE_BUILD_TYPE=$BUILD_TYPE + -DBUILD_SHARED_LIBS=$SHARED_TYPE + -DMPIEXEC_PREFLAGS='--bind-to;none;--oversubscribe' + -DCMAKE_INSTALL_PREFIX=$INSTALL_DIRECTORY + -DDPLASMA_PRECISIONS=d + -DPARSEC_HAVE_DEV_RECURSIVE_SUPPORT=OFF + -DDPLASMA_GPU_WITH_CUDA=$CUDA + -DDPLASMA_GPU_WITH_HIP=$HIP +EOF +export BUILD_CONFIG