/[MITgcm]/MITgcm_contrib/jmc_script/run_gnu.pbs
ViewVC logotype

Diff of /MITgcm_contrib/jmc_script/run_gnu.pbs

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

revision 1.1 by jmc, Thu Oct 25 21:17:10 2012 UTC revision 1.2 by jmc, Fri Oct 26 19:29:08 2012 UTC
# Line 26  fi Line 26  fi
26    
27  HERE=`pwd`  HERE=`pwd`
28  echo "start from HERE='$HERE' at: "`date`  echo "start from HERE='$HERE' at: "`date`
29  echo " sfx=$sfx , mpi=$mpi , mth=$mth"  echo " sfx=$sfx , mpi=$mpi , mth=$mth , host="`hostname`
30    
31  #- dir where to run mitgcmuv (batch job starts in home dir; need to "cd" to run dir):  #- dir where to run mitgcmuv (batch job starts in home dir; need to "cd" to run dir):
32  runD="/net/eaps-80-11/data/jm_c/exp/atm_gray/run_$sfx"  runD="/net/eaps-80-11/data/jm_c/exp/atm_gray/run_$sfx"
# Line 40  umask 0022 Line 40  umask 0022
40  #- to get case insensitive "ls" (and order of tested experiments)  #- to get case insensitive "ls" (and order of tested experiments)
41  export LC_ALL="en_US.UTF-8"  export LC_ALL="en_US.UTF-8"
42    
43    if [ $mth -ge 1 ] ; then
44     export OMP_NUM_THREADS=$mth
45     export GOMP_STACKSIZE=400m
46    fi
47    
48   module add gcc   module add gcc
49  if test $mpi = 0 ; then  if test $mpi = 0 ; then
50   EXE="./mitgcmuv > std_outp"   EXE="./mitgcmuv > std_outp"
51  else  else
52   module add openmpi   module add openmpi
53     EXE="mpirun -v"
54     if [ $mth -ge 1 ] ; then EXE="$EXE -x OMP_NUM_THREADS -x GOMP_STACKSIZE" ; fi
55     #- select which MPI procs to use
56   nn=`cat $PBS_NODEFILE | sort | uniq | wc -l`   nn=`cat $PBS_NODEFILE | sort | uniq | wc -l`
57   if [ $nn -gt 1 ] ; then dd=`expr $mpi % $nn` ; else dd=1 ; fi   if [ $nn -gt 1 ] ; then dd=`expr $mpi % $nn` ; else dd=1 ; fi
58   if [ $dd -eq 0 ] ; then   if [ $dd -eq 0 ] ; then
59     npn=`expr $mpi / $nn`     npn=`expr $mpi / $nn`
60     echo " Nb of nodes=$nn , nb of process per node=$npn"     echo " Nb of nodes=$nn , nb of process per node=$npn"
61     cat $PBS_NODEFILE | sort | uniq > mf     cat $PBS_NODEFILE | sort | uniq > mf
62     EXE="mpirun -v -hostfile mf -npernode $npn ./mitgcmuv"     EXE="$EXE -hostfile mf -npernode $npn ./mitgcmuv"
63   else   else
64     EXE="mpirun -v -np $mpi ./mitgcmuv"     EXE="$EXE -np $mpi ./mitgcmuv"
65   fi   fi
66  fi  fi
67    
 if [ $mth -ge 1 ] ; then  
  export OMP_NUM_THREADS=$mth  
  export GOMP_STACKSIZE=400m  
 fi  
   
68  echo "list of loaded modules:"  echo "list of loaded modules:"
69  module list 2>&1  module list 2>&1
70  echo " "  echo " "

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

  ViewVC Help
Powered by ViewVC 1.1.22