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

Diff of /MITgcm/tools/example_scripts/ACESgrid/aces_test_gnu_mpi

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

revision 1.10 by jmc, Wed Jun 24 04:43:06 2009 UTC revision 1.25 by jmc, Thu Jun 13 22:01:34 2013 UTC
# Line 3  Line 3 
3  #PBS -q four-twelve  #PBS -q four-twelve
4  #PBS -N tst_gnu  #PBS -N tst_gnu
5  #PBS -l nodes=2:ppn=2  #PBS -l nodes=2:ppn=2
6  #PBS -e /home/jmc/test_ACES/output/tst_gnu.stderr  #PBS -e /home/jmc/test_aces/output/tst_gnu.stderr
7  #PBS -o /home/jmc/test_ACES/output/tst_gnu.stdout  #PBS -o /home/jmc/test_aces/output/tst_gnu.stdout
8    
9  # $Header$  # $Header$
10  # $Name$  # $Name$
11    
# Line 13  if test -f /etc/profile.d/modules.sh ; t Line 13  if test -f /etc/profile.d/modules.sh ; t
13      . /etc/profile.d/modules.sh      . /etc/profile.d/modules.sh
14  fi  fi
15  # Note: added "ulimit -s unlimited" in file "~/.bashrc"  # Note: added "ulimit -s unlimited" in file "~/.bashrc"
16  # to pass big test (the 2 fizhi-cs-* test & adjoint tests) with MPI  # to pass big test (the 2 fizhi-cs-* test & adjoint tests) with MPI
17    
18    dNam='aces'
19    TST_DIR="$HOME/test_$dNam"
20    echo "start from TST_DIR='$TST_DIR' at: "`date`
21    
22  umask 0022  umask 0022
23  #- to get case insensitive "ls" (and order of tested experiments)  #- to get case insensitive "ls" (and order of tested experiments)
24  export LC_ALL="en_US.UTF-8"  export LC_ALL="en_US.UTF-8"
25    
26  TST_DIR="/home/jmc/test_ACES/gcm_tests"  HERE=$TST_DIR/output
 HERE='/home/jmc/test_ACES/output'  
 cd $HERE  
   
27  sfx='gnu'  sfx='gnu'
28  module add mpich/$sfx   module add mpich/$sfx
29  OPTFILE="../tools/build_options/linux_ia32_g77+mpi_aces"   export MPI_INC_DIR='/usr/local/pkg/mpich/mpich-gcc/include'
30  options='-j 2 -mpi'   OPTFILE="../tools/build_options/linux_ia32_g77"
31     options="-j 2 -MPI 4 -mf $PBS_NODEFILE"
32     EXE="mpirun -machinefile TR_MFILE -v -np TR_NPROC ./mitgcmuv"
33    
34  checkOut=1  #- keep a copy of MPI_MFILE:
35    cp -p $PBS_NODEFILE $HERE"/mf_"$sfx
36    
37    checkOut=1 ; options="$options -do"
38  #options="$options -nc" ; checkOut=0  #options="$options -nc" ; checkOut=0
39  #options="$options -q"  ; checkOut=0  #options="$options -q"  ; checkOut=0
40    
41  MF=$HERE"/mf_"$sfx  addExp=0
42  cat $PBS_NODEFILE | sort | uniq > $MF  cvsArg="-d :pserver:cvsanon@mitgcm.org:/u/gcmpack"
 NCPU=`wc -l $MF | awk '{print $1}'`  
 EXE="mpirun -machinefile $MF -v -np $NCPU ./mitgcmuv"  
   
