Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add an option to pass an account number (-a) via create.case. #56

Merged
merged 1 commit into from
Dec 21, 2017
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion configuration/scripts/cice.batch.csh
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ set jobfile = $1
set ntasks = ${ICE_NTASKS}
set nthrds = ${ICE_NTHRDS}
set maxtpn = ${ICE_MACHINE_TPNODE}
set acct = ${ICE_MACHINE_ACCT}
set acct = ${ICE_ACCOUNT}

@ taskpernode = ${maxtpn} / $nthrds
@ nnodes = ${ntasks} / ${taskpernode}
Expand Down
1 change: 1 addition & 0 deletions configuration/scripts/cice.settings
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@ setenv ICE_BASECOM undefined
setenv ICE_BFBCOMP undefined
setenv ICE_SPVAL undefined
setenv ICE_RUNLENGTH 00:10:00
setenv ICE_ACCOUNT undefined

#======================================================

Expand Down
5 changes: 0 additions & 5 deletions configuration/scripts/machines/env.cheyenne
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,3 @@ setenv ICE_MACHINE_SUBMIT "qsub"
setenv ICE_MACHINE_TPNODE 36
setenv ICE_MACHINE_ACCT P0000000
setenv ICE_MACHINE_BLDTHRDS 1

if (-e ~/.cice_proj) then
set account_name = `head -1 ~/.cice_proj`
setenv ICE_MACHINE_ACCT ${account_name}
endif
7 changes: 1 addition & 6 deletions configuration/scripts/machines/env.conrad
Original file line number Diff line number Diff line change
Expand Up @@ -37,11 +37,6 @@ setenv ICE_MACHINE_WKDIR $WORKDIR/CICE_RUNS
setenv ICE_MACHINE_INPUTDATA /p/work1/RASM_data/cice_consortium
setenv ICE_MACHINE_BASELINE ~/CICE_BASELINE
setenv ICE_MACHINE_SUBMIT "qsub "
setenv ICE_MACHINE_ACCT ARLAP96070PET
setenv ICE_MACHINE_ACCT P00000000
setenv ICE_MACHINE_TPNODE 32 # tasks per node
setenv ICE_MACHINE_BLDTHRDS 4

if (-e ~/.cice_proj) then
set account_name = `head -1 ~/.cice_proj`
setenv ICE_MACHINE_ACCT ${account_name}
endif
5 changes: 0 additions & 5 deletions configuration/scripts/machines/env.cori
Original file line number Diff line number Diff line change
Expand Up @@ -42,8 +42,3 @@ setenv ICE_MACHINE_SUBMIT "sbatch "
setenv ICE_MACHINE_ACCT P00000000
setenv ICE_MACHINE_TPNODE 32 # tasks per node
setenv ICE_MACHINE_BLDTHRDS 4

if (-e ~/.cice_proj) then
set account_name = `head -1 ~/.cice_proj`
setenv ICE_MACHINE_ACCT ${account_name}
endif
5 changes: 0 additions & 5 deletions configuration/scripts/machines/env.gordon
Original file line number Diff line number Diff line change
Expand Up @@ -40,8 +40,3 @@ setenv ICE_MACHINE_SUBMIT "qsub "
setenv ICE_MACHINE_ACCT P00000000
setenv ICE_MACHINE_TPNODE 32 # tasks per node
setenv ICE_MACHINE_BLDTHRDS 4

if (-e ~/.cice_proj) then
set account_name = `head -1 ~/.cice_proj`
setenv ICE_MACHINE_ACCT ${account_name}
endif
7 changes: 1 addition & 6 deletions configuration/scripts/machines/env.onyx
Original file line number Diff line number Diff line change
Expand Up @@ -37,11 +37,6 @@ setenv ICE_MACHINE_WKDIR $WORKDIR/CICE_RUNS
setenv ICE_MACHINE_INPUTDATA /p/home/turner/CICE-atm/
setenv ICE_MACHINE_BASELINE $WORKDIR/CICE_BASELINE
setenv ICE_MACHINE_SUBMIT "qsub "
setenv ICE_MACHINE_ACCT ARLAP96070PET
setenv ICE_MACHINE_ACCT P00000000
setenv ICE_MACHINE_TPNODE 44 # tasks per node
setenv ICE_MACHINE_BLDTHRDS 12

if (-e ~/.cice_proj) then
set account_name = `head -1 ~/.cice_proj`
setenv ICE_MACHINE_ACCT ${account_name}
endif
5 changes: 0 additions & 5 deletions configuration/scripts/machines/env.pinto
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,3 @@ setenv ICE_MACHINE_SUBMIT "sbatch "
setenv ICE_MACHINE_ACCT climateacme
setenv ICE_MACHINE_TPNODE 16
setenv ICE_MACHINE_BLDTHRDS 1

if (-e ~/.cice_proj) then
set account_name = `head -1 ~/.cice_proj`
setenv ICE_MACHINE_ACCT ${account_name}
endif
5 changes: 0 additions & 5 deletions configuration/scripts/machines/env.testmachine
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,3 @@ setenv ICE_MACHINE_SUBMIT "qsub"
setenv ICE_MACHINE_TPNODE 4
setenv ICE_MACHINE_ACCT P0000000
setenv ICE_MACHINE_BLDTHRDS 1

