| 6 |
#$Name$ |
#$Name$ |
| 7 |
|
|
| 8 |
# needed for cron-job |
# needed for cron-job |
| 9 |
source /usr/Modules/3.2.10/init/bash |
#source /usr/Modules/current/init/bash |
| 10 |
source /etc/profile.d/cray_pe.sh |
source /etc/profile.d/cray_pe.sh |
| 11 |
source /etc/profile.d/AWI.sh |
# this seems to be enough to make the module cmd work |
| 12 |
|
source /etc/profile.d/modules.sh |
| 13 |
# |
# |
| 14 |
module purge |
module purge |
| 15 |
module load craype-broadwell |
module load PrgEnv-cray |
|
module load PrgEnv-cray/1.0.2_test |
|
|
# module load PrgEnv-cray |
|
|
# to me this looks like a terrible hack, but that is what we are supposed |
|
|
# to use now |
|
|
# module unload craype-network-infiniband cudatoolkit mvapich2_cce |
|
|
# module load craype-network-opa |
|
|
# module load mvapich2_cce |
|
| 16 |
module load netcdf |
module load netcdf |
| 17 |
#export LD_LIBRARY_PATH=${CRAY_LD_LIBRARY_PATH}:${LD_LIBRARY_PATH}: |
# set the netcdf root directory here, because the definitions always |
| 18 |
|
# change with different "default" netcdf modules |
| 19 |
|
export NETCDF_ROOT=`nc-config --prefix` |
| 20 |
# not sure why I have to set these paths here again |
# not sure why I have to set these paths here again |
| 21 |
export MPI_ROOT=$(dirname $(dirname `which mpicc`)) |
export MPI_ROOT=$(dirname $(dirname `which mpicc`)) |
| 22 |
# $(dirname `echo $LD_LIBRARY_PATH | awk -F: '{print $1}'`) |
# $(dirname `echo $LD_LIBRARY_PATH | awk -F: '{print $1}'`) |
| 47 |
|
|
| 48 |
if [ -e $TST_DIR ]; then |
if [ -e $TST_DIR ]; then |
| 49 |
echo "$TST_DIR exists" |
echo "$TST_DIR exists" |
| 50 |
else |
else |
| 51 |
mkdir $TST_DIR |
mkdir $TST_DIR |
| 52 |
fi |
fi |
| 53 |
cd $TST_DIR |
cd $TST_DIR |
| 54 |
HERE=$TST_DIR/output |
HERE=$TST_DIR/output |
| 55 |
if [ -e $HERE ]; then |
if [ -e $HERE ]; then |
| 56 |
echo "$HERE" |
echo "$HERE" |
| 57 |
else |
else |
| 58 |
mkdir $HERE |
mkdir $HERE |
| 59 |
fi |
fi |
| 60 |
OUTFILE=$HERE/slurm_${sfx}.out |
OUTFILE=$HERE/slurm_${sfx}.out |
| 86 |
if test -e $TST_DIR/${gcmDIR}/doc ; then |
if test -e $TST_DIR/${gcmDIR}/doc ; then |
| 87 |
echo $TST_DIR/${gcmDIR}/doc 'exist' |
echo $TST_DIR/${gcmDIR}/doc 'exist' |
| 88 |
else |
else |
| 89 |
echo -n $TST_DIR/${gcmDIR} 'missing ; ' |
echo -n "$TST_DIR/${gcmDIR} missing ; " |
| 90 |
checkOut=2 |
checkOut=2 |
| 91 |
echo "will make a new copy ( checkOut=$checkOut )" |
echo "will make a new copy ( checkOut=$checkOut )" |
| 92 |
fi |
fi |
| 100 |
if test -e ${gcmDIR}/.git/config ; then |
if test -e ${gcmDIR}/.git/config ; then |
| 101 |
echo "${gcmDIR}/.git/config exist" |
echo "${gcmDIR}/.git/config exist" |
| 102 |
else |
else |
| 103 |
echo -n "${gcmDIR}/.git/config 'missing " |
echo -n "${gcmDIR}/.git/config missing ; " |
| 104 |
checkOut=3 |
checkOut=3 |
| 105 |
echo "will get new clone ( checkOut=$checkOut )" |
echo "will get new clone ( checkOut=$checkOut )" |
| 106 |
fi |
fi |
| 121 |
exit 2 |
exit 2 |
| 122 |
fi |
fi |
| 123 |
else |
else |
| 124 |
|
# echo "clean tst_2+2 + testreport output" |
| 125 |
|
( cd $gcmDIR/verification ; ../tools/do_tst_2+2 -clean ) |
| 126 |
|
( cd $gcmDIR/verification ; ./testreport -clean ) |
| 127 |
echo "Updating current clone ( $git_code ) ..." |
echo "Updating current clone ( $git_code ) ..." |
| 128 |
( cd ${gcmDIR}; git checkout master ; git pull ) |
( cd ${gcmDIR}; git checkout master ; git pull ; git ls-files -d | xargs git checkout -- ) |
| 129 |
echo ' --> done!' |
echo ' --> done!' |
| 130 |
fi |
fi |
| 131 |
else |
else |
| 136 |
|
|
| 137 |
cwd=\`pwd\` |
cwd=\`pwd\` |
| 138 |
SENDCMD="ssh ollie0 ${TST_DIR}/${gcmDIR}/tools/mpack-1.6/mpack" |
SENDCMD="ssh ollie0 ${TST_DIR}/${gcmDIR}/tools/mpack-1.6/mpack" |
| 139 |
runtestreport="./testreport $options -of $OPTFILE -command \"${EXE}\" -send \"${SENDCMD}\" -sd ${cwd}" |
runtestreport="./testreport $options -of $OPTFILE -command \"${EXE}\" -send \"${SENDCMD}\" -sd ${cwd}" |
| 140 |
emailaddress="-a jm_c@mitgcm.org" |
emailaddress="-a jm_c@mitgcm.org" |
| 141 |
|
testrestart="../tools/do_tst_2+2 -mpi -exe \"${EXE}\" -o ${dNam}-c -send \"${SENDCMD}\" -sd ${cwd}" |
| 142 |
|
|
| 143 |
if [ ! -e $MYOUTPUT ] |
if [ ! -e $MYOUTPUT ] |
| 144 |
then |
then |
| 160 |
#SBATCH --time=12:00:00 |
#SBATCH --time=12:00:00 |
| 161 |
#SBATCH --ntasks=6 |
#SBATCH --ntasks=6 |
| 162 |
|
|
| 163 |
# still need this to be able to run a few experiments: |
# still need this to be able to run a few experiments: |
| 164 |
# cfc_example, fizhi, tutorial_deep_convection |
# cfc_example, fizhi, tutorial_deep_convection |
| 165 |
ulimit -s unlimited |
ulimit -s unlimited |
| 166 |
|
|
| 179 |
echo "${runtestreport} -devel -match 10" |
echo "${runtestreport} -devel -match 10" |
| 180 |
${runtestreport} -devel -match 10 ${emailaddress} >> $MYOUTPUT 2>&1 |
${runtestreport} -devel -match 10 ${emailaddress} >> $MYOUTPUT 2>&1 |
| 181 |
|
|
| 182 |
|
echo "running restart test like this in \${cwd}:" |
| 183 |
|
echo "${testrestart}" |
| 184 |
|
${testrestart} ${emailaddress} >> $MYOUTPUT 2>&1 |
| 185 |
|
|
| 186 |
|
../tools/do_tst_2+2 -clean |
| 187 |
|
|
| 188 |
echo "running testreport like this in \${cwd}:" |
echo "running testreport like this in \${cwd}:" |
| 189 |
echo "./testreport -clean" |
echo "./testreport -clean" |
| 190 |
./testreport -clean |
./testreport -clean |
| 191 |
|
|
| 192 |
|
# Hack,hack,hack to avoid running dome: |
| 193 |
echo "running testreport like this in \${cwd}:" |
echo "running testreport like this in \${cwd}:" |
| 194 |
echo "${runtestreport} -fast -match 10" |
echo "${runtestreport} -skipdir dome -fast -match 10" |
| 195 |
${runtestreport} -fast -match 10 ${emailaddress} >> $MYOUTPUT 2>&1 |
${runtestreport} -skipdir dome -fast -match 10 ${emailaddress} >> $MYOUTPUT 2>&1 |
| 196 |
|
|
| 197 |
|
echo "running restart test like this in \${cwd}:" |
| 198 |
|
echo "${testrestart}" |
| 199 |
|
${testrestart} ${emailaddress} >> $MYOUTPUT 2>&1 |
| 200 |
|
|
| 201 |
EOF |
EOF |
| 202 |
|
|
| 238 |
# rm -rf "${fn}.tar.gz" |
# rm -rf "${fn}.tar.gz" |
| 239 |
|
|
| 240 |
echo "end of mitgcmtestreport" |
echo "end of mitgcmtestreport" |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|