/[MITgcm]/MITgcm/tools/example_scripts/ACESgrid/aces_test_ifc_mp2
ViewVC logotype

Contents of /MITgcm/tools/example_scripts/ACESgrid/aces_test_ifc_mp2

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


Revision 1.3 - (show annotations) (download)
Thu May 8 18:44:03 2014 UTC (10 years ago) by jmc
Branch: MAIN
CVS Tags: checkpoint64y, checkpoint64x, checkpoint64z, checkpoint66g, checkpoint66f, checkpoint66e, checkpoint66d, checkpoint66c, checkpoint66b, checkpoint66a, checkpoint65z, checkpoint65x, checkpoint65y, checkpoint65r, checkpoint65s, checkpoint65p, checkpoint65q, checkpoint65v, checkpoint65w, checkpoint65t, checkpoint65u, checkpoint65j, checkpoint65k, checkpoint65h, checkpoint65i, checkpoint65n, checkpoint65o, checkpoint65l, checkpoint65m, checkpoint65b, checkpoint65c, checkpoint65a, checkpoint65f, checkpoint65g, checkpoint65d, checkpoint65e, checkpoint65
Changes since 1.2: +14 -15 lines
adjust previous modifications

1 #!/bin/bash
2 #
3 #PBS -q long
4 #PBS -N tst_mp2
5 #PBS -l nodes=3:ppn=2
6 #PBS -e /home/jmc/test_aces/output/tst_mp2.stderr
7 #PBS -o /home/jmc/test_aces/output/tst_mp2.stdout
8
9 # $Header: /u/gcmpack/MITgcm/tools/example_scripts/ACESgrid/aces_test_ifc_mp2,v 1.2 2014/05/07 16:22:24 jmc Exp $
10 # $Name: $
11
12 # ACES-grid PBS-batch script for MPI+Multi-Threaded test using ifort (v9) & mpich2
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='aces'
26 HERE="$HOME/test_$dNam"
27 OUTP="$HERE/output"; SavD="$HERE/send"
28 SEND="ssh geo $SavD/mpack"
29 TST_DIR=$HERE
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 fi
42
43 sfx='mp2'
44 addExp=''
45 #- to build:
46 module add ifc/9.0.021 icc/9.0.021 intel/9.0
47 module add mpich2/1.0.3/intel
48 module add netcdf/3.6.1/icc
49 export MPI_INC_DIR='/usr/local/pkg/mpich2/mpich2-1.0.3/intel/include'
50 #- to run:
51 module add mpiexec
52 OPTFILE="../tools/build_options/linux_ia32_ifort"
53 options="-j 2 -MPI 3 -mth -mf $PBS_NODEFILE -devel"
54 export OMP_NUM_THREADS=2
55 EXE="mpiexec -pernode -comm pmi -np TR_NPROC ./mitgcmuv"
56 #export KMP_STACKSIZE=400m <-- added in file "~/.bashrc"
57
58 checkOut=1 ; options="$options -do"
59 #options="$options -nc" ; checkOut=0
60 #options="$options -q" ; checkOut=0
61
62 #- keep a copy of MPI_MFILE:
63 cp -p $PBS_NODEFILE $OUTP"/mf_"$sfx
64
65 cvsArg="-d :pserver:cvsanon@mitgcm.org:/u/gcmpack"
66 gcmDIR="MITgcm_$sfx"
67 cd $TST_DIR
68 #- check for disk space: relative space (99%) or absolute (1.G):
69 #dsp=`df -P . | tail -1 | awk '{print $5}' | sed 's/%$//'`
70 #if [ $dsp -gt 99 ] ; then
71 dsp=`df -P . | tail -1 | awk '{print $4}'`
72 if [ $dsp -le 1000000 ] ; then
73 echo 'Not enough space on this disk => do not run testreport.'
74 df .
75 exit
76 fi
77 if [ $checkOut -eq 1 ] ; then
78 if test -d $gcmDIR/CVS ; then
79 #- remove previous output tar files and tar & remove previous output-dir
80 /bin/rm -f $gcmDIR/verification/??_${dNam}-${sfx}_????????_?.tar.gz
81 ( cd $gcmDIR/verification
82 listD=`ls -1 -d ??_${dNam}-${sfx}_????????_? 2> /dev/null`
83 for dd in $listD
84 do
85 if test -d $dd ; then
86 tar -cf ${dd}".tar" $dd > /dev/null 2>&1 && gzip ${dd}".tar" && /bin/rm -rf $dd
87 RETVAL=$?
88 if test "x$RETVAL" != x0 ; then
89 echo "ERROR in tar+gzip prev outp-dir: $dd"
90 echo " on '"`hostname`"' (return val=$RETVAL) but continue"
91 fi
92 fi
93 done )
94 # ( cd $gcmDIR/verification ; ../tools/do_tst_2+2 -clean )
95 #- clean-up previous TAF output temp dir (generated on old system like here)
96 # ( cd $gcmDIR/verification ; /bin/rm -rf */build/PaxHeaders.[0-9]* )
97 echo "cvs update of dir $gcmDIR :"
98 ( cd $gcmDIR ; cvs -q $cvsArg update -P -d ) 2>&1
99 RETVAL=$?
100 if test "x$RETVAL" != x0 ; then
101 echo "cvs update on '"`hostname`"' fail (return val=$RETVAL) => exit"
102 exit
103 fi
104 else
105 echo "no dir: $gcmDIR/CVS => try a fresh check-out"
106 checkOut=2
107 fi
108 fi
109 if [ $checkOut -eq 2 ] ; then
110 if test -e $gcmDIR ; then
111 rm -rf $gcmDIR
112 fi
113 # cvs co MITgcm
114 cvs $cvsArg co -P -d $gcmDIR MITgcm > /dev/null 2>&1
115 for exp2add in $addExp ; do
116 echo " add dir: $exp2add (from Contrib:verification_other)"
117 ( cd $gcmDIR/verification ; cvs $cvsArg co -P -d $exp2add \
118 MITgcm_contrib/verification_other/$exp2add > /dev/null 2>&1 )
119 done
120 /usr/bin/find $gcmDIR -type d | xargs chmod g+rxs
121 /usr/bin/find $gcmDIR -type f | xargs chmod g+r
122 fi
123
124 #- change dir to $gcmDIR/verification dir:
125 if test -e $gcmDIR/verification ; then
126 if [ $checkOut -lt 2 ] ; then
127 echo " dir $gcmDIR/verification exist" ; fi
128 cd $gcmDIR/verification
129 else
130 echo "no dir: $gcmDIR/verification => exit"
131 exit
132 fi
133
134 #-- in case mpiexec get stuck, run this script in background to check
135 check_sh=${dNam}_check_$sfx
136 if test -x $OUTP/$check_sh ; then
137 echo "start $check_sh in background"
138 mv -f $OUTP/${check_sh}.log $OUTP/${check_sh}.log_bak
139 ( cd $OUTP ; ./$check_sh > ${check_sh}.log 2>&1 ) &
140 fi
141
142 echo ./testreport $options -of $OPTFILE -command \"$EXE\" -odir ${dNam}-$sfx \
143 -send \"$SEND\" -sd $SavD -a jmc@mitgcm.org
144 ./testreport $options -of $OPTFILE -command "$EXE" -odir ${dNam}-$sfx \
145 -send "$SEND" -sd $SavD -a jmc@mitgcm.org
146
147 #echo ''
148 #echo ../tools/do_tst_2+2 -mpi -mf $PBS_NODEFILE -exe \"$EXE\" -o ${dNam}-$sfx \
149 # -send \"$SEND\" -sd $SavD -a jmc@mitgcm.org
150 ## -a NONE
151 #../tools/do_tst_2+2 -mpi -mf $PBS_NODEFILE -exe "$EXE" -o ${dNam}-$sfx \
152 # -send "$SEND" -sd $SavD -a jmc@mitgcm.org
153 ## -a NONE

  ViewVC Help
Powered by ViewVC 1.1.22