/[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.7 by mlosch, Mon Mar 13 09:31:51 2017 UTC revision 1.9 by mlosch, Mon Apr 16 08:35:39 2018 UTC
# Line 10  source /usr/Modules/3.2.10/init/bash Line 10  source /usr/Modules/3.2.10/init/bash
10  source /etc/profile.d/cray_pe.sh  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
14  module load craype-broadwell  module load PrgEnv-cray/1.0.2_ollie
 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  
15  module load netcdf  module load netcdf
16  #export LD_LIBRARY_PATH=${CRAY_LD_LIBRARY_PATH}:${LD_LIBRARY_PATH}:  #export LD_LIBRARY_PATH=${CRAY_LD_LIBRARY_PATH}:${LD_LIBRARY_PATH}:
17  # not sure why I have set these paths here again  # not sure why I have to set these paths here again
18  export MPI_ROOT=$(dirname $(dirname `which mpicc`))  export MPI_ROOT=$(dirname $(dirname `which mpicc`))
19  # $(dirname `echo $LD_LIBRARY_PATH  | awk -F: '{print $1}'`)  # $(dirname `echo $LD_LIBRARY_PATH  | awk -F: '{print $1}'`)
20  export MPI_INC_DIR=${MPI_ROOT}/include  export MPI_INC_DIR=${MPI_ROOT}/include
# Line 42  RUNIT="runit_"$sfx Line 35  RUNIT="runit_"$sfx
35  OPTFILE=../tools/build_options/linux_ia64_${sfx}_ollie  OPTFILE=../tools/build_options/linux_ia64_${sfx}_ollie
36  options="-MPI 6"  options="-MPI 6"
37  options="$options -odir ${dNam}-c"  options="$options -odir ${dNam}-c"
38  #options="$options -j 6"  options="$options -j 6"
39  #options="$options -t global_ocean.cs32x15"  #options="$options -t global_ocean.cs32x15"
40    
41  #EXE='mpiexec.hydra -bootstrap slurm -n TR_NPROC ./mitgcmuv'  #EXE='srun --mpi=pmi2 -n TR_NPROC ./mitgcmuv'
42  EXE='srun --mpi=pmi2 -n TR_NPROC ./mitgcmuv'  #EXE='srun -n TR_NPROC ./mitgcmuv'
43    EXE='srun -n TR_NPROC --cpu_bind=cores ./mitgcmuv'
44    
45  if [ -e $TST_DIR ]; then  if [ -e $TST_DIR ]; then
46      echo "$TST_DIR exists"      echo "$TST_DIR exists"
# Line 68  fi Line 62  fi
62  if [ -e $OUTFILE ]; then  if [ -e $OUTFILE ]; then
63    rm -r $OUTFILE    rm -r $OUTFILE
64  fi  fi
65  gcmDIR="MITgcm_$sfx"  gcmDIR="MITgcm_${sfx}"
66  checkOut=1  git_repo='MITgcm'
67  if [ $checkOut -eq 1 ] ; then  git_code='MITgcm'
68   if test -d $gcmDIR/CVS ; then  
69    /bin/rm -rf $gcmDIR/verification/??_${dNam}_????????_?  # checkOut determines how much checking out is being done
70    ( cd $gcmDIR/verification ; ../tools/do_tst_2+2 -clean )  # checkOut = 3: new clone from GitHub and make a new copy
71    echo "cvs update of dir $gcmDIR :"  # checkOut = 2: update (git pull) existing repo and make a new copy
72    ( cd $gcmDIR ; cvs -q -d :pserver:cvsanon@mitgcm.org:/u/gcmpack update -P -d ) 2>&1  # checkOut = 1: skip update
73    RETVAL=$?  # checkOut = 0: use existing test code (if available otherwise switch to 1)
74    if test "x$RETVAL" != x0 ; then  
75     echo "cvs update on '"`hostname`"' failed (return val=$RETVAL) => exit"  checkOut=2
76     exit  tdir=${TST_DIR}
77    today=`date +%Y%m%d`
78    TODAY=`date +%d`
79    #tmpFil="/tmp/"`basename $0`".$$"
80    tmpFil=$TST_DIR/error.out
81    
82    if [ $checkOut -le 1 ] ; then
83      if test -e $TST_DIR/${gcmDIR}/doc ; then
84        echo $TST_DIR/${gcmDIR}/doc 'exist'
85      else
86        echo -n $TST_DIR/${gcmDIR} 'missing ; '
87        checkOut=2
88        echo "will make a new copy ( checkOut=$checkOut )"
89    fi    fi
90   else  fi
91    echo "no dir: $gcmDIR/CVS => try a fresh check-out"  
92    checkOut=2  if [ $checkOut -ge 2 ] ; then
93   fi    #---- cleaning:
94  fi    cd $TST_DIR
95  if [ $checkOut -eq 2 ] ; then  
96    if test -e $gcmDIR ; then    #---- Make a new clone or update existing one:
97     rm -rf $gcmDIR    if test -e ${gcmDIR}/.git/config ; then
98        echo "${gcmDIR}/.git/config exist"
99      else
100        echo -n "${gcmDIR}/.git/config 'missing "
101        checkOut=3
102        echo "will get new clone ( checkOut=$checkOut )"
103    fi    fi
104  # cvs co MITgcm    if [ $checkOut -eq 3 ] ; then
105    cvs -d :pserver:cvsanon@mitgcm.org:/u/gcmpack co -P -d $gcmDIR MITgcm > /dev/null 2>&1      echo -n "Removing old clone: $TST_DIR/${gcmDIR} ..."
106    /usr/bin/find $gcmDIR -type d | xargs chmod g+rxs      test -e $TST_DIR/${gcmDIR}  &&  rm -rf $TST_DIR/${gcmDIR}
107    /usr/bin/find $gcmDIR -type f | xargs chmod g+r      echo "  done"
108        echo -n "Make a new clone of $git_code from repo: $git_repo ..."
109        git clone https://github.com/$git_repo/${git_code}.git ${gcmDIR} 2> $tmpFil
110        retVal=$?
111        if test $retVal = 0 ; then
112           echo ' --> done!'
113           rm -f $tmpFil
114        else
115           echo " Error: 'git clone' returned: $retVal"
116           cat $tmpFil
117           rm -f $tmpFil
118           exit 2
119        fi
120      else
121        echo "Updating current clone ( $git_code ) ..."
122        ( cd ${gcmDIR}; git checkout master ; git pull )
123        echo ' --> done!'
124      fi
125    else
126      cd $TST_DIR
127  fi  fi
128    
129  cd ${gcmDIR}/verification  cd ${TST_DIR}/${gcmDIR}/verification
130    
131  cwd=\`pwd\`  cwd=\`pwd\`
132  SENDCMD="ssh ollie0 ${TST_DIR}/${gcmDIR}/tools/mpack-1.6/mpack"  SENDCMD="ssh ollie0 ${TST_DIR}/${gcmDIR}/tools/mpack-1.6/mpack"
133  runtestreport="./testreport $options -of $OPTFILE -command \"${EXE}\" -send \"${SENDCMD}\" -sd ${cwd}"  runtestreport="./testreport $options -of $OPTFILE -command \"${EXE}\" -send \"${SENDCMD}\" -sd ${cwd}"
134    emailaddress="-a jm_c@mitgcm.org"
135    
136  if [ ! -e $MYOUTPUT ]  if [ ! -e $MYOUTPUT ]
137      then      then
# Line 126  cat << EOF >| $HERE/$RUNIT Line 157  cat << EOF >| $HERE/$RUNIT
157  # cfc_example, fizhi, tutorial_deep_convection  # cfc_example, fizhi, tutorial_deep_convection
158  ulimit -s unlimited  ulimit -s unlimited
159    
160  # # for debugging  # binds OpenMP task to given cores
161    export OMP_PROC_BIND=TRUE
162    
163    # for debugging
164  # export FLEXLM_DIAGNOSTICS=2  # export FLEXLM_DIAGNOSTICS=2
165  # export FNP_IP_ENV=1  # export FNP_IP_ENV=1
166  # export LM_A_CONN_TIMEOUT=99  # export LM_A_CONN_TIMEOUT=99
# Line 136  cd \${SLURM_SUBMIT_DIR} Line 170  cd \${SLURM_SUBMIT_DIR}
170  cwd=`pwd`  cwd=`pwd`
171  echo "running testreport like this in \${cwd}:"  echo "running testreport like this in \${cwd}:"
172  echo "${runtestreport} -devel -match 10"  echo "${runtestreport} -devel -match 10"
173  ${runtestreport} -devel -match 10 -a jmc@mitgcm.org >> $MYOUTPUT 2>&1  ${runtestreport} -devel -match 10 ${emailaddress} >> $MYOUTPUT 2>&1
174    
175  echo "running testreport like this in \${cwd}:"  echo "running testreport like this in \${cwd}:"
176  echo "./testreport -clean"  echo "./testreport -clean"
# Line 144  echo "./testreport -clean" Line 178  echo "./testreport -clean"
178    
179  echo "running testreport like this in \${cwd}:"  echo "running testreport like this in \${cwd}:"
180  echo "${runtestreport} -fast -match 10"  echo "${runtestreport} -fast -match 10"
181  ${runtestreport} -fast -match 10 -a jmc@mitgcm.org >> $MYOUTPUT 2>&1  ${runtestreport} -fast -match 10 ${emailaddress} >> $MYOUTPUT 2>&1
182    
183  EOF  EOF
184    
# Line 160  echo "end of job script" >> $MYOUTPUT Line 194  echo "end of job script" >> $MYOUTPUT
194  echo "***********************************************************" >> $MYOUTPUT  echo "***********************************************************" >> $MYOUTPUT
195  echo " " >> $MYOUTPUT  echo " " >> $MYOUTPUT
196    
197    echo "sbatch $HERE/$RUNIT"
198  sbatch $HERE/$RUNIT  sbatch $HERE/$RUNIT
199    
200  # # 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 180  sbatch $HERE/$RUNIT Line 215  sbatch $HERE/$RUNIT
215  # fn=`ls -dtr tr_$dNam* | grep -v tar.gz | tail -1`  # fn=`ls -dtr tr_$dNam* | grep -v tar.gz | tail -1`
216  # echo "fname ${fn}"  # echo "fname ${fn}"
217  # tar cf - $fn | gzip > "${fn}.tar.gz"  # tar cf - $fn | gzip > "${fn}.tar.gz"
218  # $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
219  # sleep 2  # sleep 2
220  # rm -rf "${fn}.tar.gz"  # rm -rf "${fn}.tar.gz"
221    

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

  ViewVC Help
Powered by ViewVC 1.1.22