9 |
MTH= |
MTH= |
10 |
MTHo= |
MTHo= |
11 |
MTHa= |
MTHa= |
12 |
#GMKopt='-devel' |
GMKopt='-devel' |
13 |
GMKopt='-ieee' |
#GMKopt='-ieee' |
14 |
#GMKopt= |
#GMKopt= |
15 |
rnkO=1 ; rnkA=`expr $rnkO + $NpOc` |
rnkO=1 ; rnkA=`expr $rnkO + $NpOc` |
16 |
|
|
20 |
if test -f input_ocn/eedata.mth ; then MTHo=$MTH ; fi |
if test -f input_ocn/eedata.mth ; then MTHo=$MTH ; fi |
21 |
if test -f input_atm/eedata.mth ; then MTHa=$MTH ; fi |
if test -f input_atm/eedata.mth ; then MTHa=$MTH ; fi |
22 |
fi ; fi |
fi ; fi |
23 |
if [ $# -ne 1 ] |
#- allows more argument for building step (step=1) |
24 |
then |
chkArg=$# ; if [ $# -gt 1 ]; then chkArg=$1 ; fi |
25 |
echo 'Usage:'`basename $0`' [opt] step' |
if [ $chkArg -ne 1 ]; then |
26 |
|
echo 'Usage:'`basename $0`' [opt] step [bld-arg]' |
27 |
echo ' => test coupled set-up on linux box (1.cpu)' |
echo ' => test coupled set-up on linux box (1.cpu)' |
28 |
echo 'opt = -mth : compile and run (if eedata.mth) 2-threads for ocn & atm' |
echo 'opt = -mth : compile and run (if eedata.mth) 2-threads for ocn & atm' |
29 |
echo ' step = 0 : clean all directories' |
echo ' step = 0 : clean all directories' |
30 |
echo ' step = 1 : compile the 3 executables (cpl,ocn,atm)' |
echo ' step = 1 : compile the 3 executables (cpl,ocn,atm); optional arg:' |
31 |
|
echo ' -of Optfile_Name : using option-file "Optfile_Name"' |
32 |
echo ' step = 2 : copy input files and dir(s)' |
echo ' step = 2 : copy input files and dir(s)' |
33 |
echo " step = 3 : run with $Npr mpi processes" |
echo " step = 3 : run with $Npr mpi processes" |
34 |
echo ' step = 4 : check the results' |
echo ' step = 4 : check the results' |
63 |
if test $kpr = 1 |
if test $kpr = 1 |
64 |
then |
then |
65 |
|
|
66 |
#- choice of the optfile: take a local one in dir verification with sufix '+mpi' |
#- choice of the optfile: |
67 |
|
# default: take a local one in dir verification with sufix '+mpi' |
68 |
nbOpF=`ls ../linux_* | grep '+mpi' 2> /dev/null | wc -l` |
nbOpF=`ls ../linux_* | grep '+mpi' 2> /dev/null | wc -l` |
69 |
|
# or take the one given as argument: |
70 |
|
if [ $# -ge 3 ]; then |
71 |
|
if test $2 = '-of' -a -f $3 ; then nbOpF=-1 ; OPTFILE=$3 ; fi |
72 |
|
fi |
73 |
if test $nbOpF = 1 ; then |
if test $nbOpF = 1 ; then |
74 |
OPTFILE=`ls ../linux_* | grep '+mpi'` |
OPTFILE=`ls ../linux_* | grep '+mpi'` |
|
zz=`grep '^FC=' $OPTFILE` |
|
|
echo " Using optfile: $OPTFILE (compiler=$zz) $MTH" |
|
75 |
elif [ $nbOpF -ge 2 ] ; then |
elif [ $nbOpF -ge 2 ] ; then |
76 |
echo "pick the 1rst of these ( $nbOpF ) optfiles:" |
echo "pick the 1rst of these ( $nbOpF ) optfiles:" |
77 |
ls ../linux_* | grep '+mpi' |
ls ../linux_* | grep '+mpi' |
78 |
OPTFILE=`ls ../linux_* | grep '+mpi' | head -1` |
OPTFILE=`ls ../linux_* | grep '+mpi' | head -1` |
79 |
zz=`grep '^FC=' $OPTFILE` |
elif [ $nbOpF -ne -1 ] ; then |
|
echo " Using optfile: $OPTFILE (compiler=$zz) $MTH" |
|
|
else |
|
80 |
echo "Pb in finding optfile: found $nbOpF :" |
echo "Pb in finding optfile: found $nbOpF :" |
81 |
ls ../linux_* | grep '+mpi' ; exit |
ls ../linux_* | grep '+mpi' ; exit |
82 |
fi |
fi |
83 |
|
zz=`grep '^ *FC=' $OPTFILE | tail -1` |
84 |
|
echo " Using optfile: $OPTFILE (compiler: $zz) $MTH" |
85 |
zz=`echo $OPTFILE | grep -c '^\/'` |
zz=`echo $OPTFILE | grep -c '^\/'` |
86 |
if test $zz = 0 ; then OPTFILE="../$OPTFILE" ; fi |
if test $zz = 0 ; then OPTFILE="../$OPTFILE" ; fi |
87 |
#--- |
#--- |