/[MITgcm]/MITgcm_contrib/test_scripts/ollie/mitgcmtestreport_cray
ViewVC logotype

Diff of /MITgcm_contrib/test_scripts/ollie/mitgcmtestreport_cray

Parent Directory Parent Directory | Revision Log Revision Log | View Revision Graph Revision Graph | View Patch Patch

revision 1.9 by mlosch, Mon Apr 16 08:35:39 2018 UTC revision 1.11 by mlosch, Tue Sep 22 15:50:25 2020 UTC
# Line 6  Line 6 
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 PrgEnv-cray/1.0.2_ollie  module load PrgEnv-cray
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}'`)
# Line 44  EXE='srun -n TR_NPROC --cpu_bind=cores . Line 47  EXE='srun -n TR_NPROC --cpu_bind=cores .
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
# Line 83  if [ $checkOut -le 1 ] ; then Line 86  if [ $checkOut -le 1 ] ; then
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
# Line 97  if [ $checkOut -ge 2 ] ; then Line 100  if [ $checkOut -ge 2 ] ; then
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
# Line 118  if [ $checkOut -ge 2 ] ; then Line 121  if [ $checkOut -ge 2 ] ; then
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
# Line 130  cd ${TST_DIR}/${gcmDIR}/verification Line 136  cd ${TST_DIR}/${gcmDIR}/verification
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
# Line 153  cat << EOF >| $HERE/$RUNIT Line 160  cat << EOF >| $HERE/$RUNIT
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    
# Line 172  echo "running testreport like this in \$ Line 179  echo "running testreport like this in \$
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    
# Line 220  sbatch $HERE/$RUNIT Line 238  sbatch $HERE/$RUNIT
238  # rm -rf "${fn}.tar.gz"  # rm -rf "${fn}.tar.gz"
239    
240  echo "end of mitgcmtestreport"  echo "end of mitgcmtestreport"
   
   
   
   
   

Legend:
Removed from v.1.9  
changed lines
  Added in v.1.11

  ViewVC Help
Powered by ViewVC 1.1.22