15 |
echo " (-mpi) compile and run using MPI" |
echo " (-mpi) compile and run using MPI" |
16 |
echo " (-ieee|-noieee) if possible, use IEEE compiler flags" |
echo " (-ieee|-noieee) if possible, use IEEE compiler flags" |
17 |
echo " (DEF=\"-ieee\")" |
echo " (DEF=\"-ieee\")" |
18 |
|
echo " (-gsl) compile with \"-gsl\" flag" |
19 |
echo " (-of=|-optfile=)STRING list of optfiles to use" |
echo " (-of=|-optfile=)STRING list of optfiles to use" |
20 |
echo " (-a|-addr) STRING list of email recipients" |
echo " (-a|-addr) STRING list of email recipients" |
21 |
echo " (DEF=\"\" no email is sent)" |
echo " (DEF=\"\" no email is sent)" |
74 |
echo |
echo |
75 |
HAVE_MPACK=f |
HAVE_MPACK=f |
76 |
fi |
fi |
|
printf "building mpack... " |
|
77 |
if test "x$CC" = x ; then |
if test "x$CC" = x ; then |
78 |
export CC=cc |
export CC=cc |
79 |
fi |
fi |
80 |
|
printf "building mpack (using CC=$CC)... " |
81 |
( cd $MPACKDIR && ./configure && $MAKE ) > tr_build_mpack.out 2>&1 |
( cd $MPACKDIR && ./configure && $MAKE ) > tr_build_mpack.out 2>&1 |
82 |
RETVAL=$? |
RETVAL=$? |
83 |
if test "x$RETVAL" != x0 ; then |
if test "x$RETVAL" != x0 ; then |
88 |
else |
else |
89 |
rm -f tr_build_mpack.out |
rm -f tr_build_mpack.out |
90 |
HAVE_MPACK=t |
HAVE_MPACK=t |
91 |
|
echo "OK" |
92 |
fi |
fi |
93 |
else |
else |
94 |
HAVE_MPACK=t |
HAVE_MPACK=t |
95 |
|
echo "done" |
96 |
fi |
fi |
|
echo "OK" |
|
97 |
} |
} |
98 |
|
|
99 |
testoutput_var() |
testoutput_var() |
329 |
if test "x$IEEE" != x ; then |
if test "x$IEEE" != x ; then |
330 |
command="$command -ieee" |
command="$command -ieee" |
331 |
fi |
fi |
332 |
|
if test "x$GSL" = xt ; then |
333 |
|
command="$command -gsl" |
334 |
|
fi |
335 |
if test "x$MPI" = xt ; then |
if test "x$MPI" = xt ; then |
336 |
command="$command -mpi" |
command="$command -mpi" |
337 |
fi |
fi |
475 |
CODE_DIR=$dir/$code_dir |
CODE_DIR=$dir/$code_dir |
476 |
|
|
477 |
# These are files that should replace their counter-part when using -mpi |
# These are files that should replace their counter-part when using -mpi |
478 |
MPI_FILES=`(cd $CODE_DIR; find . -name "*_mpi")` |
MPI_FILES=`(cd $CODE_DIR; find . -name "*_mpi" -print)` |
479 |
|
|
480 |
# Is this an MPI run? |
# Is this an MPI run? |
481 |
if test "x$MPI" = xt ; then |
if test "x$MPI" = xt ; then |
626 |
{ |
{ |
627 |
# create codelet for comparing model output |
# create codelet for comparing model output |
628 |
|
|
629 |
printf "creating the comparison code... " |
printf "creating the comparison code (using CC=$CC)... " |
630 |
cat > tr_cmpnum.c <<EOF |
cat > tr_cmpnum.c <<EOF |
631 |
#include <stdio.h> |
#include <stdio.h> |
632 |
#include <math.h> |
#include <math.h> |
723 |
debug=0 |
debug=0 |
724 |
verbose=1 |
verbose=1 |
725 |
clean=0 |
clean=0 |
|
expts='' |
|
|
# ieee=1 |
|
726 |
|
|
727 |
IEEE=true |
IEEE=true |
728 |
if test "x$MITGCM_IEEE" != x ; then |
if test "x$MITGCM_IEEE" != x ; then |
729 |
IEEE=$MITGCM_IEEE |
IEEE=$MITGCM_IEEE |
730 |
fi |
fi |
731 |
|
GSL=f |
732 |
|
|
733 |
CLEANUP=f |
CLEANUP=f |
734 |
QUICK=f |
QUICK=f |
858 |
|
|
859 |
-ieee) IEEE=true ;; |
-ieee) IEEE=true ;; |
860 |
-noieee) IEEE= ;; |
-noieee) IEEE= ;; |
861 |
|
-gsl) GSL=t ;; |
862 |
|
|
863 |
-verbose) verbose=2 ;; |
-verbose) verbose=2 ;; |
864 |
-debug) debug=1 ;; |
-debug) debug=1 ;; |
979 |
# create the FORTRAN comparison code |
# create the FORTRAN comparison code |
980 |
createcodelet |
createcodelet |
981 |
|
|
982 |
# build the mpack utility |
# build the mpack utility (if ADDRESSES = NONE, do it to test the build) |
983 |
if test "x$ADDRESSES" = xNONE -o "x$ADDRESSES" = x ; then |
if test "x$ADDRESSES" = x ; then |
984 |
echo "skipping mpack build" |
echo "skipping mpack build" |
985 |
else |
else |
986 |
build_mpack |
build_mpack |
987 |
fi |
fi |
988 |
|
|
989 |
# Create a uniquely named directory to store results |
# Create a uniquely named directory to store results |
990 |
|
CMDLINE=$0 |
991 |
|
for xx in "$@" ; do CMDLINE="$CMDLINE '$xx'" ; done |
992 |
MACH=`hostname` |
MACH=`hostname` |
993 |
UNAMEA=`uname -a` |
UNAMEA=`uname -a` |
994 |
DATE=`date +%Y%m%d` |
DATE=`date +%Y%m%d` |
1009 |
exit 1 |
exit 1 |
1010 |
fi |
fi |
1011 |
SUMMARY="$DRESULTS/summary.txt" |
SUMMARY="$DRESULTS/summary.txt" |
|
printf "Start time: " >> $SUMMARY |
|
1012 |
start_date=`date` |
start_date=`date` |
1013 |
echo $start_date > $SUMMARY |
echo $start_date > $SUMMARY |
1014 |
|
echo 'run:' $CMDLINE >> $SUMMARY |
1015 |
|
echo 'on :' $UNAMEA >> $SUMMARY |
1016 |
|
|
1017 |
of_path= |
of_path= |
1018 |
if test "x$OPTFILE" != xNONE ; then |
if test "x$OPTFILE" != xNONE ; then |