/[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.5 by mlosch, Wed Jun 22 06:23:27 2016 UTC revision 1.8 by mlosch, Tue Apr 3 12:58:37 2018 UTC
# Line 11  source /etc/profile.d/cray_pe.sh Line 11  source /etc/profile.d/cray_pe.sh
11  source /etc/profile.d/AWI.sh  source /etc/profile.d/AWI.sh
12  #  #
13  module purge  module purge
 module load slurm  
14  module load craype-broadwell  module load craype-broadwell
15  module load PrgEnv-cray/1.0.0  module load PrgEnv-cray/1.0.2_test
16  module unload cudatoolkit  # module load PrgEnv-cray
17  module swap mvapich2_cce cray-impi  # to me this looks like a terrible hack, but that is what we are supposed
18  module load intel/impi-5.1.3  # to use now
19  export LD_LIBRARY_PATH=${CRAY_LD_LIBRARY_PATH}:${LD_LIBRARY_PATH}:  # module unload craype-network-infiniband cudatoolkit mvapich2_cce
20    # module load craype-network-opa
21    # module load mvapich2_cce
22    module load netcdf
23    #export LD_LIBRARY_PATH=${CRAY_LD_LIBRARY_PATH}:${LD_LIBRARY_PATH}:
24    # not sure why I have to set these paths here again
25    export MPI_ROOT=$(dirname $(dirname `which mpicc`))
26    # $(dirname `echo $LD_LIBRARY_PATH  | awk -F: '{print $1}'`)
27    export MPI_INC_DIR=${MPI_ROOT}/include
28    
29    # there is no slurm module anymore and this is the current recommendation to
30    # have sbatch in your path (rather than running /etc/profile.d./slurm.sh)
31    export PATH=${PATH}:/global/opt/slurm/default/bin
32    
33  dNam='ollie'  dNam='ollie'
34  TST_DIR="/work/ollie/mlosch/test_$dNam"  TST_DIR="/work/ollie/mlosch/test_$dNam"
# Line 31  RUNIT="runit_"$sfx Line 42  RUNIT="runit_"$sfx
42  OPTFILE=../tools/build_options/linux_ia64_${sfx}_ollie  OPTFILE=../tools/build_options/linux_ia64_${sfx}_ollie
43  options="-MPI 6"  options="-MPI 6"
44  options="$options -odir ${dNam}-c"  options="$options -odir ${dNam}-c"
45  #options="$options -j 6"  options="$options -j 6"
46  #options="$options -t global_ocean.cs32x15"  #options="$options -t global_ocean.cs32x15"
47    
48  #EXE='mpiexec.hydra -bootstrap slurm -n TR_NPROC ./mitgcmuv'  #EXE='srun --mpi=pmi2 -n TR_NPROC ./mitgcmuv'
49  EXE='srun --mpi=pmi2 -n TR_NPROC ./mitgcmuv'  #EXE='srun -n TR_NPROC ./mitgcmuv'
50    EXE='srun -n TR_NPROC --cpu_bind=cores ./mitgcmuv'
51    
52  if [ -e $TST_DIR ]; then  if [ -e $TST_DIR ]; then
53      echo "$TST_DIR exists"      echo "$TST_DIR exists"
# Line 57  fi Line 69  fi
69  if [ -e $OUTFILE ]; then  if [ -e $OUTFILE ]; then
70    rm -r $OUTFILE    rm -r $OUTFILE
71  fi  fi
72  gcmDIR="MITgcm_$sfx"  gcmDIR="MITgcm_${sfx}"
73  checkOut=1  git_repo='MITgcm'
74  if [ $checkOut -eq 1 ] ; then  git_code='MITgcm'
75   if test -d $gcmDIR/CVS ; then  
76    /bin/rm -rf $gcmDIR/verification/??_${dNam}_????????_?  # checkOut determines how much checking out is being done
77    ( cd $gcmDIR/verification ; ../tools/do_tst_2+2 -clean )  # checkOut = 3: new clone from GitHub and make a new copy
78    echo "cvs update of dir $gcmDIR :"  # checkOut = 2: update (git pull) existing repo and make a new copy
79    ( cd $gcmDIR ; cvs -q -d :pserver:cvsanon@mitgcm.org:/u/gcmpack update -P -d ) 2>&1  # checkOut = 1: skip update
80    RETVAL=$?  # checkOut = 0: use existing test code (if available otherwise switch to 1)
81    if test "x$RETVAL" != x0 ; then  
82     echo "cvs update on '"`hostname`"' failed (return val=$RETVAL) => exit"  checkOut=2
83     exit  tdir=${TST_DIR}
84    today=`date +%Y%m%d`
85    TODAY=`date +%d`
86    #tmpFil="/tmp/"`basename $0`".$$"
87    tmpFil=$TST_DIR/error.out
88    
89    if [ $checkOut -le 1 ] ; then
90      if test -e $TST_DIR/${gcmDIR}/doc ; then
91        echo $TST_DIR/${gcmDIR}/doc 'exist'
92      else
93        echo -n $TST_DIR/${gcmDIR} 'missing ; '
94        checkOut=2
95        echo "will make a new copy ( checkOut=$checkOut )"
96    fi    fi
97   else  fi
98    echo "no dir: $gcmDIR/CVS => try a fresh check-out"  
99    checkOut=2  if [ $checkOut -ge 2 ] ; then
100   fi    #---- cleaning:
101  fi    cd $TST_DIR
102  if [ $checkOut -eq 2 ] ; then  
103    if test -e $gcmDIR ; then    #---- Make a new clone or update existing one:
104     rm -rf $gcmDIR    if test -e ${gcmDIR}/.git/config ; then
105        echo "${gcmDIR}/.git/config exist"
106      else
107        echo -n "${gcmDIR}/.git/config 'missing "
108        checkOut=3
109        echo "will get new clone ( checkOut=$checkOut )"
110      fi
111      if [ $checkOut -eq 3 ] ; then
112        echo -n "Removing old clone: $TST_DIR/${gcmDIR} ..."
113        test -e $TST_DIR/${gcmDIR}  &&  rm -rf $TST_DIR/${gcmDIR}
114        echo "  done"
115        echo -n "Make a new clone of $git_code from repo: $git_repo ..."
116        git clone https://github.com/$git_repo/${git_code}.git ${gcmDIR} 2> $tmpFil
117        retVal=$?
118        if test $retVal = 0 ; then
119           echo ' --> done!'
120           rm -f $tmpFil
121        else
122           echo " Error: 'git clone' returned: $retVal"
123           cat $tmpFil
124           rm -f $tmpFil
125           exit 2
126        fi
127      else
128        echo "Updating current clone ( $git_code ) ..."
129        ( cd ${gcmDIR}; git checkout master ; git pull )
130        echo ' --> done!'
131    fi    fi
132  # cvs co MITgcm  else
133    cvs -d :pserver:cvsanon@mitgcm.org:/u/gcmpack co -P -d $gcmDIR MITgcm > /dev/null 2>&1    cd $TST_DIR
   /usr/bin/find $gcmDIR -type d | xargs chmod g+rxs  
   /usr/bin/find $gcmDIR -type f | xargs chmod g+r  
134  fi  fi
135    
136  cd ${gcmDIR}/verification  cd ${TST_DIR}/${gcmDIR}/verification
137    
138  cwd=`pwd`  cwd=\`pwd\`
139  SENDCMD="ssh ollie0 ${TST_DIR}/${gcmDIR}/tools/mpack-1.6/mpack"  SENDCMD="ssh ollie0 ${TST_DIR}/${gcmDIR}/tools/mpack-1.6/mpack"
140  runtestreport="./testreport $options -of $OPTFILE -command \"${EXE}\" -send \"${SENDCMD}\" -sd ${cwd}"  runtestreport="./testreport $options -of $OPTFILE -command \"${EXE}\" -send \"${SENDCMD}\" -sd ${cwd}"
141    emailaddress="-a jm_c@mitgcm.org"
142    
143  if [ ! -e $MYOUTPUT ]  if [ ! -e $MYOUTPUT ]
144      then      then
# Line 115  cat << EOF >| $HERE/$RUNIT Line 164  cat << EOF >| $HERE/$RUNIT
164  # cfc_example, fizhi, tutorial_deep_convection  # cfc_example, fizhi, tutorial_deep_convection
165  ulimit -s unlimited  ulimit -s unlimited
166    
167    # binds OpenMP task to given cores
168    export OMP_PROC_BIND=TRUE
169    
170    # for debugging
171    # export FLEXLM_DIAGNOSTICS=2
172    # export FNP_IP_ENV=1
173    # export LM_A_CONN_TIMEOUT=99
174    
175  cd \${SLURM_SUBMIT_DIR}  cd \${SLURM_SUBMIT_DIR}
176    
177  cwd=`pwd`  cwd=`pwd`
178  echo "running testreport like this in \${cwd}:"  echo "running testreport like this in \${cwd}:"
179  echo "${runtestreport} -devel -match 10"  echo "${runtestreport} -devel -match 10"
180  ${runtestreport} -devel -match 10 -a jmc@mitgcm.org >> $MYOUTPUT 2>&1  ${runtestreport} -devel -match 10 ${emailaddress} >> $MYOUTPUT 2>&1
181    
182  echo "running testreport like this in \${cwd}:"  echo "running testreport like this in \${cwd}:"
183  echo "./testreport -clean"  echo "./testreport -clean"
# Line 128  echo "./testreport -clean" Line 185  echo "./testreport -clean"
185    
186  echo "running testreport like this in \${cwd}:"  echo "running testreport like this in \${cwd}:"
187  echo "${runtestreport} -fast -match 10"  echo "${runtestreport} -fast -match 10"
188  ${runtestreport} -fast -match 10 -a jmc@mitgcm.org >> $MYOUTPUT 2>&1  ${runtestreport} -fast -match 10 ${emailaddress} >> $MYOUTPUT 2>&1
189    
190  EOF  EOF
191    
# Line 144  echo "end of job script" >> $MYOUTPUT Line 201  echo "end of job script" >> $MYOUTPUT
201  echo "***********************************************************" >> $MYOUTPUT  echo "***********************************************************" >> $MYOUTPUT
202  echo " " >> $MYOUTPUT  echo " " >> $MYOUTPUT
203    
204    echo "sbatch $HERE/$RUNIT"
205  sbatch $HERE/$RUNIT  sbatch $HERE/$RUNIT
206    
207  # # keep looking for the job in the job queues and wait until it has disappeared  # # keep looking for the job in the job queues and wait until it has disappeared
# Line 164  sbatch $HERE/$RUNIT Line 222  sbatch $HERE/$RUNIT
222  # fn=`ls -dtr tr_$dNam* | grep -v tar.gz | tail -1`  # fn=`ls -dtr tr_$dNam* | grep -v tar.gz | tail -1`
223  # echo "fname ${fn}"  # echo "fname ${fn}"
224  # tar cf - $fn | gzip > "${fn}.tar.gz"  # tar cf - $fn | gzip > "${fn}.tar.gz"
225  # $MPACKCMD -s MITgcm-test -m 3555000 ${fn}.tar.gz jmc@mitgcm.org  # $MPACKCMD -s MITgcm-test -m 3555000 ${fn}.tar.gz jm_c@mitgcm.org
226  # sleep 2  # sleep 2
227  # rm -rf "${fn}.tar.gz"  # rm -rf "${fn}.tar.gz"
228    

Legend:
Removed from v.1.5  
changed lines
  Added in v.1.8

  ViewVC Help
Powered by ViewVC 1.1.22