/[MITgcm]/MITgcm_contrib/test_scripts/svante/test_svante_ifc_mpi
ViewVC logotype

Annotation of /MITgcm_contrib/test_scripts/svante/test_svante_ifc_mpi

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


Revision 1.1 - (hide annotations) (download)
Sun Feb 19 16:50:34 2017 UTC (8 years, 4 months ago) by jmc
Branch: MAIN
testing on new head-node: add intel compiler (intel-2017.0.1) with openMPI
 test, but still running on sandy nodes, i.e., fdr partition.

1 jmc 1.1 #!/bin/bash
2     #SBATCH -J tst_ifcMPI
3     #SBATCH -p fdr
4     #SBATCH -t 12:00:00
5     #SBATCH --mem-per-cpu 4000
6     #SBATCH -N 1
7     #SBATCH --tasks-per-node 6
8     #SBATCH -e /home/jm_c/test_svante/output/tst_ifcMPI.stderr
9     #SBATCH -o /home/jm_c/test_svante/output/tst_ifcMPI.stdout
10    
11     # $Header: /u/gcmpack/MITgcm_contrib/test_scripts/svante/test_svante_pgi_mpi,v 1.6 2017/01/13 22:41:26 jmc Exp $
12     # $Name: $
13    
14     if test -f /etc/profile.d/modules.sh ; then . /etc/profile.d/modules.sh ; fi
15     if test -f /etc/profile.d/zz_modules.sh ; then . /etc/profile.d/zz_modules.sh ; fi
16     # Note: added "ulimit -s unlimited" in file "~/.bashrc"
17     # to pass big test (the 2 fizhi-cs-* test & adjoint tests) with MPI
18    
19     umask 0022
20     #- to get case insensitive "ls" (and order of tested experiments)
21     export LC_ALL="en_US.UTF-8"
22     echo " running on: "`hostname`
23     headNode='svante-login'
24    
25     dNam='svante'
26     HERE="$HOME/test_${dNam}"
27     OUTP="$HERE/output"; SavD="$HERE/send"
28     SEND="ssh $headNode $SavD/mpack"
29     TST_DISK="/net/fs09/d0/jm_c"
30     TST_DIR="$TST_DISK/test_${dNam}"
31    
32     cd $TST_DISK ; pwd
33     if test -d $TST_DIR ; then
34     echo "start from TST_DIR='$TST_DIR' at: "`date`
35     else
36     echo "ERROR: missing directory \"$TST_DIR\""
37     exit 1
38     fi
39    
40     sfx='ifcMPI'; typ=''
41     addExp=''
42     module add intel/2017.0.1
43     module add openmpi
44     #module add netcdf
45     OPTFILE="../tools/build_options/linux_amd64_ifort11"
46     #- needed for DIVA with MPI:
47     #export MPI_INC_DIR=$INC_MPI
48     options="$typ -j 2 -MPI 6"
49     #- need this to get "staf":
50     #export PATH="$PATH:$HOME/bin"
51    
52     dAlt=`date +%d` ; dAlt=`expr $dAlt % 3`
53     #if [ $dAlt -eq 1 ] ; then options="$options -fast"
54     #else options="$options -devel" ; fi
55    
56     checkOut=2 ; #options="$options -do"
57     #options="$options -nc" ; checkOut=1
58     #options="$options -q" ; checkOut=0
59    
60     NSLOTS=$SLURM_NTASKS
61     THEDATE=`date`
62     echo '********************************************************************************'
63     echo 'Start job '$THEDATE
64     echo 'NSLOTS = '$NSLOTS
65     echo '======= NODELIST ==============================================================='
66     echo $SLURM_NODELIST
67     cat /etc/redhat-release
68     echo '======= env ===================================================================='
69     env | grep SLURM
70     echo '======= modules ================================================================'
71     module list 2>&1
72     echo '================================================================================'
73    
74     cmdCVS='cvs -d :pserver:cvsanon@mitgcm.org:/u/gcmpack -q'
75     gcmDIR="MITgcm_$sfx"
76     cd $TST_DIR
77     #- check for disk space: relative space (99%) or absolute (10.G):
78     dsp=`df -P . | tail -1 | awk '{print $5}' | sed 's/%$//'`
79     if [ $dsp -gt 99 ] ; then
80     #dsp=`df -P . | tail -1 | awk '{print $4}'`
81     #if [ $dsp -le 100000000 ] ; then
82     echo 'Not enough space on this disk => do not run testreport.'
83     df .
84     exit
85     fi
86     if [ $checkOut -eq 1 ] ; then
87     if test -d $gcmDIR/CVS ; then
88     echo "cleaning output from $gcmDIR/verification :"
89     #- remove previous output tar files and tar & remove previous output-dir
90     /bin/rm -f $gcmDIR/verification/??_${dNam}-${sfx}_????????_?.tar.gz
91     ( cd $gcmDIR/verification
92     listD=`ls -1 -d ??_${dNam}-${sfx}_????????_? 2> /dev/null`
93     for dd in $listD
94     do
95     if test -d $dd ; then
96     tar -cf ${dd}".tar" $dd > /dev/null 2>&1 && gzip ${dd}".tar" && /bin/rm -rf $dd
97     RETVAL=$?
98     if test "x$RETVAL" != x0 ; then
99     echo "ERROR in tar+gzip prev outp-dir: $dd"
100     echo " on '"`hostname`"' (return val=$RETVAL) but continue"
101     fi
102     fi
103     done )
104     ( cd $gcmDIR/verification ; ../tools/do_tst_2+2 -clean )
105     ( cd $gcmDIR/verification ; ./testreport $typ -clean )
106     echo "cvs update of dir $gcmDIR :"
107     ( cd $gcmDIR ; $cmdCVS update -P -d ) 2>&1
108     RETVAL=$?
109     if test "x$RETVAL" != x0 ; then
110     echo "cvs update on '"`hostname`"' fail (return val=$RETVAL) => exit"
111     exit
112     fi
113     else
114     echo "no dir: $gcmDIR/CVS => try a fresh check-out"
115     checkOut=2
116     fi
117     fi
118     if [ $checkOut -eq 2 ] ; then
119     if test -e $gcmDIR ; then
120     echo -n "Removing working copy: $gcmDIR ..."
121     rm -rf $gcmDIR
122     echo " done"
123     fi
124     # make a local copy (instead of using CVS):
125     today=`date +%Y%m%d`
126     nCount=0; updFile='updated_code'
127     updDate=0 ; test -f $updFile && updDate=`cat $updFile`
128     while [ $today -gt $updDate ] ; do
129     nCount=`expr $nCount + 1`
130     if [ $nCount -gt 40 ] ; then
131     echo " waiting too long (nCount=$nCount) for updated code"
132     echo " today=$today , updDate=$updDate "
133     ls -l $updFile
134     exit
135     fi
136     sleep 60
137     updDate=0 ; test -f $updFile && updDate=`cat $updFile`
138     done
139     ls -l $updFile
140     echo " waited nCount=$nCount for updated code ($updDate) to copy"
141     if test -d MITgcm ; then
142     echo -n "Make local copy of dir 'MITgcm' to: $gcmDIR ..."
143     cp -pra MITgcm $gcmDIR
144     echo " done"
145     else echo " dir: MITgcm missing => exit" ; exit ; fi
146     fi
147    
148     #- change dir to $gcmDIR/verification dir:
149     if test -e $gcmDIR/verification ; then
150     if [ $checkOut -lt 2 ] ; then
151     echo " dir $gcmDIR/verification exist" ; fi
152     cd $gcmDIR/verification
153     else
154     echo "no dir: $gcmDIR/verification => exit"
155     exit
156     fi
157    
158     if [ $dAlt -eq 1 ] ; then
159     options="$options -fast"
160     echo ''
161     echo ./testreport $options -of $OPTFILE -odir ${dNam}-$sfx \
162     -send \"$SEND\" -sd $SavD -a jmc@mitgcm.org
163     ./testreport $options -of $OPTFILE -odir ${dNam}-$sfx \
164     -send "$SEND" -sd $SavD -a jmc@mitgcm.org
165     else
166     options="$options -devel"
167     echo ''
168     echo ./testreport $options -of $OPTFILE \
169     -repl_mk do_make_syntax.sh -obj -dd
170     ./testreport $options -of $OPTFILE \
171     -repl_mk do_make_syntax.sh -obj -dd 2>&1
172     echo ''
173     echo ./testreport $options -of $OPTFILE -odir ${dNam}-$sfx \
174     -q -send \"$SEND\" -sd $SavD -a jmc@mitgcm.org
175     ./testreport $options -of $OPTFILE -odir ${dNam}-$sfx \
176     -q -send "$SEND" -sd $SavD -a jmc@mitgcm.org
177     fi
178     echo ''
179     echo ../tools/do_tst_2+2 -mpi -o ${dNam}-$sfx \
180     -send \"$SEND\" -sd $SavD -a jmc@mitgcm.org
181     ../tools/do_tst_2+2 -mpi -o ${dNam}-$sfx \
182     -send "$SEND" -sd $SavD -a jmc@mitgcm.org

  ViewVC Help
Powered by ViewVC 1.1.22