From 6a2c285aa659848c4426505382628641ef06bfa8 Mon Sep 17 00:00:00 2001 From: "clara.bayley" Date: Thu, 11 Apr 2024 23:13:22 +0200 Subject: [PATCH] feat(bash): compile bash laods compilers need to compile --- scripts/bash/build_cleo_serial.sh | 1 - scripts/bash/compile_cleo.sh | 12 +++++++++--- 2 files changed, 9 insertions(+), 4 deletions(-) diff --git a/scripts/bash/build_cleo_serial.sh b/scripts/bash/build_cleo_serial.sh index 965e3745a..57fd1d4bc 100755 --- a/scripts/bash/build_cleo_serial.sh +++ b/scripts/bash/build_cleo_serial.sh @@ -18,7 +18,6 @@ ### ------------------------------------------------------------------------ ### module load gcc/11.2.0-gcc-11.2.0 spack load cmake@3.23.1%gcc -source activate /work/mh1126/m300950/cleoenv gxx="/sw/spack-levante/gcc-11.2.0-bcn7mb/bin/g++" gcc="/sw/spack-levante/gcc-11.2.0-bcn7mb/bin/gcc" diff --git a/scripts/bash/compile_cleo.sh b/scripts/bash/compile_cleo.sh index fd942f634..60d6252ef 100755 --- a/scripts/bash/compile_cleo.sh +++ b/scripts/bash/compile_cleo.sh @@ -22,10 +22,16 @@ ### ------ Optionally edit these lines to specify ------ ### ### ------ your environment and/or build directory ----- ### ### --------- path and/or executable to compile -------- ### -spack load cmake@3.23.1%gcc +buildtype=$1 # get from command line argument +path2build=$2 # get from command line argument +executable=$3 # get from command line argument -path2build=$1 # get from command line argument -executable=$2 # get from command line argument +spack load cmake@3.23.1%gcc +module load gcc/11.2.0-gcc-11.2.0 +if [[ "${buildtype}" == "cuda" ]]; +then + module load nvhpc/23.9-gcc-11.2.0 # load nvhpc compilers if compiling CUDA build +fi ### ---------------------------------------------------- ### ### ----------------- compile executable --------------- ###