forked from CICE-Consortium/CICE
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Update scripts, rename variables from CICE_ to ICE_ to be more
reusable in icepack.
- Loading branch information
Showing
33 changed files
with
441 additions
and
443 deletions.
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
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 |
---|---|---|
|
@@ -7,14 +7,14 @@ else | |
endif | ||
|
||
source ./cice.settings | ||
source ${CICE_CASEDIR}/env.${CICE_MACHINE} || exit 2 | ||
source ${ICE_CASEDIR}/env.${ICE_MACHINE} || exit 2 | ||
|
||
set jobfile = $1 | ||
|
||
set ntasks = ${CICE_NTASKS} | ||
set nthrds = ${CICE_NTHRDS} | ||
set maxtpn = ${CICE_MACHINE_TPNODE} | ||
set acct = ${CICE_MACHINE_ACCT} | ||
set ntasks = ${ICE_NTASKS} | ||
set nthrds = ${ICE_NTHRDS} | ||
set maxtpn = ${ICE_MACHINE_TPNODE} | ||
set acct = ${ICE_MACHINE_ACCT} | ||
|
||
@ taskpernode = ${maxtpn} / $nthrds | ||
@ nnodes = ${ntasks} / ${taskpernode} | ||
|
@@ -34,7 +34,7 @@ EOF0 | |
|
||
#========================================== | ||
|
||
if (${CICE_MACHINE} =~ yellowstone*) then | ||
if (${ICE_MACHINE} =~ yellowstone*) then | ||
cat >> ${jobfile} << EOFB | ||
#BSUB -n ${ntasks} | ||
#BSUB -R "span[ptile=${ptile}]" | ||
|
@@ -44,44 +44,44 @@ cat >> ${jobfile} << EOFB | |
#BSUB -a poe | ||
#BSUB -o poe.stdout.%J | ||
#BSUB -e poe.stderr.%J | ||
#BSUB -J ${CICE_CASENAME} | ||
#BSUB -W ${CICE_RUNLENGTH} | ||
#BSUB -J ${ICE_CASENAME} | ||
#BSUB -W ${ICE_RUNLENGTH} | ||
#BSUB -P ${acct} | ||
EOFB | ||
|
||
#========================================== | ||
|
||
else if (${CICE_MACHINE} =~ cheyenne*) then | ||
else if (${ICE_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 -N ${ICE_CASENAME} | ||
#PBS -A ${ICE_ACCT} | ||
#PBS -l select=${nnodes}:ncpus=${corespernode}:mpiprocs=${taskpernodelimit}:ompthreads=${nthrds} | ||
#PBS -l walltime=${CICE_RUNLENGTH} | ||
#PBS -l walltime=${ICE_RUNLENGTH} | ||
EOFB | ||
|
||
else if (${CICE_MACHINE} =~ thunder* || ${CICE_MACHINE} =~ gordon* || ${CICE_MACHINE} =~ conrad*) then | ||
else if (${ICE_MACHINE} =~ thunder* || ${ICE_MACHINE} =~ gordon* || ${ICE_MACHINE} =~ conrad*) then | ||
cat >> ${jobfile} << EOFB | ||
#PBS -N ${CICE_CASENAME} | ||
#PBS -N ${ICE_CASENAME} | ||
#PBS -q debug | ||
#PBS -A ${acct} | ||
#PBS -l select=${nnodes}:ncpus=${maxtpn}:mpiprocs=${taskpernode} | ||
#PBS -l walltime=${CICE_RUNLENGTH} | ||
#PBS -l walltime=${ICE_RUNLENGTH} | ||
#PBS -j oe | ||
###PBS -M [email protected] | ||
###PBS -m be | ||
EOFB | ||
|
||
else if (${CICE_MACHINE} =~ cori*) then | ||
else if (${ICE_MACHINE} =~ cori*) then | ||
cat >> ${jobfile} << EOFB | ||
#SBATCH -J ${CICE_CASENAME} | ||
#SBATCH -J ${ICE_CASENAME} | ||
#SBATCH -p debug | ||
###SBATCH -A ${acct} | ||
#SBATCH -N ${nnodes} | ||
#SBATCH -t ${CICE_RUNLENGTH} | ||
#SBATCH -t ${ICE_RUNLENGTH} | ||
#SBATCH -L SCRATCH | ||
#SBATCH -C haswell | ||
###SBATCH -e filename | ||
|
@@ -90,10 +90,10 @@ cat >> ${jobfile} << EOFB | |
###SBATCH --mail-user [email protected] | ||
EOFB | ||
|
||
else if (${CICE_MACHINE} =~ wolf*) then | ||
else if (${ICE_MACHINE} =~ wolf*) then | ||
cat >> ${jobfile} << EOFB | ||
#SBATCH -J ${CICE_CASENAME} | ||
#SBATCH -t ${CICE_RUNLENGTH} | ||
#SBATCH -J ${ICE_CASENAME} | ||
#SBATCH -t ${ICE_RUNLENGTH} | ||
#SBATCH -A ${acct} | ||
#SBATCH -N ${nnodes} | ||
#SBATCH -e slurm%j.err | ||
|
@@ -103,10 +103,10 @@ cat >> ${jobfile} << EOFB | |
#SBATCH --qos=low | ||
EOFB | ||
|
||
else if (${CICE_MACHINE} =~ pinto*) then | ||
else if (${ICE_MACHINE} =~ pinto*) then | ||
cat >> ${jobfile} << EOFB | ||
#SBATCH -J ${CICE_CASENAME} | ||
#SBATCH -t ${CICE_RUNLENGTH} | ||
#SBATCH -J ${ICE_CASENAME} | ||
#SBATCH -t ${ICE_RUNLENGTH} | ||
#SBATCH -A ${acct} | ||
#SBATCH -N ${nnodes} | ||
#SBATCH -e slurm%j.err | ||
|
@@ -117,7 +117,7 @@ cat >> ${jobfile} << EOFB | |
EOFB | ||
|
||
else | ||
echo "${0} ERROR: ${CICE_MACHINE} unknown" | ||
echo "${0} ERROR: ${ICE_MACHINE} unknown" | ||
exit -1 | ||
endif | ||
|
||
|
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,102 +1,102 @@ | ||
#! /bin/csh -f | ||
|
||
source ./cice.settings | ||
source ${CICE_CASEDIR}/env.${CICE_MACHINE} || exit 2 | ||
source ${ICE_CASEDIR}/env.${ICE_MACHINE} || exit 2 | ||
|
||
if (${CICE_MACHINE} != ${CICE_MACHINE_ENVNAME}) then | ||
echo "WARNING, is CICE_MACHINE setting OK, ${CICE_MACHINE}, ${CICE_MACHINE_ENV}" | ||
if (${ICE_MACHINE} != ${ICE_MACHINE_ENVNAME}) then | ||
echo "WARNING, is ICE_MACHINE setting OK, ${ICE_MACHINE}, ${ICE_MACHINE_ENV}" | ||
endif | ||
|
||
echo " " | ||
echo "${0}:" | ||
|
||
set stamp = `date '+%y%m%d-%H%M%S'` | ||
set CICE_BLDLOG_FILE = "cice.bldlog.${stamp}" | ||
set ICE_BLDLOG_FILE = "cice.bldlog.${stamp}" | ||
|
||
if (${CICE_CLEANBUILD} == 'true') then | ||
if (${ICE_CLEANBUILD} == 'true') then | ||
echo "cleaning objdir" | ||
rm -r -f ${CICE_OBJDIR} | ||
rm -r -f ${ICE_OBJDIR} | ||
endif | ||
if !(-d ${CICE_OBJDIR}) mkdir -p ${CICE_OBJDIR} | ||
cd ${CICE_OBJDIR} | ||
if !(-d ${ICE_OBJDIR}) mkdir -p ${ICE_OBJDIR} | ||
cd ${ICE_OBJDIR} | ||
|
||
setenv CICE_CPPDEFS "-DNXGLOB=${CICE_NXGLOB} -DNYGLOB=${CICE_NYGLOB} -DBLCKX=${CICE_BLCKX} -DBLCKY=${CICE_BLCKY} -DMXBLCKS=${CICE_MXBLCKS} -DNICELYR=${NICELYR} -DNSNWLYR=${NSNWLYR} -DNICECAT=${NICECAT} -DTRAGE=${TRAGE} -DTRFY=${TRFY} -DTRLVL=${TRLVL} -DTRPND=${TRPND} -DTRBRI=${TRBRI} -DNTRAERO=${NTRAERO} -DTRZS=${TRZS} -DNBGCLYR=${NBGCLYR} -DTRALG=${TRALG} -DTRBGCZ=${TRBGCZ} -DTRDOC=${TRDOC} -DTRDOC=${TRDOC} -DTRDIC=${TRDIC} -DTRDON=${TRDON} -DTRFED=${TRFED} -DTRFEP=${TRFEP} -DTRZAERO=${TRZAERO} -DTRBGCS=${TRBGCS} -DNUMIN=${NUMIN} -DNUMAX=${NUMAX}" | ||
setenv ICE_CPPDEFS "-DNXGLOB=${ICE_NXGLOB} -DNYGLOB=${ICE_NYGLOB} -DBLCKX=${ICE_BLCKX} -DBLCKY=${ICE_BLCKY} -DMXBLCKS=${ICE_MXBLCKS} -DNICELYR=${NICELYR} -DNSNWLYR=${NSNWLYR} -DNICECAT=${NICECAT} -DTRAGE=${TRAGE} -DTRFY=${TRFY} -DTRLVL=${TRLVL} -DTRPND=${TRPND} -DTRBRI=${TRBRI} -DNTRAERO=${NTRAERO} -DTRZS=${TRZS} -DNBGCLYR=${NBGCLYR} -DTRALG=${TRALG} -DTRBGCZ=${TRBGCZ} -DTRDOC=${TRDOC} -DTRDOC=${TRDOC} -DTRDIC=${TRDIC} -DTRDON=${TRDON} -DTRFED=${TRFED} -DTRFEP=${TRFEP} -DTRZAERO=${TRZAERO} -DTRBGCS=${TRBGCS} -DNUMIN=${NUMIN} -DNUMAX=${NUMAX}" | ||
|
||
if ($DITTO == 'yes') then | ||
setenv CICE_CPPDEFS "${CICE_CPPDEFS} -DREPRODUCIBLE" | ||
setenv ICE_CPPDEFS "${ICE_CPPDEFS} -DREPRODUCIBLE" | ||
endif | ||
|
||
if (${CICE_NTASKS} == 1) then | ||
setenv CICE_COMMDIR serial | ||
if (${ICE_NTASKS} == 1) then | ||
setenv ICE_COMMDIR serial | ||
else | ||
setenv CICE_COMMDIR mpi | ||
setenv ICE_COMMDIR mpi | ||
endif | ||
|
||
if (${CICE_IOTYPE} == 'netcdf') then | ||
if (${ICE_IOTYPE} == 'netcdf') then | ||
set IODIR = io_netcdf | ||
setenv CICE_CPPDEFS "${CICE_CPPDEFS} -Dncdf" | ||
else if (${CICE_IOTYPE} == 'pio') then | ||
setenv ICE_CPPDEFS "${ICE_CPPDEFS} -Dncdf" | ||
else if (${ICE_IOTYPE} == 'pio') then | ||
set IODIR = io_pio | ||
setenv CICE_CPPDEFS "${CICE_CPPDEFS} -Dncdf" | ||
setenv ICE_CPPDEFS "${ICE_CPPDEFS} -Dncdf" | ||
else | ||
set IODIR = io_binary | ||
endif | ||
|
||
### List of source code directories (in order of importance). | ||
cat >! Filepath << EOF | ||
${CICE_SANDBOX}/cicecore/drivers/${CICE_DRVOPT} | ||
${CICE_SANDBOX}/cicecore/cicedynB/dynamics | ||
${CICE_SANDBOX}/cicecore/cicedynB/general | ||
${CICE_SANDBOX}/cicecore/cicedynB/analysis | ||
${CICE_SANDBOX}/cicecore/cicedynB/infrastructure | ||
${CICE_SANDBOX}/cicecore/cicedynB/infrastructure/io/$IODIR | ||
${CICE_SANDBOX}/cicecore/cicedynB/infrastructure/comm/${CICE_COMMDIR} | ||
${CICE_SANDBOX}/cicecore/shared | ||
${CICE_SANDBOX}/cicecore/shared/constants/${CICE_CONSTOPT} | ||
${CICE_SANDBOX}/icepack/columnphysics | ||
${CICE_SANDBOX}/icepack/columnphysics/constants/${CICE_CONSTOPT} | ||
${ICE_SANDBOX}/cicecore/drivers/${ICE_DRVOPT} | ||
${ICE_SANDBOX}/cicecore/cicedynB/dynamics | ||
${ICE_SANDBOX}/cicecore/cicedynB/general | ||
${ICE_SANDBOX}/cicecore/cicedynB/analysis | ||
${ICE_SANDBOX}/cicecore/cicedynB/infrastructure | ||
${ICE_SANDBOX}/cicecore/cicedynB/infrastructure/io/$IODIR | ||
${ICE_SANDBOX}/cicecore/cicedynB/infrastructure/comm/${ICE_COMMDIR} | ||
${ICE_SANDBOX}/cicecore/shared | ||
${ICE_SANDBOX}/cicecore/shared/constants/${ICE_CONSTOPT} | ||
${ICE_SANDBOX}/icepack/columnphysics | ||
${ICE_SANDBOX}/icepack/columnphysics/constants/${ICE_CONSTOPT} | ||
EOF | ||
|
||
echo " " | ||
echo CICE_GRID = ${CICE_GRID} | ||
echo CICE_NTASK = ${CICE_NTASKS} | ||
echo CICE_NTHRD = ${CICE_NTHRDS} | ||
echo ICE_GRID = ${ICE_GRID} | ||
echo ICE_NTASK = ${ICE_NTASKS} | ||
echo ICE_NTHRD = ${ICE_NTHRDS} | ||
echo "global N, block_size" | ||
echo "x ${CICE_NXGLOB}, ${CICE_BLCKX}" | ||
echo "y ${CICE_NYGLOB}, ${CICE_BLCKY}" | ||
echo "max_blocks = ${CICE_MXBLCKS}" | ||
echo "CICE_CPPDEFS = ${CICE_CPPDEFS}" | ||
echo "x ${ICE_NXGLOB}, ${ICE_BLCKX}" | ||
echo "y ${ICE_NYGLOB}, ${ICE_BLCKY}" | ||
echo "max_blocks = ${ICE_MXBLCKS}" | ||
echo "ICE_CPPDEFS = ${ICE_CPPDEFS}" | ||
echo "Filepath = " | ||
cat ${CICE_OBJDIR}/Filepath | ||
cat ${ICE_OBJDIR}/Filepath | ||
echo " " | ||
|
||
echo "building makdep" | ||
cc -o makdep ${CICE_CASEDIR}/makdep.c || exit 2 | ||
cc -o makdep ${ICE_CASEDIR}/makdep.c || exit 2 | ||
|
||
echo "building cice > ${CICE_OBJDIR}/${CICE_BLDLOG_FILE}" | ||
if !(-d ${CICE_RUNDIR}) mkdir -p ${CICE_RUNDIR} | ||
if !($?CICE_MACHINE_BLDTHRDS) then | ||
set CICE_MACHINE_BLDTHRDS = 1 | ||
echo "building cice > ${ICE_OBJDIR}/${ICE_BLDLOG_FILE}" | ||
if !(-d ${ICE_RUNDIR}) mkdir -p ${ICE_RUNDIR} | ||
if !($?ICE_MACHINE_BLDTHRDS) then | ||
set ICE_MACHINE_BLDTHRDS = 1 | ||
endif | ||
if (-e ${CICE_BLDLOG_FILE}) rm ${CICE_BLDLOG_FILE} | ||
gmake -j ${CICE_MACHINE_BLDTHRDS} VPFILE=Filepath EXEC=${CICE_RUNDIR}/cice CICE_CPPDEFSDEFS="${CICE_CPPDEFS}" \ | ||
-f ${CICE_CASEDIR}/Makefile MACFILE=${CICE_CASEDIR}/Macros.${CICE_MACHINE} | tee ${CICE_BLDLOG_FILE} | ||
echo "#---" >! ${CICE_CASEDIR}/test_output | ||
if (-e ${ICE_BLDLOG_FILE}) rm ${ICE_BLDLOG_FILE} | ||
gmake -j ${ICE_MACHINE_BLDTHRDS} VPFILE=Filepath EXEC=${ICE_RUNDIR}/cice ICE_CPPDEFSDEFS="${ICE_CPPDEFS}" \ | ||
-f ${ICE_CASEDIR}/Makefile MACFILE=${ICE_CASEDIR}/Macros.${ICE_MACHINE} | tee ${ICE_BLDLOG_FILE} | ||
echo "#---" >! ${ICE_CASEDIR}/test_output | ||
if ($status != 0) then | ||
echo "${0}: COMPILE FAILED, see" | ||
echo " cat ${CICE_OBJDIR}/${CICE_BLDLOG_FILE}" | ||
if ( ${CICE_TEST} != ${CICE_SPVAL} ) then | ||
echo " cat ${ICE_OBJDIR}/${ICE_BLDLOG_FILE}" | ||
if ( ${ICE_TEST} != ${ICE_SPVAL} ) then | ||
# This is a test case. Write output to test_output file | ||
echo "FAIL ${CICE_TESTNAME} build" >> ${CICE_CASEDIR}/test_output | ||
echo "FAIL ${ICE_TESTNAME} build" >> ${ICE_CASEDIR}/test_output | ||
endif | ||
exit 99 | ||
endif | ||
|
||
if !(-d ${CICE_LOGDIR}) mkdir -p ${CICE_LOGDIR} | ||
cp -p ${CICE_BLDLOG_FILE} ${CICE_LOGDIR}/ | ||
echo "`date` ${0}:${CICE_CASENAME} build completed ${CICE_BLDLOG_FILE}" >> ${CICE_CASEDIR}/README.case | ||
echo "${0}: COMPILE SUCCESSFUL, ${CICE_LOGDIR}/${CICE_BLDLOG_FILE}" | ||
if ( ${CICE_TEST} != ${CICE_SPVAL} ) then | ||
echo "PASS ${CICE_TESTNAME} build" >> ${CICE_CASEDIR}/test_output | ||
if !(-d ${ICE_LOGDIR}) mkdir -p ${ICE_LOGDIR} | ||
cp -p ${ICE_BLDLOG_FILE} ${ICE_LOGDIR}/ | ||
echo "`date` ${0}:${ICE_CASENAME} build completed ${ICE_BLDLOG_FILE}" >> ${ICE_CASEDIR}/README.case | ||
echo "${0}: COMPILE SUCCESSFUL, ${ICE_LOGDIR}/${ICE_BLDLOG_FILE}" | ||
if ( ${ICE_TEST} != ${ICE_SPVAL} ) then | ||
echo "PASS ${ICE_TESTNAME} build" >> ${ICE_CASEDIR}/test_output | ||
endif | ||
|
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
Oops, something went wrong.