/[MITgcm]/MITgcm_contrib/test_scripts/engaging/test_engag_ifc_mp2
ViewVC logotype

Annotation of /MITgcm_contrib/test_scripts/engaging/test_engag_ifc_mp2

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


Revision 1.4 - (hide annotations) (download)
Tue Apr 25 19:46:47 2017 UTC (8 years, 2 months ago) by jmc
Branch: MAIN
Changes since 1.3: +6 -1 lines
Set env-var "GENERIC" to the use of "-xHost" option in optfile:
 linux_amd64_ifort+impi

1 jmc 1.1 #!/bin/bash
2     #SBATCH -J tst_ifcMp2
3     #SBATCH -p sched_mit_hill
4     #SBATCH --mem-per-cpu 4000
5     #SBATCH -N 1
6     #SBATCH --tasks-per-node 10
7     #SBATCH -e /home/jm_c/test_engaging/output/tst_ifcMp2.stderr
8     #SBATCH -o /home/jm_c/test_engaging/output/tst_ifcMp2.stdout
9     #SBATCH --no-requeue --constraint=centos6
10    
11 jmc 1.4 # $Header: /u/gcmpack/MITgcm_contrib/test_scripts/engaging/test_engag_ifc_mp2,v 1.3 2017/04/08 13:57:17 jmc Exp $
12 jmc 1.1 # $Name: $
13    
14     if test -f /etc/profile.d/modules.sh ; then
15     . /etc/profile.d/modules.sh
16     fi
17     # Note: added "ulimit -s unlimited" in file "~/.bashrc"
18     # to pass big test (the 2 fizhi-cs-* test & adjoint tests) with MPI
19    
20     umask 0022
21     #- to get case insensitive "ls" (and order of tested experiments)
22     export LC_ALL="en_US.UTF-8"
23     echo " running on: "`hostname`
24    
25     dNam='engaging'
26     HERE="$HOME/test_$dNam"
27     OUTP="$HERE/output"; SavD="$HERE/send"
28     SEND="ssh eofe4 $SavD/mpack"
29     TST_DIR="/pool001/jm_c/test_$dNam"
30    
31     if test -d $TST_DIR ; then
32     echo "start from TST_DIR='$TST_DIR' at: "`date`
33     else
34     #if test ! -d /scratch/jm_c ; then mkdir /scratch/jm_c ; fi
35     #if test ! -d $TST_DIR ; then mkdir $TST_DIR ; fi
36     #if test ! -d $TST_DIR ; then
37     # echo "ERROR: Can't create directory \"$TST_DIR\""
38     # exit 1
39     #fi
40     #echo "start in new dir TST_DIR='$TST_DIR' at: "`date`
41     echo "ERROR: missing directory \"$TST_DIR\""
42     exit 1
43     fi
44    
45     sfx='ifcMp2'; typ=''
46 jmc 1.3 addExp='atm_gray offline_cheapaml'
47 jmc 1.1 module add slurm
48     module add gcc
49     module add engaging/intel/2013.1.046
50     #export MPI_INC_DIR="$MPI_HOME/include"
51     OPTFILE="../tools/build_options/linux_amd64_ifort+impi"
52 jmc 1.4 export GENERIC='on' # <-- to prevent the use of "-xHost" option
53 jmc 1.1 mpiCMD="mpirun -env I_MPI_DEBUG 2 -n TR_NPROC ./mitgcmuv" #- currently not used
54     options="-j 4 $typ -MPI 4 -mth"
55     export OMP_NUM_THREADS=2
56 jmc 1.2 export KMP_STACKSIZE=400m
57 jmc 1.1 #options="$options -gsl"
58     #export GSL_IEEE_MODE=double-precision,mask-underflow,mask-denormalized
59     ulimit -s unlimited
60     #- need this to get "staf" & "do_make_syntax.sh":
61     export PATH="$PATH:$HOME/bin"
62    
63     dAlt=`date +%d` ; dAlt=`expr $dAlt % 3`
64     if [ $dAlt -eq 1 ] ; then options="$options -fast"
65     else options="$options -devel" ; fi
66    
67     checkOut=1 ; #options="$options -do"
68     #options="$options -nc" ; checkOut=1
69     #options="$options -q" ; checkOut=0
70    
71     NSLOTS=$SLURM_NTASKS
72     THEDATE=`date`
73     echo '********************************************************************************'
74     echo 'Start job '$THEDATE
75     echo 'NSLOTS = '$NSLOTS
76     echo '======= NODELIST ==============================================================='
77     echo $SLURM_NODELIST
78 jmc 1.4 echo '======= Procs =================================================================='
79     grep 'model name' /proc/cpuinfo | uniq
80     echo -n ' x '
81     grep -c 'model name' /proc/cpuinfo
82 jmc 1.1 cat /etc/redhat-release
83     echo '======= env ===================================================================='
84     env | grep SLURM
85     echo '======= modules ================================================================'
86     module list 2>&1
87     echo '================================================================================'
88    
89     #-
90     MPI_MFile="${OUTP}/mf_${sfx}" #- currently not used
91     #mpiCMD="mpirun -hostfile TR_MFILE -n TR_NPROC ./mitgcmuv"
92     #- make the testreport MPI_MFILE:
93     #listNODES=`echo $SLURM_NODELIST | sed -e 's/\[/ /' -e 's/\]//' -e 's/,/ /' -e 's/-/ /'`
94     # duplicate the 2 listed nodes into a 6 list file:
95     #/bin/rm -f $MPI_MFile ; touch $MPI_MFile
96     #for nc in `seq 1 4` ; do pfx=''
97     # for nd in $listNODES ; do
98     # if test "x$pfx" = x ; then pfx=$nd ; else
99     # echo "${pfx}${nd}" >> $MPI_MFile
100     # fi
101     # done
102     #done
103    
104     cmdCVS='cvs -d :pserver:cvsanon@mitgcm.org:/u/gcmpack -q'
105     gcmDIR="MITgcm_$sfx"
106     cd $TST_DIR
107     #- check for disk space: relative space (99%) or absolute (10.G):
108     dsp=`df -P . | tail -1 | awk '{print $5}' | sed 's/%$//'`
109     if [ $dsp -gt 99 ] ; then
110     #dsp=`df -P . | tail -1 | awk '{print $4}'`
111     #if [ $dsp -le 100000000 ] ; then
112     echo 'Not enough space on this disk => do not run testreport.'
113     df .
114     exit
115     fi
116     if [ $checkOut -eq 1 ] ; then
117     if test -d $gcmDIR/CVS ; then
118     echo "cleaning output from $gcmDIR/verification :"
119     #- remove previous output tar files and tar & remove previous output-dir
120     /bin/rm -f $gcmDIR/verification/??_${dNam}-${sfx}_????????_?.tar.gz
121     ( cd $gcmDIR/verification
122     listD=`ls -1 -d ??_${dNam}-${sfx}_????????_? 2> /dev/null`
123     for dd in $listD
124     do
125     if test -d $dd ; then
126     tar -cf ${dd}".tar" $dd > /dev/null 2>&1 && gzip ${dd}".tar" && /bin/rm -rf $dd
127     RETVAL=$?
128     if test "x$RETVAL" != x0 ; then
129     echo "ERROR in tar+gzip prev outp-dir: $dd"
130     echo " on '"`hostname`"' (return val=$RETVAL) but continue"
131     fi
132     fi
133     done )
134     echo "clean tst_2+2 + testreport output (+ Makefile_syntax files)"
135     ( cd $gcmDIR/verification ; ../tools/do_tst_2+2 -clean )
136     ( cd $gcmDIR/verification ; ./testreport $typ -clean )
137     ( cd $gcmDIR/verification ; rm -f */build/Makefile_syntax )
138     ( cd $gcmDIR/verification ; rm -f */build/port_rand.i */build/ptracers_set_iolabel.i )
139     echo "cvs update of dir $gcmDIR :"
140     ( cd $gcmDIR ; $cmdCVS update -P -d ) 2>&1
141     RETVAL=$?
142     if test "x$RETVAL" != x0 ; then
143     echo "cvs update on '"`hostname`"' fail (return val=$RETVAL) => exit"
144     exit
145     fi
146     else
147     echo "no dir: $gcmDIR/CVS => try a fresh check-out"
148     checkOut=2
149     fi
150     fi
151     if [ $checkOut -eq 2 ] ; then
152     if test -e $gcmDIR ; then
153     echo -n "Removing working copy: $gcmDIR ..."
154     rm -rf $gcmDIR
155     echo " done"
156     fi
157     # cvs co MITgcm
158     echo "Downloading using '$cmdCVS co -P -d $gcmDIR MITgcm' ..."
159     $cmdCVS co -P -d $gcmDIR MITgcm > /dev/null
160     RETVAL=$?
161     if test "x$RETVAL" != x0 ; then
162     echo "cvs co on '"`hostname`"' fail (return val=$RETVAL) => exit"
163     exit
164     else echo " done" ; fi
165     if test -d $gcmDIR/verification ; then
166     /usr/bin/find $gcmDIR -type d | xargs chmod g+rxs
167     /usr/bin/find $gcmDIR -type f | xargs chmod g+r
168     fi
169     fi
170    
171     # -change dir to $gcmDIR/verification dir + add additional experiments:
172     if test -e $gcmDIR/verification ; then
173     if [ $checkOut -lt 2 ] ; then
174     echo " dir $gcmDIR/verification exist" ; fi
175     cd $gcmDIR/verification
176     for exp2add in $addExp ; do
177     if test -d ${exp2add}/CVS ; then
178     echo " assumes dir: $exp2add has been updated"
179     else
180     test -r $exp2add && /bin/rm -rf $exp2add
181     echo " add dir: $exp2add (from Contrib:verification_other)"
182     ( $cmdCVS co -P -d $exp2add \
183     MITgcm_contrib/verification_other/$exp2add > /dev/null )
184     /usr/bin/find $exp2add -type d | xargs chmod g+rxs
185     /usr/bin/find $exp2add -type f | xargs chmod g+r
186     fi
187     done
188     else
189     echo "no dir: $gcmDIR/verification => exit"
190     exit
191     fi
192    
193     echo ''
194     echo ./testreport $options -of $OPTFILE -odir ${dNam}-$sfx \
195     -send \"$SEND\" -sd $SavD -a jmc@mitgcm.org
196     # -command \"$mpiCMD\" -mf $MPI_MFile \
197     ./testreport $options -of $OPTFILE -odir ${dNam}-$sfx \
198     -send "$SEND" -sd $SavD -a jmc@mitgcm.org
199     # -command "$mpiCMD" -mf $MPI_MFile \
200    
201     echo ''
202     echo ../tools/do_tst_2+2 -mpi -o ${dNam}-$sfx \
203     -send \"$SEND\" -sd $SavD -a jmc@mitgcm.org
204     # -exe \"$mpiCMD\" -mf $MPI_MFile \
205     ../tools/do_tst_2+2 -mpi -o ${dNam}-$sfx \
206     -send "$SEND" -sd $SavD -a jmc@mitgcm.org
207     # -exe "$mpiCMD" -mf $MPI_MFile \
208    

  ViewVC Help
Powered by ViewVC 1.1.22