-
Notifications
You must be signed in to change notification settings - Fork 132
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
Testing suite #9
Merged
eclare108213
merged 30 commits into
CICE-Consortium:master
from
mattdturner:testing_suite
Jun 27, 2017
Merged
Changes from 29 commits
Commits
Show all changes
30 commits
Select commit
Hold shift + click to select a range
095f3bf
Test scripts now write to README.case instead of a separate README.te…
34cd5f0
when checking for compile success, write PASS/FAIL to new test_output…
cfabe15
update cice.run.setup.csh to add the option to write PASS/FAIL inform…
0c87661
delete old cice.<test_nae>.csh scripts and replace with cice.test.csh…
576c0cb
Merge branch 'master' of https://github.com/mattdturner/CICE into tes…
b2aafa2
Move batch logic from cice.run.setup.csh and cice.test.csh to new cic…
5668668
Remove the requirement for -b or -bd to be provided when using create…
17d722d
Add the option to pass a test ID to create.case, which gets included …
f52288d
Modification to create.case to properly handle running tests where -b…
d2dbf28
Add a check in create.case to ensure that the test requested is one o…
0db5c73
Update cice.run.setup.csh to not overwrite the ice.restart_file point…
d224516
Create new exact restart test case.
2ddbdd9
Add new README.test file that gives instructions on running the test …
4b7b976
add CICE_MACHINE_BASELINE default baseline directory to env.<machine>…
a3c6c85
bugfix for cheyenne machine. Also added error if using unknown machine
473d158
Check return status of calls to cice.launch.csh and cice.batch.csh. …
91e432f
Update the documentation for the recent modifications to create.case
16b7c4b
Add output to beginning of cice.tests.csh that prints information abo…
ff71bdb
add default CICE_TEST and CICE_BASELINE variables to cice.settings file
5729c95
Assign a default testid. Add new baseCom (-bc) and baseGen (-bg) arg…
6482090
Add PASS/FAIL commands to cice.restart.csh after calls to cice.run. …
f5e4543
For restart test case, create.case now copies new test_nml.restart2 f…
374955d
add new test_nml.restart2 options file
356f958
Modify README.test to account for the recent updates to the testing s…
7716032
Add logic to handle cases where -bg and -bc are both passed. Bugfix …
39b3e56
Add test name as an argument. Add logic to handle regression runs. …
204fd6c
A few corrections in README.test. Also added a few clarifying statem…
cb845ef
Change diagfreq from once per year to daily for annual test case
5445671
Update the list of available tests in README.test to also specify the…
3984d99
Add information about the -testid flag to README.test
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,79 @@ | ||
CICE version 6 testing | ||
June 2017 | ||
|
||
This README file documents how to use the testing suite developed for the | ||
CICE Consortium sea ice model. The tests currently supported are: | ||
1. "Smoke" test - Ensures that the model compiles successfully and runs | ||
to completion for a 1 day simulation. Validation is | ||
determined by performing a binary comparison on restart | ||
files to a baseline dataset. This test is created by | ||
passing 'smoke' to the '-t' argument. | ||
2. 10-day test - Ensures that the model compiles successfully and runs | ||
to completion for a 10 day simulation. Validation is | ||
determined by performing a binary comparison on restart | ||
files to a baseline dataset. This test is created by | ||
passing '10day' to the '-t' argument. | ||
3. Exact restart - Ensures that the output from a cold-start simulation | ||
and a restart simulation provide bit-for-bit identical | ||
results. No baseline dataset needs to be created for | ||
this test, as the baseline and test datasets are computed | ||
at the same time. This test is created by passing 'restart' | ||
to the '-t' argument. | ||
4. Annual test - Ensures that the model compiles successfully and runs | ||
to completion for an annual simulation. Validation is | ||
determined by performing a binary comparison on restart | ||
files to a baseline dataset. This test is created by | ||
passing 'annual' to the '-t' argument. | ||
|
||
Please run './create.case -h' for additional details. | ||
|
||
--- To generate a baseline dataset for a test case --- | ||
|
||
Quickstart (example): | ||
|
||
./create.case -t smoke -m conrad -b | ||
cd smoke_gx3_conrad_4x1 | ||
./cice.build | ||
./cice.submit | ||
# After job finishes, check output | ||
cat test_output | ||
|
||
|
||
--- To run a test case and compare to a baseline dataset --- | ||
|
||
Quickstart (example): | ||
|
||
./create.case -t smoke -m conrad | ||
cd smoke_gx3_conrad_4x1.t00 | ||
./cice.build | ||
./cice.submit | ||
# After job finishes, check output | ||
cat test_output | ||
|
||
|
||
--- To run a regression test (compare cicev6.0.1 output to cicev6.0.0 output) --- | ||
|
||
Quickstart (example): | ||
|
||
./create.case -t smoke -m conrad -b -bg cicev6.0.1 -bc cicev6.0.0 | ||
cd smoke_gx3_conrad_4x1 | ||
./cice.build | ||
./cice.submit | ||
# After job finishes, check output | ||
cat test_output | ||
|
||
|
||
Additional Details: | ||
- The available options for '-t' are 'smoke', '10day', 'annual', and 'restart'. | ||
- For a 'restart' test, no baseline dataset needs to be generated or compared against. | ||
- The '-b' flag can be combined with '-bd' to specify the location where you | ||
want the baseline dataset to be written. Without specifying '-bd', the | ||
baseline dataset will be written to the default baseline directory found | ||
in the env.<machine> file (CICE_MACHINE_BASELINE). | ||
- If neither '-b' or '-bd' are passed, the scripts will look for baseline datasets | ||
in the default baseline directory found in the env.<machine> file (CICE_MACHINE_BASELINE). | ||
If the '-bd' option is passed, the scripts will look for baseline datasets in the | ||
location passed to the -bd argument. | ||
- To generate a baseline dataset for a specific version (for regression testing), | ||
use '-b' in conjunction to '-bg <version_name>'. The scripts will then place | ||
the baseline dataset in $CICE_MACHINE_BASELINE/<version_name>/ |
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 |
---|---|---|
@@ -1,12 +1,15 @@ | ||
#! /bin/csh -f | ||
|
||
echo ${0} | ||
if ( $1 != "" ) then | ||
echo ${0} ${1} | ||
else | ||
echo ${0} | ||
endif | ||
|
||
source ./cice.settings | ||
source ${CICE_CASEDIR}/env.${CICE_MACHINE} || exit 2 | ||
|
||
set jobfile = cice.10day | ||
set subfile = cice.submit | ||
set jobfile = $1 | ||
|
||
set ntasks = ${CICE_NTASKS} | ||
set nthrds = ${CICE_NTHRDS} | ||
|
@@ -24,9 +27,6 @@ if ($ptile > ${maxtpn} / 2) @ ptile = ${maxtpn} / 2 | |
|
||
#========================================== | ||
|
||
# Create test script that runs cice.build, cice.run, and validates | ||
#========================================== | ||
|
||
cat >! ${jobfile} << EOF0 | ||
#!/bin/csh -f | ||
EOF0 | ||
|
@@ -48,6 +48,20 @@ cat >> ${jobfile} << EOFB | |
#BSUB -P ${acct} | ||
EOFB | ||
|
||
#========================================== | ||
|
||
else if (${CICE_MACHINE} =~ cheyenne*) then | ||
cat >> ${jobfile} << EOFB | ||
#PBS -j oe | ||
#PBS -m ae | ||
#PBS -V | ||
#PBS -q regular | ||
#PBS -N ${CICE_CASENAME} | ||
#PBS -A ${CICE_ACCT} | ||
#PBS -l select=${nnodes}:ncpus=${ntasks}:mpiprocs=${ntasks} | ||
#PBS -l walltime=02:00:00 | ||
EOFB | ||
|
||
else if (${CICE_MACHINE} =~ thunder* || ${CICE_MACHINE} =~ gordon* || ${CICE_MACHINE} =~ conrad*) then | ||
cat >> ${jobfile} << EOFB | ||
#PBS -N ${CICE_CASENAME} | ||
|
@@ -78,88 +92,30 @@ EOFB | |
else if (${CICE_MACHINE} =~ wolf*) then | ||
cat >> ${jobfile} << EOFB | ||
#SBATCH -J ${CICE_CASENAME} | ||
#SBATCH -t 0:10:00 | ||
#SBATCH -t 0:45:00 | ||
#SBATCH -A ${acct} | ||
#SBATCH -N ${nnodes} | ||
#SBATCH -e slurm%j.err | ||
#SBATCH -o slurm%j.out | ||
#SBATCH --mail-type FAIL | ||
#SBATCH [email protected] | ||
###SBATCH --mail-type END,FAIL | ||
###SBATCH [email protected] | ||
#SBATCH --qos=low | ||
EOFB | ||
|
||
endif | ||
|
||
cat >> ${jobfile} << EOF2 | ||
cd ${CICE_CASEDIR} | ||
source ./cice.settings || exit 2 | ||
source ./env.\${CICE_MACHINE} || exit 2 | ||
|
||
# Compile the CICE code | ||
./cice.build | ||
set rc_build = \$? | ||
|
||
# Run the CICE model | ||
./cice.run | ||
set rc_run = \$? | ||
|
||
EOF2 | ||
|
||
if ($1 != "") then | ||
cat >> ${jobfile} << EOF3 | ||
# Get the final output filename | ||
foreach file (\${CICE_RUNDIR}/restart/*) | ||
set test_data = \$file | ||
end | ||
|
||
set baseline_data = $1/\$test_data:t | ||
|
||
if ( { cmp -s \$test_data \$baseline_data } ) then | ||
set rc_valid = 0 | ||
else | ||
set rc_valid = 1 | ||
endif | ||
EOF3 | ||
endif | ||
|
||
cat >> ${jobfile} << EOF4 | ||
|
||
if (\$rc_build == 0) then | ||
echo "Build: [0;92mPASS[0;0m" | ||
else | ||
echo "Build: [0;41mFAIL[0;0m" | ||
endif | ||
|
||
if (\$rc_run == 0) then | ||
echo "Run: [0;92mPASS[0;0m" | ||
else | ||
echo "Run: [0;41mFAIL[0;0m" | ||
endif | ||
EOF4 | ||
|
||
if ($1 != "") then | ||
cat >> ${jobfile} << EOF5 | ||
else if (${CICE_MACHINE} =~ pinto*) then | ||
cat >> ${jobfile} << EOFB | ||
#SBATCH -J ${CICE_CASENAME} | ||
#SBATCH -t 0:45:00 | ||
#SBATCH -A ${acct} | ||
#SBATCH -N ${nnodes} | ||
#SBATCH -e slurm%j.err | ||
#SBATCH -o slurm%j.out | ||
###SBATCH --mail-type END,FAIL | ||
###SBATCH [email protected] | ||
#SBATCH --qos=standby | ||
EOFB | ||
|
||
if (\$rc_valid == 0) then | ||
echo "Validation: [0;92mPASS[0;0m" | ||
else | ||
echo "Validation: [0;41mFAIL[0;0m" | ||
endif | ||
EOF5 | ||
echo "${0} ERROR ${CICE_MACHINE} unknown" | ||
exit -1 | ||
endif | ||
|
||
#========================================== | ||
|
||
chmod +x ${jobfile} | ||
|
||
#========================================== | ||
|
||
cat >! ${subfile} << EOFS | ||
#!/bin/csh -f | ||
|
||
${CICE_MACHINE_SUBMIT} ${jobfile} | ||
echo "\`date\` \${0}: ${CICE_CASENAME} job submitted" >> ${CICE_CASEDIR}/README.test | ||
|
||
EOFS | ||
|
||
chmod +x ${subfile} |
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,56 @@ | ||
#! /bin/csh -f | ||
|
||
echo ${0} | ||
|
||
source ./cice.settings | ||
|
||
set jobfile = $1 | ||
|
||
set ntasks = ${CICE_NTASKS} | ||
set nthrds = ${CICE_NTHRDS} | ||
|
||
#========================================== | ||
|
||
if (${CICE_MACHINE} =~ yellowstone*) then | ||
cat >> ${jobfile} << EOFR | ||
setenv MP_TASK_AFFINITY core:\${OMP_NUM_THREADS} | ||
mpirun.lsf ./cice >&! \$CICE_RUNLOG_FILE | ||
EOFR | ||
|
||
else if (${CICE_MACHINE} =~ cheyenne*) then | ||
cat >> ${jobfile} << EOFR | ||
mpiexec_mpt -n ${ntasks} ./cice >&! \$CICE_RUNLOG_FILE | ||
EOFR | ||
|
||
else if (${CICE_MACHINE} =~ thunder*) then | ||
cat >> ${jobfile} << EOFR | ||
mpiexec_mpt -np ${ntasks} omplace ./cice >&! \$CICE_RUNLOG_FILE | ||
EOFR | ||
|
||
else if (${CICE_MACHINE} =~ gordon* || ${CICE_MACHINE} =~ conrad*) then | ||
cat >> ${jobfile} << EOFR | ||
aprun -n ${ntasks} -N ${ntasks} -d ${nthrds} ./cice >&! \$CICE_RUNLOG_FILE | ||
EOFR | ||
|
||
else if (${CICE_MACHINE} =~ cori*) then | ||
cat >> ${jobfile} << EOFR | ||
srun -n ${ntasks} -c ${nthrds} ./cice >&! \$CICE_RUNLOG_FILE | ||
EOFR | ||
|
||
else if (${CICE_MACHINE} =~ wolf*) then | ||
cat >> ${jobfile} << EOFR | ||
mpirun -np ${ntasks} ./cice >&! \$CICE_RUNLOG_FILE | ||
EOFR | ||
|
||
else if (${CICE_MACHINE} =~ pinto*) then | ||
cat >> ${jobfile} << EOFR | ||
mpirun -np ${ntasks} ./cice >&! \$CICE_RUNLOG_FILE | ||
EOFR | ||
#cat >> ${jobfile} << EOFR | ||
#srun -n ${ntasks} -c ${nthrds} ./cice >&! \$CICE_RUNLOG_FILE | ||
#EOFR | ||
|
||
else | ||
echo "${0} ERROR ${CICE_MACHINE} unknown" | ||
exit -1 | ||
endif |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
add the actual arguments needed for -t (smoke, 10day, restart, annual)