/[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.277 by jmc, Tue Jan 12 20:43:00 2016 UTC
# Line 1965  fi Line 1965  fi
1965  rm -f genmake_tcomp*  rm -f genmake_tcomp*
1966    
1967  printf "  Do we have the etime() command using $FC... "  printf "  Do we have the etime() command using $FC... "
1968  cat > genmake_tcomp.$FS <<EOF  cat > genmake_tcomp_1.$FS <<EOF
1969          program hello
1970          REAL*4 actual, tarray(2)
1971          EXTERNAL ETIME
1972          REAL*4 ETIME
1973          actual = ETIME( tarray )
1974          print *, tarray
1975          end
1976    EOF
1977    $FC $FFLAGS -o genmake_tcomp_1 genmake_tcomp_1.$FS > genmake_tcomp.log 2>&1
1978    RETVAL=$?
1979    if test "x$RETVAL" = x0 ; then
1980        HAVE_ETIME='Fct'
1981        DEFINES="$DEFINES -DHAVE_ETIME_FCT"
1982        echo " yes (${HAVE_ETIME})"
1983    else
1984      cat > genmake_tcomp_2.$FS <<EOF
1985        program hello        program hello
1986        REAL*4 actual, tarray(2)        REAL*4 actual, tarray(2)
1987        actual = -999.        actual = -999.
# Line 1977  cat > genmake_tcomp.$FS <<EOF Line 1993  cat > genmake_tcomp.$FS <<EOF
1993        endif        endif
1994        end        end
1995  EOF  EOF
1996  $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
1997  RETVAL=$?    RETVAL=$?
1998  if test "x$RETVAL" = x0 ; then    if test "x$RETVAL" = x0 ; then
1999      echo -n 'c,'      echo -n 'c,'
2000      ./genmake_tcomp > genmake_tcomp.out 2>&1      ./genmake_tcomp_2 > genmake_tcomp_2.out 2>&1
2001      RETVAL=$?      RETVAL=$?
2002  fi    fi
2003  if test "x$RETVAL" = x0 ; then    if test "x$RETVAL" = x0 ; then
2004      echo -n 'r:'      echo -n 'r:'
2005      RETVAL=`cat genmake_tcomp.out | $AWK '{print $1}'`      RETVAL=`cat genmake_tcomp_2.out | $AWK '{print $1}'`
2006  fi    fi
2007  if test "x$RETVAL" = x0 ; then    if test "x$RETVAL" = x0 ; then
2008      HAVE_ETIME=t      HAVE_ETIME='SbR'
2009      DEFINES="$DEFINES -DHAVE_ETIME"      DEFINES="$DEFINES -DHAVE_ETIME_SBR"
2010      echo " yes"      echo " yes (${HAVE_ETIME})"
2011  else    else
2012      HAVE_ETIME=      HAVE_ETIME=
2013      echo " no"      echo " no"
2014      fi
2015  fi  fi
2016  #mkdir chk_etime ; cp -p -f genmake_tcomp* chk_etime  #mkdir chk_etime ; cp -p -f genmake_tcomp* chk_etime
2017  rm -f genmake_tcomp*  rm -f genmake_tcomp*

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

  ViewVC Help
Powered by ViewVC 1.1.22