if (-e ~/.cice_proj) then
set account_name = `head -1 ~/.cice_proj`
setenv ICE_MACHINE_ACCT ${account_name}
endif
5 changes: 0 additions & 5 deletions configuration/scripts/machines/env.thunder
Original file line number Diff line number Diff line change
Expand Up @@ -34,8 +34,3 @@ setenv ICE_MACHINE_SUBMIT "qsub "
setenv ICE_MACHINE_ACCT P00000000
setenv ICE_MACHINE_TPNODE 36 # tasks per node
setenv ICE_MACHINE_BLDTHRDS 4

if (-e ~/.cice_proj) then
set account_name = `head -1 ~/.cice_proj`
setenv ICE_MACHINE_ACCT ${account_name}
endif
5 changes: 0 additions & 5 deletions configuration/scripts/machines/env.wolf
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,3 @@ setenv ICE_MACHINE_SUBMIT "sbatch "
setenv ICE_MACHINE_ACCT climateacme
setenv ICE_MACHINE_TPNODE 16
setenv ICE_MACHINE_BLDTHRDS 1

if (-e ~/.cice_proj) then
set account_name = `head -1 ~/.cice_proj`
setenv ICE_MACHINE_ACCT ${account_name}
endif
5 changes: 0 additions & 5 deletions configuration/scripts/machines/env.yellowstone
Original file line number Diff line number Diff line change
Expand Up @@ -30,8 +30,3 @@ setenv ICE_MACHINE_SUBMIT "bsub < "
setenv ICE_MACHINE_ACCT P00000000
setenv ICE_MACHINE_TPNODE 32
setenv ICE_MACHINE_BLDTHRDS 4

if (-e ~/.cice_proj) then
set account_name = `head -1 ~/.cice_proj`
setenv ICE_MACHINE_ACCT ${account_name}
endif
21 changes: 18 additions & 3 deletions configuration/scripts/run.suite
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,8 @@ set spval = "UnDeFiNeD"
set mach = $spval
set baseCom = $spval
set baseGen = $spval
set testid = $spval
set acct = $spval

if ($#argv < 1) then
set helpheader = 1
Expand Down Expand Up @@ -38,6 +40,7 @@ NAME
3. Run the full base_suite
4. Post the results of the suite to CDash
-h help
-1 account number for queue manager (default is defined in env.<machine>)
-m machine, machine name (required)
Available -m options are in configuration/scripts/machines and include:
EOF1
Expand Down Expand Up @@ -83,6 +86,9 @@ while (1)
case "-m":
set mach = $argv[1]
breaksw
case "-a":
set acct = $argv[1]
breaksw
case "-bc":
set baseCom = $argv[1]
breaksw
Expand Down Expand Up @@ -117,10 +123,19 @@ git clone --recursive https://github.com/CICE-Consortium/CICE.git $gitDir
cd $gitDir

echo "Running ./create.case"
if ($baseGen == $spval) then
./create.case -m ${mach} -ts base_suite -testid ${testid} -bc ${baseCom} -report
if ($acct = $spval) then
if ($baseGen == $spval) then
./create.case -m ${mach} -ts base_suite -testid ${testid} -bc ${baseCom} -report
else
./create.case -m ${mach} -ts base_suite -testid ${testid} -bc ${baseCom} -bg ${baseGen} -report
endif
else
./create.case -m ${mach} -ts base_suite -testid ${testid} -bc ${baseCom} -bg ${baseGen} -report
if ($baseGen == $spval) then
./create.case -m ${mach} -ts base_suite -testid ${testid} -bc ${baseCom} -report -a $acct
else
./create.case -m ${mach} -ts base_suite -testid ${testid} -bc ${baseCom} -bg ${baseGen} \
-report -a $acct
endif
endif

echo "---"
Expand Down
16 changes: 16 additions & 0 deletions create.case
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ set sets = ""
set bdir = $spval
set testid = $spval
set testsuite = $spval
set acct = $spval
set baseCom = $spval # Baseline compare
set baseGen = $spval # Baseline generate
set bfbcomp = $spval # BFB compare
Expand Down Expand Up @@ -57,6 +58,7 @@ EOF1
end
cat << EOF1
-p tasks x threads, mxn (default is 4x1)
-a account number for the queue manager (default is defined in env.<machine>)
-g grid, grid (default = gx3)
-s build and namelist mod files, comma separated with no spaces (default = " ")
Available -s options are in configuration/scripts/options and include:
Expand Down Expand Up @@ -142,6 +144,9 @@ while (1)
case "-p":
set pesx = $argv[1]
breaksw
case "-a":
set acct = $argv[1]
breaksw
case "-s":
set sets = $argv[1]
breaksw
Expand Down Expand Up @@ -451,6 +456,17 @@ else
echo "setenv ICE_TESTNAME ${spval}" >> ${fsmods}
endif

if ($acct != $spval) then
echo "setenv ICE_ACCOUNT ${acct}" >> ${fsmods}
else
if(-e ~/.cice_proj) then
set account_name = `head -1 ~/.cice_proj`
echo "setenv ICE_ACCOUNT ${account_name}" >> ${fsmods}
else
echo "setenv ICE_ACCOUNT ${ICE_MACHINE_ACCT}" >> ${fsmods}
endif
endif

if ($sets != "") then
set setsx = `echo $sets | sed 's/,/ /g'`
else
Expand Down