diff --git a/scripts/bash/build_cleo.sh b/scripts/bash/build_cleo.sh index 65fd580fa..7d50a649e 100755 --- a/scripts/bash/build_cleo.sh +++ b/scripts/bash/build_cleo.sh @@ -12,8 +12,8 @@ #SBATCH --error=./build/bin/build_cleo_err.%j.out buildtype=$1 -path2CLEO=${HOME}/CLEO/ -path2build=${HOME}/CLEO/build/ +path2CLEO=$2 +path2build=$3 path2buildbash=${path2CLEO}/scripts/bash/ ### ------------------ build_compile.sh ---------------- ### diff --git a/scripts/bash/compile_cleo.sh b/scripts/bash/compile_cleo.sh index 28aa0e188..23fa0afdc 100755 --- a/scripts/bash/compile_cleo.sh +++ b/scripts/bash/compile_cleo.sh @@ -16,35 +16,21 @@ ### ------------- have already built CLEO in path2build ------------ ### ### ------------------- directory using cmake -------------------- ### -### ----- You need to edit these lines to set your ----- ### -### ----- default compiler and python environment ---- ### -### ---- and paths for CLEO and build directories ---- ### -module load gcc/11.2.0-gcc-11.2.0 -module load python3/2022.01-gcc-11.2.0 -module load nvhpc/23.7-gcc-11.2.0 +### ------------------ input parameters ---------------- ### +### ----- You need to edit these lines to specify ------ ### +### ----- (your environment and) build directory ------- ### +### -------- path and executable to compile ------------ ### spack load cmake@3.23.1%gcc -source activate /work/mh1126/m300950/cleoenv -python=python -path2CLEO=$1 # get from command line argument -path2build=$2 # get from command line argument -configfile=${HOME}/CLEO/src/config/config.txt -### ---------------------------------------------------- ### -### ------------------- compile_run.sh ----------------- ### -if [ "${path2build}" == "" ] -then - path2build=${HOME}/CLEO/build/ -fi +path2build=$1 # get from command line argument +executable=$2 # get from command line argument +### ---------------------------------------------------- ### -### compile CLEO in ./build directory +### ----------------- compile executable --------------- ### echo "path to build directory: ${path2build}" -cd ${path2build} && pwd -make -j 128 +echo "executable: ${executable}" -### run CLEO -export OMP_PROC_BIND=spread -export OMP_PLACES=threads -runcmd="${path2build}/src/cleocoupledsdm ${configfile}" -echo ${runcmd} -${runcmd} +cd ${path2build} +make clean +make -j 128 ${executable} ### ---------------------------------------------------- ### diff --git a/src/compile_run_cleocoupledsdm.sh b/src/compile_run_cleocoupledsdm.sh index 2f58ecb31..4387be552 100755 --- a/src/compile_run_cleocoupledsdm.sh +++ b/src/compile_run_cleocoupledsdm.sh @@ -18,9 +18,7 @@ ### ------------------ input parameters ---------------- ### ### ----- You need to edit these lines to specify ------ ### -### ------- your environment and directory paths ------- ### -module load python3/2022.01-gcc-11.2.0 - +### ------ (your environment and) directory paths ------ ### executable="cleocoupledsdm" path2CLEO=${HOME}/CLEO/ path2build=$1 # get from command line argument