diff --git a/configuration/scripts/cice.batch.csh b/configuration/scripts/cice.batch.csh index 84626d3b6..45b26d79b 100755 --- a/configuration/scripts/cice.batch.csh +++ b/configuration/scripts/cice.batch.csh @@ -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} diff --git a/configuration/scripts/cice.settings b/configuration/scripts/cice.settings index 51af86a5c..bc7882752 100755 --- a/configuration/scripts/cice.settings +++ b/configuration/scripts/cice.settings @@ -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 #====================================================== diff --git a/configuration/scripts/machines/env.cheyenne b/configuration/scripts/machines/env.cheyenne index fc63fa67a..745af74b7 100755 --- a/configuration/scripts/machines/env.cheyenne +++ b/configuration/scripts/machines/env.cheyenne @@ -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 diff --git a/configuration/scripts/machines/env.conrad b/configuration/scripts/machines/env.conrad index e45cc978c..a9c3ab4c0 100755 --- a/configuration/scripts/machines/env.conrad +++ b/configuration/scripts/machines/env.conrad @@ -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 diff --git a/configuration/scripts/machines/env.cori b/configuration/scripts/machines/env.cori index b0df90384..63958ad0d 100755 --- a/configuration/scripts/machines/env.cori +++ b/configuration/scripts/machines/env.cori @@ -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 diff --git a/configuration/scripts/machines/env.gordon b/configuration/scripts/machines/env.gordon index 2f88e3b28..05a736def 100755 --- a/configuration/scripts/machines/env.gordon +++ b/configuration/scripts/machines/env.gordon @@ -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 diff --git a/configuration/scripts/machines/env.onyx b/configuration/scripts/machines/env.onyx index ee6a9e5ac..125685b80 100755 --- a/configuration/scripts/machines/env.onyx +++ b/configuration/scripts/machines/env.onyx @@ -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 diff --git a/configuration/scripts/machines/env.pinto b/configuration/scripts/machines/env.pinto index a10dbdaff..a7e98342c 100755 --- a/configuration/scripts/machines/env.pinto +++ b/configuration/scripts/machines/env.pinto @@ -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 diff --git a/configuration/scripts/machines/env.testmachine b/configuration/scripts/machines/env.testmachine index 6df627048..c4517cf9b 100755 --- a/configuration/scripts/machines/env.testmachine +++ b/configuration/scripts/machines/env.testmachine @@ -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 diff --git a/configuration/scripts/machines/env.thunder b/configuration/scripts/machines/env.thunder index b1f3ba56d..395b99435 100755 --- a/configuration/scripts/machines/env.thunder +++ b/configuration/scripts/machines/env.thunder @@ -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 diff --git a/configuration/scripts/machines/env.wolf b/configuration/scripts/machines/env.wolf index 144a2ba5f..08ad4fc98 100755 --- a/configuration/scripts/machines/env.wolf +++ b/configuration/scripts/machines/env.wolf @@ -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 diff --git a/configuration/scripts/machines/env.yellowstone b/configuration/scripts/machines/env.yellowstone index d38c92287..5e911f890 100755 --- a/configuration/scripts/machines/env.yellowstone +++ b/configuration/scripts/machines/env.yellowstone @@ -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 diff --git a/configuration/scripts/run.suite b/configuration/scripts/run.suite index 30538fae4..c405fdae9 100755 --- a/configuration/scripts/run.suite +++ b/configuration/scripts/run.suite @@ -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 @@ -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.) -m machine, machine name (required) Available -m options are in configuration/scripts/machines and include: EOF1 @@ -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 @@ -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 "---" diff --git a/create.case b/create.case index d176aabbc..fe7c7ee91 100755 --- a/create.case +++ b/create.case @@ -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 @@ -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.) -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: @@ -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 @@ -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