/[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.2 by jmc, Wed Aug 8 18:47:48 2007 UTC revision 1.7 by jmc, Thu Aug 28 18:35:42 2008 UTC
# Line 1  Line 1 
1  #!/bin/bash  #!/bin/bash
2  #  #
3  #PBS -q long  #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
 # #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$
11    
 if test -f /etc/profile.d/modules.sh ; then  
     . /etc/profile.d/modules.sh  
 fi  
 module add mpich/gnu  
   
12  umask 0022  umask 0022
13  TST_DIR="/home/jmc/test_ACES/gcm_tests"  TST_DIR="/home/jmc/test_ACES/gcm_tests"
14  HERE='/home/jmc/test_ACES/output'  HERE='/home/jmc/test_ACES/output'
15  cd $HERE  cd $HERE
16    
17  FC=g77  if test -f /etc/profile.d/modules.sh ; then
18  MF=$HERE"/mf_"$FC      . /etc/profile.d/modules.sh
19    fi
20    
21    sfx='gnu'
22    module add mpich/$sfx
23    OPTFILE="../tools/build_options/linux_ia32_g77+mpi_aces"
24    options='-j 2 -mpi'
25    
26    checkOut=1
27    #options="$options -nc" ; checkOut=0
28    #options="$options -q"  ; checkOut=0
29    
30    MF=$HERE"/mf_"$sfx
31  cat $PBS_NODEFILE | sort | uniq > $MF  cat $PBS_NODEFILE | sort | uniq > $MF
32  NCPU=`wc -l $MF | awk '{print $1}'`  NCPU=`wc -l $MF | awk '{print $1}'`
33  EXE="mpirun -machinefile $MF -v -np $NCPU ./mitgcmuv"  EXE="mpirun -machinefile $MF -v -np $NCPU ./mitgcmuv"
# Line 31  EXE="mpirun -machinefile $MF -v -np $NCP Line 35  EXE="mpirun -machinefile $MF -v -np $NCP
35  # cat << EOF > $HERE"/.cvspass"  # cat << EOF > $HERE"/.cvspass"
36  # /1 :pserver:cvsanon@mitgcm.org:2401/u/gcmpack Ah<Zy=0=  # /1 :pserver:cvsanon@mitgcm.org:2401/u/gcmpack Ah<Zy=0=
37  # EOF  # EOF
38  tmpDIR=${TST_DIR}"/tmp_gnu"  gcmDIR="MITgcm_$sfx"
39  if test -e $tmpDIR ; then  cd $TST_DIR
40      rm -rf $tmpDIR  #- check for disk space:
41    dsp=`df . | tail -1 | awk '{print $5}' | sed 's/%$//'`
42    if [ $dsp -gt 99 ] ; then
43      echo 'Not enough space on this disk => do not run testreport.'
44      df .
45      exit
46  fi  fi
47  mkdir $tmpDIR  if [ $checkOut -eq 1 ] ; then
48  cd $tmpDIR    if test -d $gcmDIR/CVS ; then
49  cvs -d :pserver:cvsanon@mitgcm.org:/u/gcmpack co -P MITgcm > /dev/null 2>&1      echo "cvs update of dir $gcmDIR :"
50  #  cvs co MITgcm      ( cd $gcmDIR ; cvs -q -d :pserver:cvsanon@mitgcm.org:/u/gcmpack update -P -d )
51  /usr/bin/find $tmpDIR -type d | xargs chmod g+rxs      /bin/rm -rf $gcmDIR/verification/tr_aces-${sfx}_????????_?
52  /usr/bin/find $tmpDIR -type f | xargs chmod g+r    else
53        echo "no dir: $gcmDIR/CVS => try a fresh check-out"
54  cd MITgcm/verification      checkOut=2
55  OPTFILE="../tools/build_options/linux_ia32_"$FC"+mpi_aces"    fi
56  # ./testreport -j 2 -mpi -of $OPTFILE -command "$EXE" -a 'edhill@mitgcm.org'  fi
57  echo ./testreport -j 2 -mpi -of $OPTFILE -command "$EXE"  if [ $checkOut -eq 2 ] ; then
58  ./testreport -j 2 -mpi -of $OPTFILE -command "$EXE"    if test -e $gcmDIR ; then
59         rm -rf $gcmDIR
60      fi
61      cvs -d :pserver:cvsanon@mitgcm.org:/u/gcmpack co -P -d $gcmDIR MITgcm > /dev/null 2>&1
62    # cvs co MITgcm
63      /usr/bin/find $gcmDIR -type d | xargs chmod g+rxs
64      /usr/bin/find $gcmDIR -type f | xargs chmod g+r
65    else
66      if test -e $gcmDIR/verification ; then
67         echo "dir $gcmDIR/verification exist"
68      else
69         echo "no dir $gcmDIR/verification => exit"
70         exit
71      fi
72    fi
73    
74    cd $gcmDIR/verification
75    echo ./testreport $options -of $OPTFILE -command \"$EXE\" -odir aces-$sfx
76    ./testreport $options -of $OPTFILE -command "$EXE" -odir aces-$sfx
77    

Legend:
Removed from v.1.2  
changed lines
  Added in v.1.7

  ViewVC Help
Powered by ViewVC 1.1.22