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

Annotation of /MITgcm_contrib/test_scripts/ollie/mitgcmtestreport_ifort

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


Revision 1.5 - (hide annotations) (download)
Mon Mar 13 09:31:51 2017 UTC (8 years, 7 months ago) by mlosch
Branch: MAIN
Changes since 1.4: +9 -5 lines
update scripts after ollie appears to be stable again

1 mlosch 1.1 #!/bin/bash -e
2     # new script for running testreport on ollie.awi.de
3 mlosch 1.3 # - compile and run on compute nodes
4     # - use ssh to call mpack command from the head node ollie0
5 mlosch 1.5 #$Header: /u/gcmpack/MITgcm_contrib/test_scripts/ollie/mitgcmtestreport_ifort,v 1.4 2016/08/29 15:07:22 mlosch Exp $
6 mlosch 1.2 #$Name: $
7 mlosch 1.1
8     # needed for cron-job
9     source /usr/Modules/3.2.10/init/bash
10     source /etc/profile.d/cray_pe.sh
11     source /etc/profile.d/AWI.sh
12     #
13     module purge
14     module load intel.compiler
15     module load intel.mpi
16 mlosch 1.5 module load netcdf
17     #export LD_LIBRARY_PATH=${CRAY_LD_LIBRARY_PATH}:${LD_LIBRARY_PATH}:
18 mlosch 1.1
19 mlosch 1.5 export MPI_ROOT=${I_MPI_ROOT}
20     #(dirname $(dirname `which mpiifort`))
21 mlosch 1.1 export MPI_INC_DIR=${MPI_ROOT}/include64
22    
23 mlosch 1.5 # there is no slurm module anymore and this is the current recommendation to
24     # have sbatch in your path (rather than running /etc/profile.d./slurm.sh)
25     export PATH=${PATH}:/global/opt/slurm/default/bin
26    
27 mlosch 1.1 dNam='ollie'
28     TST_DIR="/work/ollie/mlosch/test_$dNam"
29     echo "start from TST_DIR='$TST_DIR' at: "`date`
30    
31     umask 0022
32    
33     sfx='ifort'
34     RUNIT="runit_"$sfx
35    
36 mlosch 1.2 OPTFILE=../tools/build_options/linux_ia64_${sfx}_ollie
37 mlosch 1.1 options="-MPI 6"
38 mlosch 1.2 options="$options -odir ${dNam}-i"
39 mlosch 1.1 options="$options -j 6"
40     #options="$options -t global_ocean.90x40x15"
41 mlosch 1.3
42 mlosch 1.1 EXE='mpiexec.hydra -bootstrap slurm -n TR_NPROC ./mitgcmuv'
43     #EXE='srun --mpi=pmi2 -n TR_NPROC ./mitgcmuv'
44    
45     if [ -e $TST_DIR ]; then
46     echo "$TST_DIR exists"
47     else
48     mkdir $TST_DIR
49     fi
50     cd $TST_DIR
51     HERE=$TST_DIR/output
52     if [ -e $HERE ]; then
53     echo "$HERE"
54     else
55     mkdir $HERE
56     fi
57 mlosch 1.2 OUTFILE=$HERE/slurm_${sfx}.out
58 mlosch 1.1 MYOUTPUT=$HERE/out_$sfx
59     if [ -e $MYOUTPUT ]; then
60     rm -rf $MYOUTPUT
61     fi
62     if [ -e $OUTFILE ]; then
63     rm -r $OUTFILE
64     fi
65     gcmDIR="MITgcm_$sfx"
66     checkOut=1
67     if [ $checkOut -eq 1 ] ; then
68     if test -d $gcmDIR/CVS ; then
69     /bin/rm -rf $gcmDIR/verification/??_${dNam}_????????_?
70     ( cd $gcmDIR/verification ; ../tools/do_tst_2+2 -clean )
71     echo "cvs update of dir $gcmDIR :"
72     ( cd $gcmDIR ; cvs -q -d :pserver:cvsanon@mitgcm.org:/u/gcmpack update -P -d ) 2>&1
73     RETVAL=$?
74     if test "x$RETVAL" != x0 ; then
75     echo "cvs update on '"`hostname`"' failed (return val=$RETVAL) => exit"
76     exit
77     fi
78     else
79     echo "no dir: $gcmDIR/CVS => try a fresh check-out"
80     checkOut=2
81     fi
82     fi
83     if [ $checkOut -eq 2 ] ; then
84     if test -e $gcmDIR ; then
85     rm -rf $gcmDIR
86     fi
87     # cvs co MITgcm
88     cvs -d :pserver:cvsanon@mitgcm.org:/u/gcmpack co -P -d $gcmDIR MITgcm > /dev/null 2>&1
89     /usr/bin/find $gcmDIR -type d | xargs chmod g+rxs
90     /usr/bin/find $gcmDIR -type f | xargs chmod g+r
91     fi
92    
93     cd ${gcmDIR}/verification
94    
95 mlosch 1.4 cwd=\`pwd\`
96 mlosch 1.3 SENDCMD="ssh ollie0 ${TST_DIR}/${gcmDIR}/tools/mpack-1.6/mpack"
97     runtestreport="./testreport $options -of $OPTFILE -command \"${EXE}\" -send \"${SENDCMD}\" -sd ${cwd}"
98 mlosch 1.1
99     if [ ! -e $MYOUTPUT ]
100     then
101     touch $MYOUTPUT
102     fi
103    
104 mlosch 1.2 # echo "running testreport like this:"
105     # echo ${runtestreport} -norun
106     # eval "${runtestreport} -norun >> $MYOUTPUT 2>&1"
107 mlosch 1.1
108     # create batch script
109     #
110 mlosch 1.2 JOBNAME=tst$sfx
111 mlosch 1.1 echo "creating batch script $HERE/$RUNIT"
112     cat << EOF >| $HERE/$RUNIT
113 mlosch 1.3 #!/bin/bash
114 mlosch 1.1 #SBATCH --job-name=${JOBNAME}
115     #SBATCH -o ${OUTFILE}
116 mlosch 1.3 #SBATCH --time=6:00:00
117 mlosch 1.1 #SBATCH --ntasks=6
118    
119 mlosch 1.3 # still need this to be able to run a few experiments:
120     # cfc_example, fizhi, tutorial_deep_convection
121     ulimit -s unlimited
122 mlosch 1.1
123     cd \${SLURM_SUBMIT_DIR}
124    
125 mlosch 1.3 cwd=`pwd`
126     echo "running testreport like this in \${cwd}:"
127     echo "${runtestreport} -devel -match 10"
128     ${runtestreport} -devel -match 10 -a jmc@mitgcm.org >> $MYOUTPUT 2>&1
129    
130     echo "running testreport like this in \${cwd}:"
131     echo "./testreport -clean"
132     ./testreport -clean
133    
134     echo "running testreport like this in \${cwd}:"
135     echo "${runtestreport} -fast -match 10"
136     ${runtestreport} -fast -match 10 -a jmc@mitgcm.org >> $MYOUTPUT 2>&1
137 mlosch 1.1
138     EOF
139    
140     chmod a+x $HERE/$RUNIT
141    
142     echo " " >> $MYOUTPUT
143     echo "***********************************************************" >> $MYOUTPUT
144     echo "Submitting this job script:" >> $MYOUTPUT
145     echo "***********************************************************" >> $MYOUTPUT
146     cat $HERE/$RUNIT >> $MYOUTPUT
147     echo "***********************************************************" >> $MYOUTPUT
148     echo "end of job script" >> $MYOUTPUT
149     echo "***********************************************************" >> $MYOUTPUT
150     echo " " >> $MYOUTPUT
151    
152     sbatch $HERE/$RUNIT
153    
154 mlosch 1.3 # # keep looking for the job in the job queues and wait until it has disappeared
155     # jobruns=somedummy
156     # while [ "${jobruns}"x != x ]
157     # do
158     # sleep 200
159     # jobruns=`squeue --noheader -u mlosch | grep "$JOBNAME" | awk '{print $1}'`
160     # echo "waiting for job ${jobruns%% *} ($JOBNAME) to complete"
161     # currentexp=`grep Experiment $MYOUTPUT | tail -1`
162     # echo "currently running $currentexp"
163     # done
164    
165     # # workaround for mailing the stuff
166     # echo "mail the stuff"
167    
168     # MPACKCMD=../tools/mpack-1.6/mpack
169     # fn=`ls -dtr tr_$dNam* | grep -v tar.gz | tail -1`
170     # echo "fname ${fn}"
171     # tar cf - $fn | gzip > "${fn}.tar.gz"
172     # $MPACKCMD -s MITgcm-test -m 3555000 ${fn}.tar.gz jmc@mitgcm.org
173     # sleep 2
174     # rm -rf "${fn}.tar.gz"
175 mlosch 1.1
176     echo "end of mitgcmtestreport"
177    
178    
179    
180    
181    

  ViewVC Help
Powered by ViewVC 1.1.22