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

Contents of /MITgcm/tools/example_scripts/ACESgrid/test_aces_gnu_mpi

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


Revision 1.21 - (show annotations) (download)
Wed Jun 18 19:33:08 2014 UTC (10 years, 3 months ago) by jmc
Branch: MAIN
CVS Tags: checkpoint64y, checkpoint64z, checkpoint65h, checkpoint65b, checkpoint65c, checkpoint65a, checkpoint65f, checkpoint65g, checkpoint65d, checkpoint65e, checkpoint65
Changes since 1.20: +5 -5 lines
adjust disk space check for running on local /scratch disk

1 #!/bin/bash
2 #
3 #PBS -q one
4 #PBS -N tst_gnu
5 #PBS -l nodes=1:ppn=6
6 #PBS -e /mit/jm_c/test_acesgrid/output/tst_gnu.stderr
7 #PBS -o /mit/jm_c/test_acesgrid/output/tst_gnu.stdout
8
9 # $Header: /u/gcmpack/MITgcm/tools/example_scripts/ACESgrid/test_aces_gnu_mpi,v 1.20 2014/05/08 18:44:03 jmc Exp $
10 # $Name: $
11
12 if test -f /etc/profile.d/modules.sh ; then
13 . /etc/profile.d/modules.sh
14 fi
15 # Note: added "ulimit -s unlimited" in file "~/.bashrc"
16 # to pass big test (the 2 fizhi-cs-* test & adjoint tests) with MPI
17
18 umask 0022
19 #- to get case insensitive "ls" (and order of tested experiments)
20 export LC_ALL="en_US.UTF-8"
21 echo " running on: "`hostname`
22
23 dNam='acesgrid'
24 HERE="$HOME/test_$dNam"
25 OUTP="$HERE/output"; SavD="$HERE/send"
26 SEND="ssh login $SavD/mpack"
27 TST_DIR="/scratch/jm_c/test_$dNam"
28
29 if test -d $TST_DIR ; then
30 echo "start from TST_DIR='$TST_DIR' at: "`date`
31 else
32 if test ! -d /scratch/jm_c ; then mkdir /scratch/jm_c ; fi
33 if test ! -d $TST_DIR ; then mkdir $TST_DIR ; fi
34 if test ! -d $TST_DIR ; then
35 echo "ERROR: Can't create directory \"$TST_DIR\""
36 exit 1
37 fi
38 echo "start in new dir TST_DIR='$TST_DIR' at: "`date`
39 fi
40
41 sfx='gnu'
42 addExp='global_ocean.gm_k3d'
43 module add gcc
44 module add mvapich2
45 OPTFILE="../tools/build_options/linux_amd64_gfortran"
46 options="-j 2 -MPI 6"
47
48 dAlt=`date +%d` ; dAlt=`expr $dAlt % 3`
49 if [ $dAlt -eq 1 ] ; then options="$options -fast" ; fi
50
51 checkOut=2
52 #options="$options -nc" ; checkOut=1
53 #options="$options -q" ; checkOut=0
54
55 #- keep a copy of MPI_MFILE:
56 cp -p $PBS_NODEFILE $OUTP"/mf_"$sfx
57
58 cvsArg="-d :pserver:cvsanon@mitgcm.org:/u/gcmpack"
59 gcmDIR="MITgcm_$sfx"
60 cd $TST_DIR
61 #- check for disk space: relative space (99%) or absolute (10.G):
62 dsp=`df -P . | tail -1 | awk '{print $5}' | sed 's/%$//'`
63 if [ $dsp -gt 99 ] ; then
64 #dsp=`df -P . | tail -1 | awk '{print $4}'`
65 #if [ $dsp -le 100000000 ] ; then
66 echo 'Not enough space on this disk => do not run testreport.'
67 df .
68 exit
69 fi
70 if [ $checkOut -eq 1 ] ; then
71 if test -d $gcmDIR/CVS ; then
72 #- remove previous output tar files and tar & remove previous output-dir
73 /bin/rm -f $gcmDIR/verification/??_${dNam}-${sfx}_????????_?.tar.gz
74 ( cd $gcmDIR/verification
75 listD=`ls -1 -d ??_${dNam}-${sfx}_????????_? 2> /dev/null`
76 for dd in $listD
77 do
78 if test -d $dd ; then
79 tar -cf ${dd}".tar" $dd > /dev/null 2>&1 && gzip ${dd}".tar" && /bin/rm -rf $dd
80 RETVAL=$?
81 if test "x$RETVAL" != x0 ; then
82 echo "ERROR in tar+gzip prev outp-dir: $dd"
83 echo " on '"`hostname`"' (return val=$RETVAL) but continue"
84 fi
85 fi
86 done )
87 # ( cd $gcmDIR/verification ; ../tools/do_tst_2+2 -clean )
88 echo "cvs update of dir $gcmDIR :"
89 ( cd $gcmDIR ; cvs -q $cvsArg update -P -d ) 2>&1
90 RETVAL=$?
91 if test "x$RETVAL" != x0 ; then
92 echo "cvs update on '"`hostname`"' fail (return val=$RETVAL) => exit"
93 exit
94 fi
95 else
96 echo "no dir: $gcmDIR/CVS => try a fresh check-out"
97 checkOut=2
98 fi
99 fi
100 if [ $checkOut -eq 2 ] ; then
101 if test -e $gcmDIR ; then
102 rm -rf $gcmDIR
103 fi
104 # cvs co MITgcm
105 cvs $cvsArg co -P -d $gcmDIR MITgcm > /dev/null 2>&1
106 for exp2add in $addExp ; do
107 echo " add dir: $exp2add (from Contrib:verification_other)"
108 ( cd $gcmDIR/verification ; cvs $cvsArg co -P -d $exp2add \
109 MITgcm_contrib/verification_other/$exp2add > /dev/null 2>&1 )
110 done
111 /usr/bin/find $gcmDIR -type d | xargs chmod g+rxs
112 /usr/bin/find $gcmDIR -type f | xargs chmod g+r
113 fi
114
115 #- change dir to $gcmDIR/verification dir:
116 if test -e $gcmDIR/verification ; then
117 if [ $checkOut -lt 2 ] ; then
118 echo " dir $gcmDIR/verification exist" ; fi
119 cd $gcmDIR/verification
120 else
121 echo "no dir: $gcmDIR/verification => exit"
122 exit
123 fi
124
125 echo ./testreport $options -of $OPTFILE -odir ${dNam}-$sfx \
126 -send \"$SEND\" -sd $SavD -a jmc@mitgcm.org
127 ./testreport $options -of $OPTFILE -odir ${dNam}-$sfx \
128 -send "$SEND" -sd $SavD -a jmc@mitgcm.org

  ViewVC Help
Powered by ViewVC 1.1.22