--- MITgcm/tools/genmake2 2009/10/09 11:13:27 1.198 +++ MITgcm/tools/genmake2 2010/03/10 15:49:54 1.204 @@ -1,6 +1,6 @@ #! /usr/bin/env bash # -# $Header: /home/ubuntu/mnt/e9_copy/MITgcm/tools/genmake2,v 1.198 2009/10/09 11:13:27 mlosch Exp $ +# $Header: /home/ubuntu/mnt/e9_copy/MITgcm/tools/genmake2,v 1.204 2010/03/10 15:49:54 jmc Exp $ # # Makefile generator for MITgcm UV codes # created by cnh 03/98 @@ -519,6 +519,9 @@ -pdefault=NAME | --pdefault=NAME Get the default package list from "NAME". + -bash NAME + Explicitly specify the Bourne or BASH shell to use + -make NAME | -m NAME --make=NAME | -m=NAME Use "NAME" for the MAKE program. The default is "make" but @@ -578,6 +581,10 @@ *only* works if it is supported by the OPTFILE that is being used. + -use_real4 | -use_r4 | -ur4 | --use_real4 | --use_r4 | --ur4 + Use "real*4" type for _RS variable (#undef REAL4_IS_SLOW) + *only* works if CPP_EEOPTIONS.h allows this. + -ignoretime | -ignore_time | --ignoretime | --ignore_time Ignore all the "wall clock" routines entirely. This will not in any way hurt the model results -- it simply means @@ -621,9 +628,6 @@ (including the Makefile, etc.) used to build the executable [off by default] - -bash NAME - Explicitly specify the Bourne or BASH shell to use - While it is most often a single word, the "NAME" variables specified above can in many cases be a space-delimited string such as: @@ -635,7 +639,7 @@ For more detailed genmake documentation, please see: - http://mitgcm.org/devel_HOWTO/ + http://mitgcm.org/public/devel_HOWTO/ EOF @@ -1065,6 +1069,7 @@ MPIPATH= OMP= OMPFLAG= +USE_R4= TS= PAPIS= PCLS= @@ -1132,7 +1137,7 @@ # The following state can be set directly by command-line switches gm_s1="OPTFILE PDEPEND PDEFAULT MAKEFILE PLATFORM ROOTDIR MODS DISABLE ENABLE" -gm_s2="FC CPP IEEE TS PAPIS PCLS PAPI PCL HPMT GSL DEVEL MPI OMP DUMPSTATE STANDARDDIRS" +gm_s2="FC IEEE USE_R4 TS PAPIS PCLS PAPI PCL HPMT GSL DEVEL MPI OMP DUMPSTATE STANDARDDIRS" # The following state is not directly set by command-line switches gm_s3="LN S64 KPP LINK PACKAGES MAKEDEPEND PDEPEND PDEFAULT INCLUDES FFLAGS FOPTIM FEXTRAFLAGS" @@ -1297,6 +1302,9 @@ -noieee | --noieee) IEEE= ;; + -use_real4 | -use_r4 | -ur4 | --use_real4 | --use_r4 | --ur4 ) + USE_R4=true ;; + -ts | --ts) TS=true ;; -papis | --papis) @@ -1405,7 +1413,7 @@ # Find the MITgcm ${THISVER} version_file="${ROOTDIR}/doc/tag-index" if test -f $version_file ; then - THISVER=`grep '^checkpoint' $version_file | head -1` + THISVER=`$AWK '/^checkpoint/{print $1; exit}' $version_file` #- remove ./BUILD_INFO.h file if older than version_file if test -f ./BUILD_INFO.h -a ./BUILD_INFO.h -ot $version_file ; then echo " remove ./BUILD_INFO.h (older than ${version_file})" @@ -1573,6 +1581,11 @@ DEFINES="$DEFINES -DUSE_OMP_THREADING" fi +if test ! "x$USE_R4" = x ; then + echo " Turning on LET_RS_BE_REAL4 cpp flag" + DEFINES="$DEFINES -DLET_RS_BE_REAL4" +fi + if test ! "x$TS" = x ; then echo " Turning on timing per timestep" if test ! "x$FOOLAD" = x ; then @@ -2643,7 +2656,8 @@ @make clean @make cleanlinks -rm -f \$(SPECIAL_FILES) - -rm -f genmake_state genmake_*optfile genmake_warnings make.log run.log f90mkdepend.log *.bak + -rm -f genmake_state genmake_*optfile genmake_warnings genmake_errors + -rm -f make.log run.log f90mkdepend.log *.bak -rm -f taf_command taf_output taf_ad.log taf_ad_flow.log CLEAN: @make Clean @@ -3041,7 +3055,7 @@ # canonicalizer ad_input_code_sf.w2f.pre.f$FS90: ad_input_code_sf.w2f.f$FS90 preProcess.py - ./preProcess.py --timing -H -S \$< -o \$@ + ./preProcess.py --timing --r8 -H -S \$< -o \$@ # F -> WHIRL # note that the canonicalized version cuts off at col 72 @@ -3081,7 +3095,7 @@ # this step also creates the file postProcess.make but we cannot # name it as the target or else make will try to remake it for # the include directive above for any rule, e.g. make clean - ./postProcess.py --progress --timing -m r -i ../OAD_support/ad_inline.f --width 4 \$< + ./postProcess.py --progress --timing --outputFormat=fixed -m r -i ../OAD_support/ad_inline.f --width 4 \$< # setup some links %.xsd: