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 MACHINFO and ENVINFO to env files #466

Merged
merged 6 commits into from
Jun 16, 2020
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
42 changes: 22 additions & 20 deletions cice.setup
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ set dash = "-"
set spval = "UnDeFiNeD"
set machcomp = ${spval}
set machine = ${spval}
set compilers = intel
set envnames = intel
set case = ${spval}
set test = ${spval}
set grid = gx3
Expand Down Expand Up @@ -93,7 +93,7 @@ DESCRIPTION
--setvers : updates cice version number in sandbox
--case, -c : case, case directory/name (not with --test or --suite)
--mach, -m : machine, machine name (required)
--env, -e : compiler(s), comma separated (default = $compilers)
--env, -e : envname(s), comma separated (default = $envnames)
--pes, -p : tasks x threads [x blocksize_x x blocksize_y [x maxblocks]] (default is ${pesx})
--acct : account number for the batch submission
--grid, -g : grid, grid (default = ${grid})
Expand Down Expand Up @@ -281,7 +281,7 @@ while (1)
else if ("$option" =~ --mach* || "$option" == "-m") then
set machine = $argv[1]
else if ("$option" =~ --env* || "$option" == "-e") then
set compilers = $argv[1]
set envnames = $argv[1]
else if ("$option" == "--test") then
set test = $argv[1]
set dotest = 1
Expand Down Expand Up @@ -341,7 +341,7 @@ if ($codecov == 1 && $report == 1) then
exit -1
endif

if ($codecov == 1 && "$compilers" != "gnu") then
if ($codecov == 1 && "$envnames" != "gnu") then
echo "${0}: ERROR in arguments, must use --env gnu with --codecov"
exit -1
endif
Expand All @@ -360,12 +360,12 @@ if (${dosuite} == 0) then
echo "${0}: ERROR in arguments, must use --suite with --codecov"
exit -1
endif
if ("$compilers" =~ "*,*") then
echo "${0}: ERROR in arguments, cannot set multiple compilers without --suite"
if ("$envnames" =~ "*,*") then
echo "${0}: ERROR in arguments, cannot set multiple envnames without --suite"
exit -1
else
set compiler = ${compilers}
set machcomp = ${machine}_${compiler}
set envname = ${envnames}
set machcomp = ${machine}_${envname}
endif
endif

Expand Down Expand Up @@ -529,12 +529,12 @@ endif
#-------------------------------------------------------------------
# Loop over cases/tests

set ncompilers = "`echo $compilers | sed -e 's/,/ /g'`"
set nenvnames = "`echo $envnames | sed -e 's/,/ /g'`"

# check that machines and compilers are valid before starting big loop
# check that machines and envnames are valid before starting big loop
set doabort = false
foreach compiler ( $ncompilers )
set machcomp = ${machine}_${compiler}
foreach envname ( $nenvnames )
set machcomp = ${machine}_${envname}
foreach file (env.${machcomp} Macros.${machcomp})
if !(-e ${ICE_SCRIPTS}/machines/$file) then
echo "${0}: ERROR, ${ICE_SCRIPTS}/machines/$file not found"
Expand All @@ -549,8 +549,8 @@ endif
# Create a new sets_base variable to store sets passed to cice.setup
set sets_base = "${sets}"
set bfbcomp_base = "$bfbcomp"
foreach compiler ( $ncompilers )
set machcomp = ${machine}_${compiler}
foreach envname ( $nenvnames )
set machcomp = ${machine}_${envname}
foreach line ( "`cat $tsfile`" )

# Check if line is a comment line
Expand All @@ -573,12 +573,14 @@ EOF
endif

# unset env variables that might not exist in env machine file
# to avoid any carry over during multi compiler suites
# to avoid any carry over during multi envname suites
unsetenv ICE_MACHINE_MAXTHREADS
unsetenv ICE_MACHINE_MAXPES
unsetenv ICE_MACHINE_QUIETMODE
unsetenv ICE_MACHINE_CPPDEFS
unsetenv ICE_MACHINE_QSTAT
unsetenv ICE_MACHINE_MACHINFO
unsetenv ICE_MACHINE_ENVINFO
source ${ICE_SCRIPTS}/machines/env.${machcomp} -nomodules || exit 2

# Obtain the test name, sets, grid, and PE information from .ts file
Expand Down Expand Up @@ -832,7 +834,7 @@ EOF
echo "ICE_CASENAME = ${casename}"
echo "ICE_CASEDIR = ${casedir}"
echo "ICE_MACHINE = ${machine}"
echo "ICE_COMPILER = ${compiler}"
echo "ICE_ENVNAME = ${envname}"
echo "ICE_RUNDIR = ${rundir}"
echo "ICE_PES = ${task}x${thrd}"
echo "ICE_GRID = ${grid} (${ICE_DECOMP_NXGLOB}x${ICE_DECOMP_NYGLOB}) blocksize=${ICE_DECOMP_BLCKX}x${ICE_DECOMP_BLCKY}x${ICE_DECOMP_MXBLCKS}"
Expand Down Expand Up @@ -886,7 +888,7 @@ setenv ICE_SCRIPTS ${ICE_SCRIPTS}
setenv ICE_CASENAME ${casename}
setenv ICE_CASEDIR ${casedir}
setenv ICE_MACHINE ${machine}
setenv ICE_COMPILER ${compiler}
setenv ICE_ENVNAME ${envname}
setenv ICE_MACHCOMP ${machcomp}
setenv ICE_RUNDIR ${rundir}
setenv ICE_GRID ${grid}
Expand Down Expand Up @@ -1044,7 +1046,7 @@ cd ${testname_base}
source ./cice.settings
if (\${dobuild} == true) then
if (\${doreuse} == true) then
set ciceexe = "../ciceexe.\${ICE_COMPILER}.\${ICE_COMMDIR}.\${ICE_BLDDEBUG}.\${ICE_THREADED}.\${ICE_IOTYPE}"
set ciceexe = "../ciceexe.\${ICE_ENVNAME}.\${ICE_COMMDIR}.\${ICE_BLDDEBUG}.\${ICE_THREADED}.\${ICE_IOTYPE}"
./cice.build --exe \${ciceexe}
if !(-e \${ciceexe}) cp -p \${ICE_RUNDIR}/cice \${ciceexe}
else
Expand All @@ -1069,7 +1071,7 @@ EOF

# This is the foreach end for the testsuite
end
# This is the foreach end for the compilers
# This is the foreach end for the envnames
end

#-----------------------------------------------------
Expand All @@ -1086,7 +1088,7 @@ EOF0

