/[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.274 by jmc, Fri Nov 20 01:22:36 2015 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 1964  else Line 1961  else
1961  fi  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        program hello
1967        REAL*4 ACTUAL, TARRAY(2)        REAL*4 actual, tarray(2)
1968        call etime( tarray, actual )        EXTERNAL ETIME
1969          REAL*4 ETIME
1970          actual = ETIME( tarray )
1971        print *, tarray        print *, tarray
1972        end        end
1973  EOF  EOF
1974  $FC $FFLAGS -o genmake_tcomp genmake_tcomp.$FS > genmake_tcomp.log 2>&1  $FC $FFLAGS -o genmake_tcomp_1 genmake_tcomp_1.$FS > genmake_tcomp.log 2>&1
1975  RETVAL=$?  RETVAL=$?
1976  if test "x$RETVAL" = x0 ; then  if test "x$RETVAL" = x0 ; then
1977      HAVE_ETIME=t      HAVE_ETIME='Fct'
1978      DEFINES="$DEFINES -DHAVE_ETIME"      DEFINES="$DEFINES -DHAVE_ETIME_FCT"
1979      echo "yes"      echo " yes (${HAVE_ETIME})"
1980  else  else
1981      cat > genmake_tcomp_2.$FS <<EOF
1982          program hello
1983          REAL*4 actual, tarray(2)
1984          actual = -999.
1985          call ETIME( tarray, actual )
1986          if ( actual.ge.0. ) then
1987            print *, 0, tarray, actual
1988          else
1989            print *, 1, tarray, actual
1990          endif
1991          end
1992    EOF
1993      $FC $FFLAGS -o genmake_tcomp_2 genmake_tcomp_2.$FS >> genmake_tcomp.log 2>&1
1994      RETVAL=$?
1995      if test "x$RETVAL" = x0 ; then
1996        echo -n 'c,'
1997        ./genmake_tcomp_2 > genmake_tcomp_2.out 2>&1
1998        RETVAL=$?
1999      fi
2000      if test "x$RETVAL" = x0 ; then
2001        echo -n 'r:'
2002        RETVAL=`cat genmake_tcomp_2.out | $AWK '{print $1}'`
2003      fi
2004      if test "x$RETVAL" = x0 ; then
2005        HAVE_ETIME='SbR'
2006        DEFINES="$DEFINES -DHAVE_ETIME_SBR"
2007        echo " yes (${HAVE_ETIME})"
2008      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
2014  rm -f genmake_tcomp*  rm -f genmake_tcomp*
2015    
2016  printf "  Can we call simple C routines (here, \"cloc()\") using $FC...  "  printf "  Can we call simple C routines (here, \"cloc()\") using $FC...  "

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

  ViewVC Help
Powered by ViewVC 1.1.22