-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(bash): generic compile and build scripts
- Loading branch information
1 parent
2d2513f
commit 656d6ef
Showing
3 changed files
with
15 additions
and
31 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -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 [email protected]%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} | ||
### ---------------------------------------------------- ### |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters