/[MITgcm]/MITgcm/tools/genmake2
ViewVC logotype

Diff of /MITgcm/tools/genmake2

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

revision 1.276 by jmc, Thu Jan 7 20:21:42 2016 UTC revision 1.278 by jmc, Fri Jan 15 22:08:17 2016 UTC
# Line 32  Usage: "$0" [OPTIONS] Line 32  Usage: "$0" [OPTIONS]
32            "tools/adjoint_options/adjoint_oad" (for OpenAD built) or            "tools/adjoint_options/adjoint_oad" (for OpenAD built) or
33            "tools/adjoint_options/adjoint_default" will be used.            "tools/adjoint_options/adjoint_default" will be used.
34    
35      -nooptfile | --nooptfile      -optfile NAME | --optfile NAME | -of NAME | --of NAME
       -optfile NAME | --optfile NAME | -of NAME | --of NAME  
36        -optfile=NAME | --optfile=NAME | -of=NAME | --of=NAME        -optfile=NAME | --optfile=NAME | -of=NAME | --of=NAME
37            Use "NAME" as the optfile.  By default, an attempt will be            Use "NAME" as the optfile.  By default, an attempt will be
38            made to find an appropriate "standard" optfile in the            made to find an appropriate "standard" optfile in the
# Line 1408  for ac_option in "$@" ; do Line 1407  for ac_option in "$@" ; do
1407          -help | --help | -h | --h)          -help | --help | -h | --h)
1408              usage ;;              usage ;;
1409    
         -nooptfile | --nooptfile)  
             OPTFILE="NONE" ;;  
1410          -optfile | --optfile | -of | --of)          -optfile | --optfile | -of | --of)
1411              ac_prev=OPTFILE ;;              ac_prev=OPTFILE ;;
1412          -optfile=* | --optfile=* | -of=* | --of=*)          -optfile=* | --optfile=* | -of=* | --of=*)
# Line 1965  fi Line 1962  fi
1962  rm -f genmake_tcomp*  rm -f genmake_tcomp*
1963    
1964  printf "  Do we have the etime() command using $FC... "  printf "  Do we have the etime() command using $FC... "
1965  cat > genmake_tcomp.$FS <<EOF  cat > genmake_tcomp_1.$FS <<EOF
1966          program hello
1967          REAL*4 actual, tarray(2)
1968          EXTERNAL ETIME
1969          REAL*4 ETIME
1970          actual = ETIME( tarray )
1971          print *, tarray
1972          end
1973    EOF
1974    $FC $FFLAGS -o genmake_tcomp_1 genmake_tcomp_1.$FS > genmake_tcomp.log 2>&1
1975    RETVAL=$?
1976    if test "x$RETVAL" = x0 ; then
1977        HAVE_ETIME='Fct'
1978        DEFINES="$DEFINES -DHAVE_ETIME_FCT"
1979        echo " yes (${HAVE_ETIME})"
1980    else
1981      cat > genmake_tcomp_2.$FS <<EOF
1982        program hello        program hello
1983        REAL*4 actual, tarray(2)        REAL*4 actual, tarray(2)
1984        actual = -999.        actual = -999.
# Line 1977  cat > genmake_tcomp.$FS <<EOF Line 1990  cat > genmake_tcomp.$FS <<EOF
1990        endif        endif
1991        end        end
1992  EOF  EOF
1993  $FC $FFLAGS -o genmake_tcomp genmake_tcomp.$FS > genmake_tcomp.log 2>&1    $FC $FFLAGS -o genmake_tcomp_2 genmake_tcomp_2.$FS >> genmake_tcomp.log 2>&1
1994  RETVAL=$?    RETVAL=$?
1995  if test "x$RETVAL" = x0 ; then    if test "x$RETVAL" = x0 ; then
1996      echo -n 'c,'      echo -n 'c,'
1997      ./genmake_tcomp > genmake_tcomp.out 2>&1      ./genmake_tcomp_2 > genmake_tcomp_2.out 2>&1
1998      RETVAL=$?      RETVAL=$?
1999  fi    fi
2000  if test "x$RETVAL" = x0 ; then    if test "x$RETVAL" = x0 ; then
2001      echo -n 'r:'      echo -n 'r:'
2002      RETVAL=`cat genmake_tcomp.out | $AWK '{print $1}'`      RETVAL=`cat genmake_tcomp_2.out | $AWK '{print $1}'`
2003  fi    fi
2004  if test "x$RETVAL" = x0 ; then    if test "x$RETVAL" = x0 ; then
2005      HAVE_ETIME=t      HAVE_ETIME='SbR'
2006      DEFINES="$DEFINES -DHAVE_ETIME"      DEFINES="$DEFINES -DHAVE_ETIME_SBR"
2007      echo " yes"      echo " yes (${HAVE_ETIME})"
2008  else    else
2009      HAVE_ETIME=      HAVE_ETIME=
2010      echo " no"      echo " no"
2011      fi
2012  fi  fi
2013  #mkdir chk_etime ; cp -p -f genmake_tcomp* chk_etime  #mkdir chk_etime ; cp -p -f genmake_tcomp* chk_etime
2014  rm -f genmake_tcomp*  rm -f genmake_tcomp*

Legend:
Removed from v.1.276  
changed lines
  Added in v.1.278

  ViewVC Help
Powered by ViewVC 1.1.22