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

Annotation of /MITgcm_contrib/test_scripts/engaging/test_engag_ifort_mpi

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


Revision 1.1 - (hide annotations) (download)
Sat Jul 16 13:47:39 2016 UTC (10 years, 1 month ago) by jmc
Branch: MAIN
test intel compiler with intel MPI (impi) and -devel

1 jmc 1.1 #!/bin/bash
2     #SBATCH -J tst_ifort
3     #SBATCH -p sched_mit_hill
4     #SBATCH --mem-per-cpu 4000
5     #SBATCH -n 6
6     #SBATCH -N 2
7     #SBATCH -e /home/jm_c/test_engaging/output/tst_ifort.stderr
8     #SBATCH -o /home/jm_c/test_engaging/output/tst_ifort.stdout
9    
10     # $Header: /u/gcmpack/MITgcm_contrib/test_scripts/engaging/test_engag_op64_adm,v 1.4 2016/03/09 15:26:50 jmc Exp $
11     # $Name: $
12    
13     if test -f /etc/profile.d/modules.sh ; then
14     . /etc/profile.d/modules.sh
15     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    
24     dNam='engaging'
25     HERE="$HOME/test_$dNam"
26     OUTP="$HERE/output"; SavD="$HERE/send"
27     SEND="ssh eofe4 $SavD/mpack"
28     TST_DIR="/pool001/jm_c/test_$dNam"
29    
30     if test -d $TST_DIR ; then
31     echo "start from TST_DIR='$TST_DIR' at: "`date`
32     else
33     #if test ! -d /scratch/jm_c ; then mkdir /scratch/jm_c ; fi
34     #if test ! -d $TST_DIR ; then mkdir $TST_DIR ; fi
35     #if test ! -d $TST_DIR ; then
36     # echo "ERROR: Can't create directory \"$TST_DIR\""
37     # exit 1
38     #fi
39     #echo "start in new dir TST_DIR='$TST_DIR' at: "`date`
40     echo "ERROR: missing directory \"$TST_DIR\""
41     exit 1
42     fi
43    
44     sfx='ifort'; typ=''
45     addExp=''
46     module add slurm
47     module add gcc
48     module add engaging/intel/2013.1.046
49     #export MPI_INC_DIR="$MPI_HOME/include"
50     OPTFILE="../tools/build_options/linux_amd64_ifort+impi"
51     mpiCMD="mpirun -env I_MPI_DEBUG 2 -n TR_NPROC ./mitgcmuv"
52     #options="-j 2 -devel -gsl"
53     options="$typ -MPI 6"
54     #export OMP_NUM_THREADS=2
55     #export OMP_SLAVE_STACK_SIZE=400m
56     #export GSL_IEEE_MODE=double-precision,mask-underflow,mask-denormalized
57     ulimit -s unlimited
58     #- need this to get "staf":
59     export PATH="$PATH:$HOME/bin"
60    
61     dAlt=`date +%d` ; dAlt=`expr $dAlt % 3`
62     #if [ $dAlt -eq 1 ] ; then options="$options -fast"
63     #else options="$options -devel" ; fi
64     options="$options -devel"
65    
66     checkOut=1 ; #options="$options -do"
67     #options="$options -nc" ; checkOut=1
68     #options="$options -q" ; checkOut=0
69    
70     NSLOTS=$SLURM_NTASKS
71     THEDATE=`date`
72     echo '********************************************************************************'
73     echo 'Start job '$THEDATE
74     echo 'NSLOTS = '$NSLOTS
75     echo '======= NODELIST ==============================================================='
76     echo $SLURM_NODELIST
77     cat /etc/redhat-release
78     echo '======= env ===================================================================='
79     env | grep SLURM
80     echo '======= modules ================================================================'
81     module list 2>&1
82     echo '================================================================================'
83    
84     #- keep a copy of MPI_MFILE:
85     #cp -p $PBS_NODEFILE $OUTP"/mf_"$sfx
86    
87     cmdCVS='cvs -d :pserver:cvsanon@mitgcm.org:/u/gcmpack -q'
88     gcmDIR="MITgcm_$sfx"
89     cd $TST_DIR
90     #- check for disk space: relative space (99%) or absolute (10.G):
91     dsp=`df -P . | tail -1 | awk '{print $5}' | sed 's/%$//'`
92     if [ $dsp -gt 99 ] ; then
93     #dsp=`df -P . | tail -1 | awk '{print $4}'`
94     #if [ $dsp -le 100000000 ] ; then
95     echo 'Not enough space on this disk => do not run testreport.'
96     df .
97     exit
98     fi
99     if [ $checkOut -eq 1 ] ; then
100     if test -d $gcmDIR/CVS ; then
101     echo "cleaning output from $gcmDIR/verification :"
102     #- remove previous output tar files and tar & remove previous output-dir
103     /bin/rm -f $gcmDIR/verification/??_${dNam}-${sfx}_????????_?.tar.gz
104     ( cd $gcmDIR/verification
105     listD=`ls -1 -d ??_${dNam}-${sfx}_????????_? 2> /dev/null`
106     for dd in $listD
107     do
108     if test -d $dd ; then
109     tar -cf ${dd}".tar" $dd > /dev/null 2>&1 && gzip ${dd}".tar" && /bin/rm -rf $dd
110     RETVAL=$?
111     if test "x$RETVAL" != x0 ; then
112     echo "ERROR in tar+gzip prev outp-dir: $dd"
113     echo " on '"`hostname`"' (return val=$RETVAL) but continue"
114     fi
115     fi
116     done )
117     echo "clean tst_2+2 + testreport output (+ Makefile_syntax files)"
118     ( cd $gcmDIR/verification ; ../tools/do_tst_2+2 -clean )
119     ( cd $gcmDIR/verification ; ./testreport $typ -clean )
120     ( cd $gcmDIR/verification ; rm -f */build/Makefile_syntax )
121     echo "cvs update of dir $gcmDIR :"
122     ( cd $gcmDIR ; $cmdCVS update -P -d ) 2>&1
123     RETVAL=$?
124     if test "x$RETVAL" != x0 ; then
125     echo "cvs update on '"`hostname`"' fail (return val=$RETVAL) => exit"
126     exit
127     fi
128     else
129     echo "no dir: $gcmDIR/CVS => try a fresh check-out"
130     checkOut=2
131     fi
132     fi
133     if [ $checkOut -eq 2 ] ; then
134     if test -e $gcmDIR ; then
135     echo -n "Removing working copy: $gcmDIR ..."
136     rm -rf $gcmDIR
137     echo " done"
138     fi
139     # cvs co MITgcm
140     echo "Downloading using '$cmdCVS co -P -d $gcmDIR MITgcm' ..."
141     $cmdCVS co -P -d $gcmDIR MITgcm > /dev/null
142     RETVAL=$?
143     if test "x$RETVAL" != x0 ; then
144     echo "cvs co on '"`hostname`"' fail (return val=$RETVAL) => exit"
145     exit
146     else echo " done" ; fi
147     if test -d $gcmDIR/verification ; then
148     for exp2add in $addExp ; do
149     echo " add dir: $exp2add (from Contrib:verification_other)"
150     ( cd $gcmDIR/verification ; $cmdCVS co -P -d $exp2add \
151     MITgcm_contrib/verification_other/$exp2add > /dev/null )
152     done
153     /usr/bin/find $gcmDIR -type d | xargs chmod g+rxs
154     /usr/bin/find $gcmDIR -type f | xargs chmod g+r
155     fi
156     fi
157    
158     #- change dir to $gcmDIR/verification dir:
159     if test -e $gcmDIR/verification ; then
160     if [ $checkOut -lt 2 ] ; then
161     echo " dir $gcmDIR/verification exist" ; fi
162     cd $gcmDIR/verification
163     else
164     echo "no dir: $gcmDIR/verification => exit"
165     exit
166     fi
167    
168     echo ''
169     echo ./testreport $options -of $OPTFILE -odir ${dNam}-$sfx \
170     -nc -repl_mk do_make_syntax.sh -obj -dd
171     ./testreport $options -of $OPTFILE -odir ${dNam}-$sfx \
172     -nc -repl_mk do_make_syntax.sh -obj -dd
173    
174     echo ''
175     echo ./testreport $options -of $OPTFILE -odir ${dNam}-$sfx \
176     -q -send \"$SEND\" -sd $SavD -a jmc@mitgcm.org
177     # -command \"$mpiCMD\" -send \"$SEND\" -sd $SavD -a jmc@mitgcm.org
178     ./testreport $options -of $OPTFILE -odir ${dNam}-$sfx \
179     -q -send "$SEND" -sd $SavD -a jmc@mitgcm.org
180     # -command "$mpiCMD" -send "$SEND" -sd $SavD -a jmc@mitgcm.org
181    
182     echo ''
183     echo ../tools/do_tst_2+2 -mpi -o ${dNam}-$sfx \
184     -send \"$SEND\" -sd $SavD -a jmc@mitgcm.org
185     ../tools/do_tst_2+2 -mpi -o ${dNam}-$sfx \
186     -send "$SEND" -sd $SavD -a jmc@mitgcm.org
187    

  ViewVC Help
Powered by ViewVC 1.1.22