/[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.273 by jmc, Tue Sep 1 19:39:56 2015 UTC revision 1.277 by jmc, Tue Jan 12 20:43:00 2016 UTC
# Line 1964  else Line 1964  else
1964  fi  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        program hello
1970        REAL*4 ACTUAL, TARRAY(2)        REAL*4 actual, tarray(2)
1971        EXTERNAL ETIME        EXTERNAL ETIME
1972        REAL*4 ETIME        REAL*4 ETIME
1973        actual = etime( tarray )        actual = ETIME( tarray )
1974        print *, tarray        print *, tarray
1975        end        end
1976  EOF  EOF
1977  $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
1978  RETVAL=$?  RETVAL=$?
1979  if test "x$RETVAL" = x0 ; then  if test "x$RETVAL" = x0 ; then
1980      HAVE_ETIME=t      HAVE_ETIME='Fct'
1981      DEFINES="$DEFINES -DHAVE_ETIME"      DEFINES="$DEFINES -DHAVE_ETIME_FCT"
1982      echo "yes"      echo " yes (${HAVE_ETIME})"
1983  else  else
1984      cat > genmake_tcomp_2.$FS <<EOF
1985          program hello
1986          REAL*4 actual, tarray(2)
1987          actual = -999.
1988          call ETIME( tarray, actual )
1989          if ( actual.ge.0. ) then
1990            print *, 0, tarray, actual
1991          else
1992            print *, 1, tarray, actual
1993          endif
1994          end
1995    EOF
1996      $FC $FFLAGS -o genmake_tcomp_2 genmake_tcomp_2.$FS >> genmake_tcomp.log 2>&1
1997      RETVAL=$?
1998      if test "x$RETVAL" = x0 ; then
1999        echo -n 'c,'
2000        ./genmake_tcomp_2 > genmake_tcomp_2.out 2>&1
2001        RETVAL=$?
2002      fi
2003      if test "x$RETVAL" = x0 ; then
2004        echo -n 'r:'
2005        RETVAL=`cat genmake_tcomp_2.out | $AWK '{print $1}'`
2006      fi
2007      if test "x$RETVAL" = x0 ; then
2008        HAVE_ETIME='SbR'
2009        DEFINES="$DEFINES -DHAVE_ETIME_SBR"
2010        echo " yes (${HAVE_ETIME})"
2011      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
2017  rm -f genmake_tcomp*  rm -f genmake_tcomp*
2018    
2019  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.273  
changed lines
  Added in v.1.277

  ViewVC Help
Powered by ViewVC 1.1.22