/[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.3 by jmc, Thu Dec 6 03:32:12 2007 UTC revision 1.12 by jmc, Thu Apr 1 15:46:03 2010 UTC
# Line 5  Line 5 
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
 # #PBS -V  
 #  ^- commented out => do not export env. variable !  
 #  since head node environment (& module) is too different from computer node  
8    
9  # $Header$  # $Header$
10  # $Name$  # $Name$
# Line 15  Line 12 
12  if test -f /etc/profile.d/modules.sh ; then  if test -f /etc/profile.d/modules.sh ; then
13      . /etc/profile.d/modules.sh      . /etc/profile.d/modules.sh
14  fi  fi
15  module add mpich/gnu  # 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  umask 0022
19  TST_DIR="/home/jmc/test_ACES/gcm_tests"  #- to get case insensitive "ls" (and order of tested experiments)
20  HERE='/home/jmc/test_ACES/output'  export LC_ALL="en_US.UTF-8"
 cd $HERE  
21    
22  FC=g77  TST_DIR="/home/jmc/test_ACES"
23  MF=$HERE"/mf_"$FC  HERE=$TST_DIR/output
24    #cd $HERE
25    
26    sfx='gnu'
27    module add mpich/$sfx
28    OPTFILE="../tools/build_options/linux_ia32_g77+mpi_aces"
29    options='-j 2 -mpi'
30    
31    checkOut=1
32    #options="$options -nc" ; checkOut=0
33    #options="$options -q"  ; checkOut=0
34    
35    MF=$HERE"/mf_"$sfx
36  cat $PBS_NODEFILE | sort | uniq > $MF  cat $PBS_NODEFILE | sort | uniq > $MF
37  NCPU=`wc -l $MF | awk '{print $1}'`  NCPU=`wc -l $MF | awk '{print $1}'`
38  EXE="mpirun -machinefile $MF -v -np $NCPU ./mitgcmuv"  EXE="mpirun -machinefile $MF -v -np $NCPU ./mitgcmuv"
39    
40  # cat << EOF > $HERE"/.cvspass"  gcmDIR="MITgcm_$sfx"
41  # /1 :pserver:cvsanon@mitgcm.org:2401/u/gcmpack Ah<Zy=0=  cd $TST_DIR
42  # EOF  #- check for disk space:
43  tmpDIR=${TST_DIR}"/tmp_gnu"  dsp=`df . | tail -1 | awk '{print $5}' | sed 's/%$//'`
44  if test -e $tmpDIR ; then  if [ $dsp -gt 99 ] ; then
45      rm -rf $tmpDIR    echo 'Not enough space on this disk => do not run testreport.'
46      df .
47      exit
48    fi
49    if [ $checkOut -eq 1 ] ; then
50      if test -d $gcmDIR/CVS ; then
51        /bin/rm -rf $gcmDIR/verification/??_aces-${sfx}_????????_?
52    #   ( cd $gcmDIR/verification ; ../tools/do_tst_2+2 -clean )
53        echo "cvs update of dir $gcmDIR :"
54        ( cd $gcmDIR ; cvs -q -d :pserver:cvsanon@mitgcm.org:/u/gcmpack update -P -d )
55      else
56        echo "no dir: $gcmDIR/CVS => try a fresh check-out"
57        checkOut=2
58      fi
59  fi  fi
60  mkdir $tmpDIR  if [ $checkOut -eq 2 ] ; then
61  cd $tmpDIR    if test -e $gcmDIR ; then
62  cvs -d :pserver:cvsanon@mitgcm.org:/u/gcmpack co -P MITgcm > /dev/null 2>&1       rm -rf $gcmDIR
63  #  cvs co MITgcm    fi
64  /usr/bin/find $tmpDIR -type d | xargs chmod g+rxs    cvs -d :pserver:cvsanon@mitgcm.org:/u/gcmpack co -P -d $gcmDIR MITgcm > /dev/null 2>&1
65  /usr/bin/find $tmpDIR -type f | xargs chmod g+r  # cvs co MITgcm
66      /usr/bin/find $gcmDIR -type d | xargs chmod g+rxs
67  cd MITgcm/verification    /usr/bin/find $gcmDIR -type f | xargs chmod g+r
68  OPTFILE="../tools/build_options/linux_ia32_"$FC"+mpi_aces"  else
69  # ./testreport -j 2 -mpi -of $OPTFILE -command "$EXE" -a 'edhill@mitgcm.org'    if test -e $gcmDIR/verification ; then
70  echo ./testreport -j 2 -mpi -of $OPTFILE -command "$EXE" -odir aces-gnu       echo "dir $gcmDIR/verification exist"
71  ./testreport -j 2 -mpi -of $OPTFILE -command "$EXE" -odir aces-gnu    else
72         echo "no dir $gcmDIR/verification => exit"
73         exit
74      fi
75    fi
76    
77    cd $gcmDIR/verification
78    # avoid hanging in fizhi-cs-32x32x40 (due to I/O problems with g77)
79    echo ./testreport $options -of $OPTFILE -command \"$EXE\" -odir aces-$sfx \
80     -skd fizhi-cs-32x32x40
81    ./testreport $options -of $OPTFILE -command "$EXE" -odir aces-$sfx \
82     -skd fizhi-cs-32x32x40
83    

Legend:
Removed from v.1.3  
changed lines
  Added in v.1.12

  ViewVC Help
Powered by ViewVC 1.1.22