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

Annotation of /MITgcm/tools/example_scripts/ACESgrid/aces_test_mp2_mth

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


Revision 1.7 - (hide annotations) (download)
Tue Dec 14 21:34:45 2010 UTC (13 years, 4 months ago) by jmc
Branch: MAIN
CVS Tags: checkpoint62r, checkpoint62q, checkpoint62p
Changes since 1.6: +2 -2 lines
uses "df -P ." instead of just "df ." (to work on geo cluster)

1 jmc 1.1 #!/bin/bash
2     #
3 jmc 1.2 #PBS -q long
4 jmc 1.1 #PBS -N tst_mp2
5     #PBS -l nodes=2:ppn=2
6     #PBS -e /home/jmc/test_ACES/output/tst_mp2.stderr
7     #PBS -o /home/jmc/test_ACES/output/tst_mp2.stdout
8    
9 jmc 1.7 # $Header: /u/gcmpack/MITgcm/tools/example_scripts/ACESgrid/aces_test_mp2_mth,v 1.6 2010/05/20 19:22:30 jmc Exp $
10 jmc 1.1 # $Name: $
11    
12     # ACES-grid PBS-batch script for MPI+Multi-Threaded test using ifort (v9) & mpich2
13    
14     if test -f /etc/profile.d/modules.sh ; then
15     . /etc/profile.d/modules.sh
16     fi
17     # 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
21     #- to get case insensitive "ls" (and order of tested experiments)
22     export LC_ALL="en_US.UTF-8"
23    
24 jmc 1.4 TST_DIR="/home/jmc/test_ACES"
25     HERE=$TST_DIR/output
26     #cd $HERE
27 jmc 1.1
28     sfx='mp2'
29     #- to build:
30     module add ifc/9.0.021 icc/9.0.021 intel/9.0
31     module add mpich2/1.0.3/intel
32     module add netcdf/3.6.1/icc
33     export MPI_INC_DIR='/usr/local/pkg/mpich2/mpich2-1.0.3/intel/include/'
34     #- to run:
35     module add mpiexec
36     OPTFILE="../tools/build_options/linux_ia32_ifort+mpi_aces"
37     #OPTFILE="$HERE/linux_ia32_ifort+mpi_aces"
38     options='-j 2 -mpi -mth -match 10'
39     export OMP_NUM_THREADS=2
40     #export KMP_STACKSIZE=400m <-- added in file "~/.bashrc"
41    
42     checkOut=1
43     #options="$options -nc" ; checkOut=0
44     #options="$options -q" ; checkOut=0
45    
46     MF=$HERE"/mf_"$sfx
47     cat $PBS_NODEFILE | sort | uniq > $MF
48     NCPU=`wc -l $MF | awk '{print $1}'`
49     EXE="mpiexec -pernode -comm pmi -np $NCPU ./mitgcmuv"
50    
51     gcmDIR="MITgcm_$sfx"
52     cd $TST_DIR
53     #- check for disk space:
54 jmc 1.7 dsp=`df -P . | tail -1 | awk '{print $5}' | sed 's/%$//'`
55 jmc 1.1 if [ $dsp -gt 99 ] ; then
56     echo 'Not enough space on this disk => do not run testreport.'
57     df .
58     exit
59     fi
60     if [ $checkOut -eq 1 ] ; then
61     if test -d $gcmDIR/CVS ; then
62 jmc 1.2 /bin/rm -rf $gcmDIR/verification/??_aces-${sfx}_????????_?
63 jmc 1.1 # ( cd $gcmDIR/verification ; ../tools/do_tst_2+2 -clean )
64     echo "cvs update of dir $gcmDIR :"
65 jmc 1.6 ( cd $gcmDIR ; cvs -q -d :pserver:cvsanon@mitgcm.org:/u/gcmpack update -P -d ) 2>&1
66 jmc 1.1 else
67     echo "no dir: $gcmDIR/CVS => try a fresh check-out"
68     checkOut=2
69     fi
70     fi
71     if [ $checkOut -eq 2 ] ; then
72     if test -e $gcmDIR ; then
73     rm -rf $gcmDIR
74     fi
75     cvs -d :pserver:cvsanon@mitgcm.org:/u/gcmpack co -P -d $gcmDIR MITgcm > /dev/null 2>&1
76     /usr/bin/find $gcmDIR -type d | xargs chmod g+rxs
77     /usr/bin/find $gcmDIR -type f | xargs chmod g+r
78     else
79     if test -e $gcmDIR/verification ; then
80     echo "dir $gcmDIR/verification exist"
81     else
82     echo "no dir $gcmDIR/verification => exit"
83     exit
84     fi
85     fi
86    
87 jmc 1.3 #-- in case mpiexec get stuck, run this script in background to check
88     if test -x $HERE/check_$sfx ; then
89     echo "start check_$sfx in background"
90 jmc 1.5 mv -f $HERE/check_${sfx}.log $HERE/check_${sfx}.log_bak
91 jmc 1.3 ( cd $HERE ; ./check_$sfx > check_${sfx}.log 2>&1 ) &
92     fi
93 jmc 1.1 cd $gcmDIR/verification
94     echo ./testreport $options -of $OPTFILE -command \"$EXE\" -odir aces-$sfx
95     ./testreport $options -of $OPTFILE -command "$EXE" -odir aces-$sfx
96    
97     #echo ../tools/do_tst_2+2 -mpi -exe \"$EXE\" -o aces-$sfx -a NONE
98     #../tools/do_tst_2+2 -mpi -exe "$EXE" -o aces-$sfx -a NONE
99    

  ViewVC Help
Powered by ViewVC 1.1.22