/[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.122 by edhill, Tue Mar 22 20:10:32 2005 UTC revision 1.128 by edhill, Mon Sep 5 13:39:28 2005 UTC
# Line 321  EOF Line 321  EOF
321    
322      #================================================================      #================================================================
323      #  look for possible FORTRAN compilers      #  look for possible FORTRAN compilers
324      tmp="$MITGCM_FC $FC efc g77 f77 pgf77 pgf95 ifc f90 f95 mpif77 mpf77 mpxlf95"      tmp="$MITGCM_FC $FC efc g77 f77 pgf77 pgf95 ifc f90 f95 mpif77 mpf77 mpxlf95 gfortran"
325      p_FC=      p_FC=
326      for c in $tmp ; do      for c in $tmp ; do
327          rm -f ./hello.f ./hello          rm -f ./hello.f ./hello
# Line 527  Usage: "$0" [OPTIONS] Line 527  Usage: "$0" [OPTIONS]
527            *only* works if it is supported by the OPTFILE that            *only* works if it is supported by the OPTFILE that
528            is being used.            is being used.
529    
530        -ts | --ts
531              Produce timing information per timestep
532    
533      -mpi | --mpi      -mpi | --mpi
534            Include MPI header files and link to MPI libraries            Include MPI header files and link to MPI libraries
535      -mpi=PATH | --mpi=PATH      -mpi=PATH | --mpi=PATH
# Line 672  EOF Line 675  EOF
675        external cloc        external cloc
676        call cloc(wtime)        call cloc(wtime)
677        print *," HELLO WORLD", wtime        print *," HELLO WORLD", wtime
678        end program hello        end
679  EOF  EOF
680      $FC $FFLAGS -o genmake_tc genmake_tc_2.$FS genmake_tc_1.o >> genmake_warnings 2>&1      $FC $FFLAGS -o genmake_tc genmake_tc_2.$FS genmake_tc_1.o >> genmake_warnings 2>&1
681      RET_F=$?      RET_F=$?
# Line 714  EOF Line 717  EOF
717        integer nbyte        integer nbyte
718        call tfsize(nbyte)        call tfsize(nbyte)
719        print *," HELLO WORLD", nbyte        print *," HELLO WORLD", nbyte
720        end program hello        end
721  EOF  EOF
722      $FC $FFLAGS -o genmake_tc genmake_tc_2.$FS genmake_tc_1.o >> genmake_tc.log 2>&1      $FC $FFLAGS -o genmake_tc genmake_tc_2.$FS genmake_tc_1.o >> genmake_tc.log 2>&1
723      RET_F=$?      RET_F=$?
# Line 834  NOOPTFILES= Line 837  NOOPTFILES=
837  NOOPTFLAGS=  NOOPTFLAGS=
838  MPI=  MPI=
839  MPIPATH=  MPIPATH=
840    TS=
841    
842  # DEFINES checked by test compilation  # DEFINES checked by test compilation or command-line
843  HAVE_SYSTEM=  HAVE_SYSTEM=
844  HAVE_FDATE=  HAVE_FDATE=
845  FC_NAMEMANGLE=  FC_NAMEMANGLE=
# Line 843  HAVE_CLOC= Line 847  HAVE_CLOC=
847  HAVE_STAT=  HAVE_STAT=
848  HAVE_NETCDF=  HAVE_NETCDF=
849  HAVE_ETIME=  HAVE_ETIME=
850    IGNORE_TIME=
851    
852  MODS=  MODS=
853  TOOLSDIR=  TOOLSDIR=
# Line 888  TAMC_EXTRA= Line 893  TAMC_EXTRA=
893    
894  #  The following state can be set directly by command-line switches  #  The following state can be set directly by command-line switches
895  gm_s1="OPTFILE PDEPEND PDEFAULT MAKEFILE PLATFORM ROOTDIR MODS DISABLE ENABLE"  gm_s1="OPTFILE PDEPEND PDEFAULT MAKEFILE PLATFORM ROOTDIR MODS DISABLE ENABLE"
896  gm_s2="FC CPP IEEE MPI JAM DUMPSTATE STANDARDDIRS"  gm_s2="FC CPP IEEE TS MPI JAM DUMPSTATE STANDARDDIRS"
897    
898  #  The following state is not directly set by command-line switches  #  The following state is not directly set by command-line switches
899  gm_s3="LN S64 KPP LINK PACKAGES MAKEDEPEND PDEPEND PDEFAULT INCLUDES FFLAGS FOPTIM "  gm_s3="LN S64 KPP LINK PACKAGES MAKEDEPEND PDEPEND PDEFAULT INCLUDES FFLAGS FOPTIM "
# Line 1068  for ac_option in "$@" ; do Line 1073  for ac_option in "$@" ; do
1073          -noieee | --noieee)          -noieee | --noieee)
1074              IEEE= ;;              IEEE= ;;
1075    
1076            -ts | --ts)
1077                TS=true ;;
1078    
1079          -mpi | --mpi)          -mpi | --mpi)
1080              MPI=true ;;              MPI=true ;;
1081          -mpi=* | --mpi=*)          -mpi=* | --mpi=*)
# Line 1091  for ac_option in "$@" ; do Line 1099  for ac_option in "$@" ; do
1099              ac_prev=TAMC_EXTRA ;;              ac_prev=TAMC_EXTRA ;;
1100          -tamc_extra=* | --tamc_extra=*)          -tamc_extra=* | --tamc_extra=*)
1101              TAMC_EXTRA=$ac_optarg ;;              TAMC_EXTRA=$ac_optarg ;;
1102            
1103            -ignoretime | -ignore_time | --ignoretime | --ignore_time)
1104                IGNORE_TIME="-DIGNORE_TIME" ;;
1105    
1106          -*)          -*)
1107              echo "Error: unrecognized option: "$ac_option              echo "Error: unrecognized option: "$ac_option
# Line 1148  fi Line 1159  fi
1159    
1160  #  Find the MITgcm ${THISVER}  #  Find the MITgcm ${THISVER}
1161  if test -f "${ROOTDIR}/doc/tag-index" ; then  if test -f "${ROOTDIR}/doc/tag-index" ; then
1162      THISVER=`grep checkpoint ${ROOTDIR}/doc/tag-index | head -1`      THISVER=`grep '^checkpoint' ${ROOTDIR}/doc/tag-index | head -1`
1163  fi  fi
1164    
1165  if test "x$MAKEFILE" = x ; then  if test "x$MAKEFILE" = x ; then
# Line 1300  if test ! "x$MPI" = x ; then Line 1311  if test ! "x$MPI" = x ; then
1311        DEFINES="$DEFINES -DALLOW_USE_MPI -DALWAYS_USE_MPI"        DEFINES="$DEFINES -DALLOW_USE_MPI -DALWAYS_USE_MPI"
1312  fi  fi
1313    
1314    if test ! "x$TS" = x ; then
1315          echo "  Turning on timing per timestep"
1316          DEFINES="$DEFINES -DTIME_PER_TIMESTEP"
1317    fi
1318    
1319  printf "\n===  Checking system libraries  ===\n"  printf "\n===  Checking system libraries  ===\n"
1320  printf "  Do we have the system() command using $FC...  "  printf "  Do we have the system() command using $FC...  "
1321  cat > genmake_tcomp.$FS <<EOF  cat > genmake_tcomp.$FS <<EOF
# Line 1387  if test "x$HAVE_NETCDF" != x ; then Line 1403  if test "x$HAVE_NETCDF" != x ; then
1403  else  else
1404      echo "no"      echo "no"
1405  fi  fi
1406    DEFINES="$DEFINES $IGNORE_TIME"
1407    
1408  printf "\n===  Setting defaults  ===\n"  printf "\n===  Setting defaults  ===\n"
1409  printf "  Adding MODS directories:  "  printf "  Adding MODS directories:  "
# Line 2025  cat hlist.inc         >> $MAKEFILE Line 2041  cat hlist.inc         >> $MAKEFILE
2041  cat ad_flow_files.inc >> $MAKEFILE  cat ad_flow_files.inc >> $MAKEFILE
2042  echo >> $MAKEFILE  echo >> $MAKEFILE
2043  echo 'F77FILES =  $(SRCFILES:.F=.'$FS')'      >> $MAKEFILE  echo 'F77FILES =  $(SRCFILES:.F=.'$FS')'      >> $MAKEFILE
2044  echo 'F90FILES =  $(F90SRCFILES:.F=.'$FS90')' >> $MAKEFILE  echo 'F90FILES =  $(F90SRCFILES:.F90=.'$FS90')' >> $MAKEFILE
2045  echo 'OBJFILES =  $(SRCFILES:.F=.o) $(CSRCFILES:.c=.o) $(F90SRCFILES:.F90=.o)' >> $MAKEFILE  echo 'OBJFILES =  $(SRCFILES:.F=.o) $(CSRCFILES:.c=.o) $(F90SRCFILES:.F90=.o)' >> $MAKEFILE
2046  echo >> $MAKEFILE  echo >> $MAKEFILE
2047  echo '.SUFFIXES:' >> $MAKEFILE  echo '.SUFFIXES:' >> $MAKEFILE

Legend:
Removed from v.1.122  
changed lines
  Added in v.1.128

  ViewVC Help
Powered by ViewVC 1.1.22