/[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.1 by mlosch, Thu Jun 2 12:51:56 2016 UTC revision 1.2 by mlosch, Fri Jun 10 07:55:29 2016 UTC
# Line 26  echo "start from TST_DIR='$TST_DIR' at: Line 26  echo "start from TST_DIR='$TST_DIR' at:
26    
27  umask 0022  umask 0022
28    
29  sfx='ftn'  sfx='cray'
30  RUNIT="runit_"$sfx  RUNIT="runit_"$sfx
31    
32  OPTFILE=../tools/build_options/linux_ia64_cray_ollie  OPTFILE=../tools/build_options/linux_ia64_${sfx}_ollie
33  options="-MPI 6"  options="-MPI 6"
34  options="$options -odir $dNam"  options="$options -odir ${dNam}-c"
35  options="$options -devel"  options="$options -devel"
36  #options="$options -j 2"  #options="$options -j 2"
37  #options="$options -j 6"  #options="$options -j 6"
38  #options="$options -t global_ocean.90x40x15"  #options="$options -t global_ocean.cs32x15 -q"
39  #EXE='mpiexec.hydra -bootstrap slurm -n TR_NPROC ./mitgcmuv'  #EXE='mpiexec.hydra -bootstrap slurm -n TR_NPROC ./mitgcmuv'
40  EXE='srun --mpi=pmi2 -n TR_NPROC ./mitgcmuv'  EXE='srun --mpi=pmi2 -n TR_NPROC ./mitgcmuv'
41    
# Line 51  if [ -e $HERE ]; then Line 51  if [ -e $HERE ]; then
51  else  else
52      mkdir $HERE      mkdir $HERE
53  fi  fi
54  OUTFILE=$HERE/testreport.out  OUTFILE=$HERE/slurm_${sfx}.out
55  MYOUTPUT=$HERE/out_$sfx  MYOUTPUT=$HERE/out_$sfx
56  if [ -e $MYOUTPUT ]; then  if [ -e $MYOUTPUT ]; then
57    rm -rf $MYOUTPUT    rm -rf $MYOUTPUT
# Line 97  if [ ! -e $MYOUTPUT ] Line 97  if [ ! -e $MYOUTPUT ]
97      touch $MYOUTPUT      touch $MYOUTPUT
98  fi  fi
99    
100  echo "running testreport like this:"  # echo "running testreport like this:"
101  echo ${runtestreport} -norun  # echo ${runtestreport} -norun
102  eval "${runtestreport} -norun >> $MYOUTPUT 2>&1"  # eval "${runtestreport} -norun >> $MYOUTPUT 2>&1"
103    
104  # create batch script  # create batch script
105  #  #
106  JOBNAME=tstoll  JOBNAME=tst$sfx
107  echo "creating batch script $HERE/$RUNIT"  echo "creating batch script $HERE/$RUNIT"
108  cat << EOF >| $HERE/$RUNIT  cat << EOF >| $HERE/$RUNIT
109  #!/bin/bash -x  #!/bin/bash -x
110  #SBATCH --job-name=${JOBNAME}  #SBATCH --job-name=${JOBNAME}
111  #SBATCH  -o ${OUTFILE}  #SBATCH  -o ${OUTFILE}
112  #SBATCH --time=3:00:00  #SBATCH --time=6:00:00
113  #SBATCH --ntasks=6  #SBATCH --ntasks=6
114  #SBATCH  -p smp  #SBATCH  -p smp
 #SBATCH --qos=short  
115    
116  ulimit -s 1048576  ulimit -s 1048576
117    
# Line 121  cd \${SLURM_SUBMIT_DIR} Line 120  cd \${SLURM_SUBMIT_DIR}
120  echo "running testreport like this:"  echo "running testreport like this:"
121  echo "${runtestreport} -runonly"  echo "${runtestreport} -runonly"
122  #${runtestreport} -runonly -match 10 -a 'Martin.Losch@awi.de' >> $MYOUTPUT  #${runtestreport} -runonly -match 10 -a 'Martin.Losch@awi.de' >> $MYOUTPUT
123  ${runtestreport} -runonly -match 10 -a 'jmc@mitcm.org' >> $MYOUTPUT  #${runtestreport} -runonly -match 10 -a 'jmc@mitcm.org' >> $MYOUTPUT
124    ${runtestreport} -match 10 >> $MYOUTPUT
125    
126  EOF  EOF
127    
# Line 143  sbatch $HERE/$RUNIT Line 143  sbatch $HERE/$RUNIT
143  jobruns=somedummy  jobruns=somedummy
144  while [ "${jobruns}"x != x ]  while [ "${jobruns}"x != x ]
145  do  do
146    sleep 20    sleep 200
147    jobruns=`squeue --noheader -u mlosch | grep "$JOBNAME" | awk '{print $1}'`    jobruns=`squeue --noheader -u mlosch | grep "$JOBNAME" | awk '{print $1}'`
148    echo "waiting for job ${jobruns%% *} ($JOBNAME) to complete"    echo "waiting for job ${jobruns%% *} ($JOBNAME) to complete"
149    currentexp=`grep Experiment $MYOUTPUT | tail -1`    currentexp=`grep Experiment $MYOUTPUT | tail -1`
150    echo "currently running $currentexp"    echo "currently running $currentexp"
151  done  done
152    
 # # after running the experiments send email to jmc (cannot be done from  
 # # the compute node, yet)  
 # MPACKCMD=../tools/mpack-1.6/mpack  
 # fn=`ls -dtr tr_ollie* | grep -v tar.gz | tail -1`  
 # echo "fn $fn"  
 # tar cf - $fn | gzip > "${fn}.tar.gz"  
 # ../tools/mpack-1.6/mpack -s MITgcm-test -m 3555000 ${fn}.tar.gz mlosch@awi.de  
 # sleep 2  
 # \rm -f ${fn}.tar.gz  
 # ../tools/mpack-1.6/mpack -s MITgcm-test -m 3555000 ${fn}.tar.gz jmc@mitgcm.org  
   
 # after running the experiments on the compute node run testreport  
 # for a third time to evaluate results on the head node again  
 # echo " " >> $MYOUTPUT  
 # echo "now run testreport for a final time to evaluate results:" >> $MYOUTPUT  
 # echo "$RUNTESTREPORT -match 10 -runonly" >> $MYOUTPUT  
 # #$RUNTESTREPORT -match 10 -runonly >> $MYOUTPUT 2>&1  
 # $RUNTESTREPORT -match 10 -runonly \  
 #     -a "jmc@mitgcm.org" >> $MYOUTPUT 2>&1  
 # #   -a "jmc@mitgcm.org, Martin.Losch@awi.de" >> $MYOUTPUT 2>&1  
   
153  # workaround for mailing the stuff  # workaround for mailing the stuff
154  echo "mail the stuff"  echo "mail the stuff"
155  # 1. set name of remote host where to do the mpack command  
156  # 2. pack directory into an archive an compress it  MPACKCMD=../tools/mpack-1.6/mpack
157  # 3. copy gzipped archive to remote host  fn=`ls -dtr tr_$dNam* | grep -v tar.gz | tail -1`
 # 4. on the remote host execute the mpack command, that send the email  
 # 5. wait a little, just to be sure everything is done  
 # 6. remove archives  
 MPACKCMD=\${HOME}/bin/mpack  
 rmhost=rayl4.awi.de  
 pwd  
 fn=`ls -dtr tr_ollie* | grep -v tar.gz | tail -1`  
158  echo "fname ${fn}"  echo "fname ${fn}"
159  tar cf - $fn | gzip > "${fn}.tar.gz"  tar cf - $fn | gzip > "${fn}.tar.gz"
160  eval "scp ${fn}.tar.gz ${rmhost}:"  $MPACKCMD -s MITgcm-test -m 3555000 ${fn}.tar.gz jmc@mitgcm.org
 #ssh -Y $rmhost "$MPACKCMD -s MITgcm-test -m 3555000 ${fn}.tar.gz mlosch@awi.de"  
 ssh -Y $rmhost "$MPACKCMD -s MITgcm-test -m 3555000 ${fn}.tar.gz jmc@mitgcm.org"  
161  sleep 2  sleep 2
 ssh -Y $rmhost "rm -f ${fn}.tar.gz"  
162  rm -rf "${fn}.tar.gz"  rm -rf "${fn}.tar.gz"
 # end workaround for mailing the stuff  
163    
164  echo "end of mitgcmtestreport"  echo "end of mitgcmtestreport"
165    

Legend:
Removed from v.1.1  
changed lines
  Added in v.1.2

  ViewVC Help
Powered by ViewVC 1.1.22