# Add code to results.csh to count the number of failures
cat >> ${tsdir}/results.csh << EOF
cat ./results.log
cat ./results.log | grep -iv "#machinfo" | grep -iv "#envinfo"
set pends = \`cat ./results.log | grep PEND | wc -l\`
set misses = \`cat ./results.log | grep MISS | wc -l\`
set failures = \`cat ./results.log | grep FAIL | wc -l\`
Expand Down
14 changes: 1 addition & 13 deletions configuration/scripts/cice.batch.csh
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@ cat >> ${jobfile} << EOFB
#PBS -l walltime=${batchtime}
EOFB

else if (${ICE_MACHINE} =~ thunder* || ${ICE_MACHINE} =~ gordon* || ${ICE_MACHINE} =~ conrad* || ${ICE_MACHINE} =~ gaffney* || ${ICE_MACHINE} =~ koehr* || ${ICE_MACHINE} =~ mustang) then
else if (${ICE_MACHINE} =~ gordon* || ${ICE_MACHINE} =~ conrad* || ${ICE_MACHINE} =~ gaffney* || ${ICE_MACHINE} =~ koehr* || ${ICE_MACHINE} =~ mustang) then
cat >> ${jobfile} << EOFB
#PBS -N ${shortcase}
#PBS -q ${queue}
Expand Down Expand Up @@ -146,18 +146,6 @@ cat >> ${jobfile} << EOFB
#SBATCH --qos=standby
EOFB

else if (${ICE_MACHINE} =~ loft*) then
cat >> ${jobfile} << EOFB
#PBS -N ${shortcase}
#PBS -q ${queue}
#PBS -A ${acct}
#PBS -l select=${nnodes}:ncpus=${maxtpn}:mpiprocs=${taskpernode}
#PBS -l walltime=${batchtime}
#PBS -j oe
###PBS -M [email protected]
###PBS -m be
EOFB

else if (${ICE_MACHINE} =~ fram*) then
cat >> ${jobfile} << EOFB
#SBATCH -J ${ICE_CASENAME}
Expand Down
8 changes: 4 additions & 4 deletions configuration/scripts/cice.build
Original file line number Diff line number Diff line change
Expand Up @@ -96,12 +96,12 @@ endif
source ./cice.settings
source ${ICE_CASEDIR}/env.${ICE_MACHCOMP} || exit 2

if (${ICE_MACHINE} != ${ICE_MACHINE_ENVNAME}) then
echo "WARNING, is ICE_MACHINE setting OK, ${ICE_MACHINE}, ${ICE_MACHINE_ENVNAME}"
if (${ICE_MACHINE} != ${ICE_MACHINE_MACHNAME}) then
echo "WARNING, is ICE_MACHINE setting OK, ${ICE_MACHINE}, ${ICE_MACHINE_MACHNAME}"
endif

if (${ICE_COMPILER} != ${ICE_MACHINE_COMPILER}) then
echo "WARNING, is ICE_COMPILER setting OK, ${ICE_COMPILER}, ${ICE_MACHINE_COMPILER}"
if (${ICE_ENVNAME} != ${ICE_MACHINE_ENVNAME}) then
echo "WARNING, is ICE_ENVNAME setting OK, ${ICE_ENVNAME}, ${ICE_MACHINE_ENVNAME}"
endif

echo " "
Expand Down
23 changes: 0 additions & 23 deletions configuration/scripts/cice.launch.csh
Original file line number Diff line number Diff line change
Expand Up @@ -45,18 +45,6 @@ mpiexec -n ${ntasks} ./cice >&! \$ICE_RUNLOG_FILE
EOFR
endif

#=======
else if (${ICE_MACHINE} =~ thunder*) then
if (${ICE_COMMDIR} =~ serial*) then
cat >> ${jobfile} << EOFR
./cice >&! \$ICE_RUNLOG_FILE
EOFR
else
cat >> ${jobfile} << EOFR
mpiexec_mpt -np ${ntasks} omplace ./cice >&! \$ICE_RUNLOG_FILE
EOFR
endif

#=======
else if (${ICE_MACHINE} =~ gaffney* || ${ICE_MACHINE} =~ koehr* || ${ICE_MACHINE} =~ mustang*) then
if (${ICE_COMMDIR} =~ serial*) then
Expand Down Expand Up @@ -105,17 +93,6 @@ mpirun -np ${ntasks} ./cice >&! \$ICE_RUNLOG_FILE
EOFR
endif

#=======
else if (${ICE_MACHINE} =~ loft*) then
if (${ICE_COMMDIR} =~ serial*) then
cat >> ${jobfile} << EOFR
./cice >&! \$ICE_RUNLOG_FILE
EOFR
else
cat >> ${jobfile} << EOFR
aprun -n ${ntasks} -N ${taskpernodelimit} -d ${nthrds} ./cice >&! \$ICE_RUNLOG_FILE
EOFR
endif
#=======
else if (${ICE_MACHINE} =~ fram*) then
if (${ICE_COMMDIR} =~ serial*) then
Expand Down
2 changes: 1 addition & 1 deletion configuration/scripts/cice.settings
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
setenv ICE_CASENAME undefined
setenv ICE_SANDBOX undefined
setenv ICE_MACHINE undefined
setenv ICE_COMPILER undefined
setenv ICE_ENVNAME undefined
setenv ICE_MACHCOMP undefined
setenv ICE_SCRIPTS undefined
setenv ICE_CASEDIR undefined
Expand Down
64 changes: 0 additions & 64 deletions configuration/scripts/machines/Macros.loft_gnu

This file was deleted.

56 changes: 0 additions & 56 deletions configuration/scripts/machines/Macros.thunder_intel

This file was deleted.

6 changes: 4 additions & 2 deletions configuration/scripts/machines/env.badger_intel
Original file line number Diff line number Diff line change
Expand Up @@ -30,8 +30,10 @@ module load netcdf-h5parallel/4.4.0

endif

setenv ICE_MACHINE_ENVNAME badger
setenv ICE_MACHINE_COMPILER intel
setenv ICE_MACHINE_MACHNAME badger
setenv ICE_MACHINE_MACHINFO "Penguin Intel Xeon Broadwell"
setenv ICE_MACHINE_ENVNAME intel
setenv ICE_MACHINE_ENVINFO "(Note: can vary) ifort 19.0.4.243 20190416, openmpi/2.1.2, netcdf4.4.0"
setenv ICE_MACHINE_MAKE gmake
setenv ICE_MACHINE_WKDIR /net/scratch3/$user/CICE_RUNS
setenv ICE_MACHINE_INPUTDATA /usr/projects/climate/eclare/DATA/Consortium
Expand Down
4 changes: 2 additions & 2 deletions configuration/scripts/machines/env.banting_gnu
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,8 @@ setenv HDF5_USE_FILE_LOCKING FALSE # necessary since data is on an NFS filesyste

endif

setenv ICE_MACHINE_ENVNAME banting
setenv ICE_MACHINE_COMPILER gnu
setenv ICE_MACHINE_MACHNAME banting
setenv ICE_MACHINE_ENVNAME gnu
setenv ICE_MACHINE_MAKE make
setenv ICE_MACHINE_WKDIR ~/data/banting/cice/runs
setenv ICE_MACHINE_INPUTDATA /home/ords/cmdd/cmde/sice500/
Expand Down
6 changes: 4 additions & 2 deletions configuration/scripts/machines/env.banting_intel
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,10 @@ setenv HDF5_USE_FILE_LOCKING FALSE # necessary since data is on an NFS filesyste

endif

setenv ICE_MACHINE_ENVNAME banting
setenv ICE_MACHINE_COMPILER intel
setenv ICE_MACHINE_MACHNAME banting
setenv ICE_MACHINE_MACHINFO "Cray XC50, Intel Xeon Gold 6148 (Skylake)"
setenv ICE_MACHINE_ENVNAME intel
setenv ICE_MACHINE_ENVINFO "Intel 19.0.3.199, cray-mpich/7.7.7, cray-netcdf/4.6.1.3"
setenv ICE_MACHINE_MAKE make
setenv ICE_MACHINE_WKDIR ~/data/banting/cice/runs
setenv ICE_MACHINE_INPUTDATA /home/ords/cmdd/cmde/sice500/
Expand Down
Loading