You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I had some trouble with our new compiler installation that does not like to be initialized twice, which is the case with tests (and thus suites) because env.$machine_$compiler is sourced by cice.test and then again in cice.run (which is ran form cice.test).
In anycase it should make everything slightly faster if the environment setup is done only once.
So basically, something like this:
diff --git i/configuration/scripts/tests/test_decomp.script w/configuration/scripts/tests/test_decomp.script
index bc45e3c..2b5d630 100644
--- i/configuration/scripts/tests/test_decomp.script+++ w/configuration/scripts/tests/test_decomp.script@@ -26,7 +26,7 @@ foreach decomp (${decomps})
${ICE_CASEDIR}/casescripts/parse_namelist.sh ice_in ${ICE_CASEDIR}/casescripts/set_nml.d${decomp}
cp ice_in ice_in.${decomp}
- ./cice.run+ ./cice.run -nomodules
set res="$status"
set grade = FAIL
diff --git i/configuration/scripts/tests/test_logbfb.script w/configuration/scripts/tests/test_logbfb.script
index 0ac1ed2..7e8948c 100644
--- i/configuration/scripts/tests/test_logbfb.script+++ w/configuration/scripts/tests/test_logbfb.script@@ -3,7 +3,7 @@
# Run the CICE model
# cice.run returns -1 if run did not complete successfully
-./cice.run+./cice.run -nomodules
set res="$status"
set log_file = `ls -t1 ${ICE_RUNDIR}/cice.runlog* | head -1`
diff --git i/configuration/scripts/tests/test_qcchk.script w/configuration/scripts/tests/test_qcchk.script
index 81b5f05..1ccadaa 100644
--- i/configuration/scripts/tests/test_qcchk.script+++ w/configuration/scripts/tests/test_qcchk.script@@ -6,7 +6,7 @@ cp ${ICE_SANDBOX}/configuration/scripts/tests/QC/CICE_Lookup_Table_p0.8_n1825.nc
# Run the CICE model
# cice.run returns -1 if run did not complete successfully
-./cice.run+./cice.run -nomodules
set res="$status"
set log_file = `ls -t1 ${ICE_RUNDIR}/cice.runlog* | head -1`
diff --git i/configuration/scripts/tests/test_qcchkf.script w/configuration/scripts/tests/test_qcchkf.script
index 81b5f05..1ccadaa 100644
--- i/configuration/scripts/tests/test_qcchkf.script+++ w/configuration/scripts/tests/test_qcchkf.script@@ -6,7 +6,7 @@ cp ${ICE_SANDBOX}/configuration/scripts/tests/QC/CICE_Lookup_Table_p0.8_n1825.nc
# Run the CICE model
# cice.run returns -1 if run did not complete successfully
-./cice.run+./cice.run -nomodules
set res="$status"
set log_file = `ls -t1 ${ICE_RUNDIR}/cice.runlog* | head -1`
diff --git i/configuration/scripts/tests/test_restart.script w/configuration/scripts/tests/test_restart.script
index 59729b3..74f97d1 100644
--- i/configuration/scripts/tests/test_restart.script+++ w/configuration/scripts/tests/test_restart.script@@ -7,7 +7,7 @@ cp ice_in ice_in.0
${ICE_CASEDIR}/casescripts/parse_namelist.sh ice_in ${ICE_CASEDIR}/casescripts/test_nml.restart1
cp ice_in ice_in.1
-./cice.run+./cice.run -nomodules
set res="$status"
if ( $res != 0 ) then
@@ -44,7 +44,7 @@ perl -i -pe's/(\d{4})-(\d{2})-(\d{2})/sprintf("%04d-%02d-%02d",$1,$2,$3-5)/e' ${
${ICE_CASEDIR}/casescripts/parse_namelist.sh ice_in ${ICE_CASEDIR}/casescripts/test_nml.restart2
cp ice_in ice_in.2
-./cice.run+./cice.run -nomodules
set res="$status"
cp ice_in.0 ice_in
diff --git i/configuration/scripts/tests/test_smoke.script w/configuration/scripts/tests/test_smoke.script
index 015b0b5..62b57d3 100644
--- i/configuration/scripts/tests/test_smoke.script+++ w/configuration/scripts/tests/test_smoke.script@@ -3,7 +3,7 @@
# Run the CICE model
# cice.run returns -1 if run did not complete successfully
-./cice.run+./cice.run -nomodules
set res="$status"
set log_file = `ls -t1 ${ICE_RUNDIR}/cice.runlog* | head -1`
diff --git i/configuration/scripts/tests/test_unittest.script w/configuration/scripts/tests/test_unittest.script
index 1db8dfe..6e2eae0 100644
--- i/configuration/scripts/tests/test_unittest.script+++ w/configuration/scripts/tests/test_unittest.script@@ -3,7 +3,7 @@
# Run the CICE model
# cice.run returns -1 if run did not complete successfully
-./cice.run+./cice.run -nomodules
set rres="$status"
set log_file = `ls -t1 ${ICE_RUNDIR}/cice.runlog* | head -1`
is all that should be required. I tested it and it works.
Some compiler environments (namely newer version of Intel's oneAPI
toolkit) prevent users form sourcing their initialization script twice,
at least by default.
The CICE test infrastructure currently does this, because
env.$machine_$env is sourced by cice.test and then again by cice.run
(which is ran from cice.test). Sourcing the env file in 'cice.run', when
ran from 'cice.test', is thus unnecessary.
Most env files already support the '-nomodules' flag, which is used by
'cice.setup' when only machine variables are needed, and not a full
compiling environment. Leverage this flag by calling 'cice.run' with
'-nomodules' in 'cice.test'. As a byprodcut, this should make tests run
slightly faster since the environment setup is done only once.
Closes: CICE-Consortium#695
I had some trouble with our new compiler installation that does not like to be initialized twice, which is the case with tests (and thus suites) because
env.$machine_$compiler
is sourced bycice.test
and then again incice.run
(which is ran formcice.test
).In anycase it should make everything slightly faster if the environment setup is done only once.
So basically, something like this:
is all that should be required. I tested it and it works.
@apcraig
The text was updated successfully, but these errors were encountered: