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

Diff of /MITgcm/tools/example_scripts/ACESgrid/aces_test_ifc_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.15 by jmc, Thu May 20 19:22:30 2010 UTC
# Line 1  Line 1 
1  #!/bin/bash  #!/bin/bash
2  #  #
3  #PBS -q long  #PBS -q four-twelve
4  #PBS -N tst_ifc  #PBS -N tst_ifc
5  #PBS -l nodes=2:ppn=2  #PBS -l nodes=2:ppn=2
6  #PBS -e /home/jmc/test_ACES/output/tst_ifc.stderr  #PBS -e /home/jmc/test_ACES/output/tst_ifc.stderr
7  #PBS -o /home/jmc/test_ACES/output/tst_ifc.stdout  #PBS -o /home/jmc/test_ACES/output/tst_ifc.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    
12    # ACES-grid PBS-batch script for MPI test using ifort (default=v8) & mpich
13    
14  if test -f /etc/profile.d/modules.sh ; then  if test -f /etc/profile.d/modules.sh ; then
15      . /etc/profile.d/modules.sh      . /etc/profile.d/modules.sh
16  fi  fi
17  module add mpich/intel  # Note: added "ulimit -s unlimited" in file "~/.bashrc"
18    # to pass big test (the 2 fizhi-cs-* test & adjoint tests) with MPI
19    
20  umask 0022  umask 0022
21  TST_DIR="/home/jmc/test_ACES/gcm_tests"  #- to get case insensitive "ls" (and order of tested experiments)
22  HERE='/home/jmc/test_ACES/output'  export LC_ALL="en_US.UTF-8"
23  cd $HERE  
24    TST_DIR="/home/jmc/test_ACES"
25    HERE=$TST_DIR/output
26    #cd $HERE
27    
28    sfx='ifc'
29     module add mpich/intel
30     module add netcdf/3.6.1/icc
31     export MPI_INC_DIR='/usr/local/pkg/mpich/mpich-intel/include/'
32     OPTFILE="../tools/build_options/linux_ia32_ifort+mpi_aces"
33    #OPTFILE="$HERE/linux_ia32_ifort+mpi_aces"
34     options='-j 2 -mpi -match 10'
35    
36    checkOut=1
37    #options="$options -nc" ; checkOut=0
38    #options="$options -q"  ; checkOut=0
39    
40  FC=ifort  MF=$HERE"/mf_"$sfx
 MF=$HERE"/mf_"$FC  
41  cat $PBS_NODEFILE | sort | uniq > $MF  cat $PBS_NODEFILE | sort | uniq > $MF
42  NCPU=`wc -l $MF | awk '{print $1}'`  NCPU=`wc -l $MF | awk '{print $1}'`
43  EXE="mpirun -machinefile $MF -v -np $NCPU ./mitgcmuv"  EXE="mpirun -machinefile $MF -v -np $NCPU ./mitgcmuv"
44    
45  # cat << EOF > $HERE"/.cvspass"  gcmDIR="MITgcm_$sfx"
46  # /1 :pserver:cvsanon@mitgcm.org:2401/u/gcmpack Ah<Zy=0=  cd $TST_DIR
47  # EOF  #- check for disk space:
48  tmpDIR=${TST_DIR}"/tmp_ifc"  dsp=`df . | tail -1 | awk '{print $5}' | sed 's/%$//'`
49  if test -e $tmpDIR ; then  if [ $dsp -gt 99 ] ; then
50      rm -rf $tmpDIR    echo 'Not enough space on this disk => do not run testreport.'
51      df .
52      exit
53    fi
54    if [ $checkOut -eq 1 ] ; then
55      if test -d $gcmDIR/CVS ; then
56        /bin/rm -rf $gcmDIR/verification/??_aces-${sfx}_????????_?
57        ( cd $gcmDIR/verification ; ../tools/do_tst_2+2 -clean )
58        echo "cvs update of dir $gcmDIR :"
59        ( cd $gcmDIR ; cvs -q -d :pserver:cvsanon@mitgcm.org:/u/gcmpack update -P -d ) 2>&1
60      else
61        echo "no dir: $gcmDIR/CVS => try a fresh check-out"
62        checkOut=2
63      fi
64  fi  fi
65  mkdir $tmpDIR  if [ $checkOut -eq 2 ] ; then
66  cd $tmpDIR    if test -e $gcmDIR ; then
67  cvs -d :pserver:cvsanon@mitgcm.org:/u/gcmpack co -P MITgcm > /dev/null 2>&1       rm -rf $gcmDIR
68  #  cvs co MITgcm    fi
69  /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
70  /usr/bin/find $tmpDIR -type f | xargs chmod g+r  # cvs co MITgcm
71      /usr/bin/find $gcmDIR -type d | xargs chmod g+rxs
72  cd MITgcm/verification    /usr/bin/find $gcmDIR -type f | xargs chmod g+r
73  OPTFILE="../tools/build_options/linux_ia32_"$FC"+mpi_aces"  else
74  # ./testreport -j 2 -mpi -of $OPTFILE -command "$EXE" -a 'edhill@mitgcm.org'    if test -e $gcmDIR/verification ; then
75  echo ./testreport -j 2 -mpi -of $OPTFILE -command "$EXE"       echo "dir $gcmDIR/verification exist"
76  ./testreport -j 2 -mpi -of $OPTFILE -command "$EXE"    else
77         echo "no dir $gcmDIR/verification => exit"
78         exit
79      fi
80    fi
81    
82    cd $gcmDIR/verification
83    echo ./testreport $options -of $OPTFILE -command \"$EXE\" -odir aces-$sfx
84    ./testreport $options -of $OPTFILE -command "$EXE" -odir aces-$sfx
85    
86    echo ../tools/do_tst_2+2 -mpi -exe \"$EXE\" -o aces-$sfx -a NONE
87    ../tools/do_tst_2+2 -mpi -exe "$EXE" -o aces-$sfx -a NONE
88    

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

  ViewVC Help
Powered by ViewVC 1.1.22