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

Contents of /MITgcm/tools/example_scripts/ACESgrid/test_aces_pgi_mpi

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


Revision 1.9 - (show annotations) (download)
Tue May 1 13:20:39 2012 UTC (12 years, 1 month ago) by jmc
Branch: MAIN
CVS Tags: checkpoint63r, checkpoint64a, checkpoint64c, checkpoint64b, checkpoint63q, checkpoint63n, checkpoint63o, checkpoint63p, checkpoint63s, checkpoint64
Changes since 1.8: +16 -2 lines
cleaning of previous output-dir: save latest as a tar file

1 #!/bin/bash
2 #
3 #PBS -q one
4 #PBS -N tst_pgi
5 #PBS -l nodes=1:ppn=6
6 #PBS -e /mit/jm_c/test_acesgrid/output/tst_pgi.stderr
7 #PBS -o /mit/jm_c/test_acesgrid/output/tst_pgi.stdout
8
9 # $Header: /u/gcmpack/MITgcm/tools/example_scripts/ACESgrid/test_aces_pgi_mpi,v 1.8 2012/03/23 21:09:55 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 dNam='acesgrid'
19 TST_DIR="$HOME/test_$dNam"
20 echo "start from TST_DIR='$TST_DIR' at: "`date`
21
22 umask 0022
23 #- to get case insensitive "ls" (and order of tested experiments)
24 export LC_ALL="en_US.UTF-8"
25
26 HERE=$TST_DIR/output
27 sfx='pgi'
28 module add pgi
29 module add mvapich
30 #- with mpich2, needs module torque to run
31 #module add torque
32 #module add pgi
33 #module add mvapich2
34 OPTFILE="../tools/build_options/linux_amd64_pgf77"
35 #options="-j 2 -MPI 6 -mf $PBS_NODEFILE"
36 #EXE="mpirun -machinefile TR_MFILE -v -np TR_NPROC ./mitgcmuv"
37 options="-j 2 -MPI 6"
38 EXE="mpirun -v -np TR_NPROC ./mitgcmuv"
39
40 dAlt=`date +%d` ; dAlt=`expr $dAlt % 3`
41 if [ $dAlt -eq 1 ] ; then options="$options -fast" ; fi
42
43 #- keep a copy of MPI_MFILE:
44 cp -p $PBS_NODEFILE $HERE"/mf_"$sfx
45
46 checkOut=1
47 #options="$options -nc" ; checkOut=0
48 #options="$options -q" ; checkOut=0
49
50 gcmDIR="MITgcm_$sfx"
51 cd $TST_DIR
52 #- check for disk space:
53 dsp=`df -P . | tail -1 | awk '{print $5}' | sed 's/%$//'`
54 if [ $dsp -gt 99 ] ; then
55 echo 'Not enough space on this disk => do not run testreport.'
56 df .
57 exit
58 fi
59 if [ $checkOut -eq 1 ] ; then
60 if test -d $gcmDIR/CVS ; then
61 #- remove previous output tar files and tar & remove previous output-dir
62 /bin/rm -f $gcmDIR/verification/??_${dNam}-${sfx}_????????_?.tar.gz
63 ( cd $gcmDIR/verification
64 listD=`ls -1 -d ??_${dNam}-${sfx}_????????_?`
65 for dd in $listD
66 do
67 if test -d $dd ; then
68 tar -cf ${dd}".tar" $dd > /dev/null 2>&1 && gzip ${dd}".tar" && /bin/rm -rf $dd
69 RETVAL=$?
70 if test "x$RETVAL" != x0 ; then
71 echo "ERROR in tar+gzip prev outp-dir: $dd"
72 echo " on '"`hostname`"' (return val=$RETVAL) but continue"
73 fi
74 fi
75 done )
76 ( cd $gcmDIR/verification ; ../tools/do_tst_2+2 -clean )
77 echo "cvs update of dir $gcmDIR :"
78 ( cd $gcmDIR ; cvs -q -d :pserver:cvsanon@mitgcm.org:/u/gcmpack update -P -d ) 2>&1
79 RETVAL=$?
80 if test "x$RETVAL" != x0 ; then
81 echo "cvs update on '"`hostname`"' fail (return val=$RETVAL) => exit"
82 exit
83 fi
84 else
85 echo "no dir: $gcmDIR/CVS => try a fresh check-out"
86 checkOut=2
87 fi
88 fi
89 if [ $checkOut -eq 2 ] ; then
90 if test -e $gcmDIR ; then
91 rm -rf $gcmDIR
92 fi
93 # cvs co MITgcm
94 cvs -d :pserver:cvsanon@mitgcm.org:/u/gcmpack co -P -d $gcmDIR MITgcm > /dev/null 2>&1
95 /usr/bin/find $gcmDIR -type d | xargs chmod g+rxs
96 /usr/bin/find $gcmDIR -type f | xargs chmod g+r
97 fi
98
99 #- change dir to $gcmDIR/verification dir:
100 if test -e $gcmDIR/verification ; then
101 if [ $checkOut -lt 2 ] ; then
102 echo " dir $gcmDIR/verification exist" ; fi
103 cd $gcmDIR/verification
104 else
105 echo "no dir: $gcmDIR/verification => exit"
106 exit
107 fi
108
109 echo ./testreport $options -of $OPTFILE -command \"$EXE\" -odir ${dNam}-$sfx
110 ./testreport $options -of $OPTFILE -command "$EXE" -odir ${dNam}-$sfx
111
112 echo ''
113 #echo ../tools/do_tst_2+2 -mpi -mf $PBS_NODEFILE -exe \"$EXE\" -o ${dNam}-$sfx -a NONE
114 #../tools/do_tst_2+2 -mpi -mf $PBS_NODEFILE -exe "$EXE" -o ${dNam}-$sfx -a NONE
115 echo ../tools/do_tst_2+2 -mpi -exe \"$EXE\" -o ${dNam}-$sfx -a NONE
116 ../tools/do_tst_2+2 -mpi -exe "$EXE" -o ${dNam}-$sfx -a NONE

  ViewVC Help
Powered by ViewVC 1.1.22