1 |
jmc |
1.1 |
#!/bin/bash |
2 |
|
|
# |
3 |
jmc |
1.3 |
#PBS -q four-twelve |
4 |
jmc |
1.1 |
#PBS -N tst_gnu |
5 |
|
|
#PBS -l nodes=2:ppn=2 |
6 |
|
|
#PBS -e /home/jmc/test_ACES/output/tst_gnu.stderr |
7 |
|
|
#PBS -o /home/jmc/test_ACES/output/tst_gnu.stdout |
8 |
|
|
|
9 |
jmc |
1.5 |
# $Header: /u/gcmpack/MITgcm/tools/example_scripts/ACESgrid/aces_test_gnu_mpi,v 1.4 2008/01/25 15:17:20 jmc Exp $ |
10 |
jmc |
1.1 |
# $Name: $ |
11 |
|
|
|
12 |
jmc |
1.4 |
umask 0022 |
13 |
|
|
TST_DIR="/home/jmc/test_ACES/gcm_tests" |
14 |
|
|
HERE='/home/jmc/test_ACES/output' |
15 |
|
|
cd $HERE |
16 |
|
|
|
17 |
jmc |
1.1 |
if test -f /etc/profile.d/modules.sh ; then |
18 |
|
|
. /etc/profile.d/modules.sh |
19 |
|
|
fi |
20 |
|
|
|
21 |
jmc |
1.4 |
sfx='gnu' |
22 |
|
|
module add mpich/$sfx |
23 |
|
|
OPTFILE="../tools/build_options/linux_ia32_g77+mpi_aces" |
24 |
|
|
options='-j 2 -mpi' |
25 |
jmc |
1.1 |
|
26 |
jmc |
1.5 |
checkOut=1 |
27 |
|
|
#options="$options -nc" ; checkOut=0 |
28 |
|
|
#options="$options -q" ; checkOut=0 |
29 |
|
|
|
30 |
jmc |
1.4 |
MF=$HERE"/mf_"$sfx |
31 |
jmc |
1.1 |
cat $PBS_NODEFILE | sort | uniq > $MF |
32 |
|
|
NCPU=`wc -l $MF | awk '{print $1}'` |
33 |
|
|
EXE="mpirun -machinefile $MF -v -np $NCPU ./mitgcmuv" |
34 |
|
|
|
35 |
|
|
# cat << EOF > $HERE"/.cvspass" |
36 |
|
|
# /1 :pserver:cvsanon@mitgcm.org:2401/u/gcmpack Ah<Zy=0= |
37 |
|
|
# EOF |
38 |
jmc |
1.4 |
gcmDIR="MITgcm_$sfx" |
39 |
|
|
cd $TST_DIR |
40 |
jmc |
1.5 |
if test $checkOut = '1' ; then |
41 |
|
|
if test -e $gcmDIR ; then |
42 |
|
|
rm -rf $gcmDIR |
43 |
|
|
fi |
44 |
|
|
cvs -d :pserver:cvsanon@mitgcm.org:/u/gcmpack co -P -d $gcmDIR MITgcm > /dev/null 2>&1 |
45 |
|
|
# cvs co MITgcm |
46 |
|
|
/usr/bin/find $gcmDIR -type d | xargs chmod g+rxs |
47 |
|
|
/usr/bin/find $gcmDIR -type f | xargs chmod g+r |
48 |
|
|
else |
49 |
|
|
if test -e $gcmDIR/verification ; then |
50 |
|
|
echo "dir $gcmDIR exist" |
51 |
|
|
else |
52 |
|
|
echo "no dir $gcmDIR/verification => exit" |
53 |
|
|
exit |
54 |
|
|
fi |
55 |
jmc |
1.1 |
fi |
56 |
|
|
|
57 |
jmc |
1.4 |
cd $gcmDIR/verification |
58 |
|
|
echo ./testreport $options -of $OPTFILE -command "$EXE" -odir aces-$sfx |
59 |
|
|
./testreport $options -of $OPTFILE -command "$EXE" -odir aces-$sfx |
60 |
jmc |
1.1 |
|