43  gcmDIR="MITgcm_$sfx"  gcmDIR="MITgcm_$sfx"
44  cd $TST_DIR  cd $TST_DIR
45  #- check for disk space:  #- check for disk space: relative space (99%) or absolute (1.G):
46  dsp=`df . | tail -1 | awk '{print $5}' | sed 's/%$//'`  #dsp=`df -P . | tail -1 | awk '{print $5}' | sed 's/%$//'`
47  if [ $dsp -gt 99 ] ; then  #if [ $dsp -gt 99 ] ; then
48    dsp=`df -P . | tail -1 | awk '{print $4}'`
49    if [ $dsp -le 1000000 ] ; then
50    echo 'Not enough space on this disk => do not run testreport.'    echo 'Not enough space on this disk => do not run testreport.'
51    df .    df .
52    exit    exit
53  fi  fi
54  if [ $checkOut -eq 1 ] ; then  if [ $checkOut -eq 1 ] ; then
55    if test -d $gcmDIR/CVS ; then    if test -d $gcmDIR/CVS ; then
56    #- remove previous output tar files and tar & remove previous output-dir
57        /bin/rm -f $gcmDIR/verification/??_${dNam}-${sfx}_????????_?.tar.gz
58        ( cd $gcmDIR/verification
59          listD=`ls -1 -d ??_${dNam}-${sfx}_????????_? 2> /dev/null`
60          for dd in $listD
61          do
62            if test -d $dd ; then
63              tar -cf ${dd}".tar" $dd > /dev/null 2>&1 && gzip ${dd}".tar" && /bin/rm -rf $dd
64              RETVAL=$?
65              if test "x$RETVAL" != x0 ; then
66                 echo "ERROR in tar+gzip prev outp-dir: $dd"
67                 echo " on '"`hostname`"' (return val=$RETVAL) but continue"
68              fi
69            fi
70          done )
71    #   ( cd $gcmDIR/verification ; ../tools/do_tst_2+2 -clean )
72      echo "cvs update of dir $gcmDIR :"      echo "cvs update of dir $gcmDIR :"
73      ( cd $gcmDIR ; cvs -q -d :pserver:cvsanon@mitgcm.org:/u/gcmpack update -P -d )      ( cd $gcmDIR ; cvs -q $cvsArg update -P -d ) 2>&1
74      /bin/rm -rf $gcmDIR/verification/??_aces-${sfx}_????????_?      RETVAL=$?
75        if test "x$RETVAL" != x0 ; then
76           echo "cvs update on '"`hostname`"' fail (return val=$RETVAL) => exit"
77           exit
78        fi
79    else    else
80      echo "no dir: $gcmDIR/CVS => try a fresh check-out"      echo "no dir: $gcmDIR/CVS => try a fresh check-out"
81      checkOut=2      checkOut=2
# Line 60  if [ $checkOut -eq 2 ] ; then Line 85  if [ $checkOut -eq 2 ] ; then
85    if test -e $gcmDIR ; then    if test -e $gcmDIR ; then
86       rm -rf $gcmDIR       rm -rf $gcmDIR
87    fi    fi
   cvs -d :pserver:cvsanon@mitgcm.org:/u/gcmpack co -P -d $gcmDIR MITgcm > /dev/null 2>&1  
88  # cvs co MITgcm  # cvs co MITgcm
89      cvs $cvsArg co -P -d $gcmDIR MITgcm > /dev/null 2>&1
90      if [ $addExp -ge 1 ]; then
91       echo " add dir: offline_cheapaml (from Contrib:verification_other)"
92       ( cd $gcmDIR/verification ; cvs $cvsArg co -P -d offline_cheapaml \
93                      MITgcm_contrib/verification_other/offline_cheapaml > /dev/null 2>&1 )
94      fi
95    /usr/bin/find $gcmDIR -type d | xargs chmod g+rxs    /usr/bin/find $gcmDIR -type d | xargs chmod g+rxs
96    /usr/bin/find $gcmDIR -type f | xargs chmod g+r    /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  else
105    if test -e $gcmDIR/verification ; then    echo "no dir: $gcmDIR/verification => exit"
106       echo "dir $gcmDIR/verification exist"    exit
   else  
      echo "no dir $gcmDIR/verification => exit"  
      exit  
   fi  
107  fi  fi
108    
 cd $gcmDIR/verification  
109  # avoid hanging in fizhi-cs-32x32x40 (due to I/O problems with g77)  # avoid hanging in fizhi-cs-32x32x40 (due to I/O problems with g77)
110  echo ./testreport $options -of $OPTFILE -command \"$EXE\" -odir aces-$sfx \  echo ./testreport $options -of $OPTFILE -command \"$EXE\" -odir ${dNam}-$sfx \
111   -skd fizhi-cs-32x32x40   -skd fizhi-cs-32x32x40
112  ./testreport $options -of $OPTFILE -command "$EXE" -odir aces-$sfx \  ./testreport $options -of $OPTFILE -command "$EXE" -odir ${dNam}-$sfx \
113   -skd fizhi-cs-32x32x40   -skd fizhi-cs-32x32x40
114    

Legend:
Removed from v.1.10  
changed lines
  Added in v.1.25

  ViewVC Help
Powered by ViewVC 1.1.22