-
Notifications
You must be signed in to change notification settings - Fork 26
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
compile with a matrix of options and cleanup arument parsing
- Loading branch information
1 parent
0e6f603
commit 97e694e
Showing
8 changed files
with
154 additions
and
226 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 |
---|---|---|
@@ -0,0 +1,75 @@ | ||
#!/bin/sh -xe | ||
|
||
############################################################################## | ||
## User set up variables | ||
## Root directory for CI | ||
dirRoot=/contrib/fv3 | ||
## Intel version to be used | ||
intelVersion=2023.2.0 | ||
############################################################################## | ||
## HPC-ME container | ||
container=/contrib/containers/noaa-intel-prototype_2023.09.25.sif | ||
container_env_script=/contrib/containers/load_spack_noaa-intel.sh | ||
############################################################################## | ||
|
||
#Parse Arguments | ||
branch=main | ||
commit="" | ||
while [[ $# -gt 0 ]]; do | ||
case $1 in | ||
-b|--branch) | ||
branch="$2" | ||
shift # past argument | ||
shift # past value | ||
;; | ||
-h|--hash) | ||
commit="$2" | ||
shift # past argument | ||
shift # past value | ||
;; | ||
-c|--config) | ||
config="$2" | ||
shift # past argument | ||
shift # past value | ||
-hy|--hydro) | ||
hydro="$2" | ||
shift # past argument | ||
shift # past value | ||
-b|--bit) | ||
bit="$2" | ||
shift # past argument | ||
shift # past value | ||
-m|--mode) | ||
mode="$2" | ||
shift # past argument | ||
shift # past value | ||
*) | ||
echo "unknown argument" | ||
exit 1 | ||
;; | ||
esac | ||
done | ||
|
||
if [ -z $mode | -z $bit | -z $hydro | -b $config ] | ||
then | ||
echo "must specify config, hydro, bit, and mode options for compile" | ||
exit 1 | ||
fi | ||
|
||
echo "branch is $branch" | ||
echo "commit is $commit" | ||
echo "mode is $mode" | ||
echo "bit is $bit" | ||
echo "hydro is $hydro" | ||
echo "config is $config" | ||
|
||
## Set up the directories | ||
testDir=${dirRoot}/${intelVersion}/SHiELD_build/${branch}/${commit} | ||
logDir=${testDir}/log | ||
# Set up build | ||
cd ${testDir}/SHiELD_build/Build | ||
#Define External Libs path | ||
export EXTERNAL_LIBS=${dirRoot}/${intelVersion}/SHiELD_build/externallibs | ||
# Build SHiELD | ||
set -o pipefail | ||
singularity exec -B /contrib ${container} ${container_env_script} "./COMPILE ${config} ${hydro} ${bit} ${mode} intel clean" |
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
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 was deleted.
Oops, something went wrong.
Oops, something went wrong.