/[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.174 by cnh, Thu Nov 6 03:55:50 2008 UTC revision 1.203 by jmc, Thu Mar 4 21:24:22 2010 UTC
# Line 519  Usage: "$0" [OPTIONS] Line 519  Usage: "$0" [OPTIONS]
519        -pdefault=NAME | --pdefault=NAME        -pdefault=NAME | --pdefault=NAME
520            Get the default package list from "NAME".            Get the default package list from "NAME".
521    
522        -bash NAME
523              Explicitly specify the Bourne or BASH shell to use
524    
525      -make NAME | -m NAME      -make NAME | -m NAME
526        --make=NAME | -m=NAME        --make=NAME | -m=NAME
527            Use "NAME" for the MAKE program. The default is "make" but            Use "NAME" for the MAKE program. The default is "make" but
# Line 578  Usage: "$0" [OPTIONS] Line 581  Usage: "$0" [OPTIONS]
581            *only* works if it is supported by the OPTFILE that            *only* works if it is supported by the OPTFILE that
582            is being used.            is being used.
583    
584        -use_real4 | -use_r4 | -ur4 | --use_real4 | --use_r4 | --ur4
585              Use "real*4" type for _RS variable (#undef REAL4_IS_SLOW)
586              *only* works if CPP_EEOPTIONS.h allows this.
587    
588      -ignoretime | -ignore_time | --ignoretime | --ignore_time      -ignoretime | -ignore_time | --ignoretime | --ignore_time
589            Ignore all the "wall clock" routines entirely.  This will            Ignore all the "wall clock" routines entirely.  This will
590            not in any way hurt the model results -- it simply means            not in any way hurt the model results -- it simply means
# Line 611  Usage: "$0" [OPTIONS] Line 618  Usage: "$0" [OPTIONS]
618            set to PATH. i.e. Include files from \$PATH/include, link to libraries            set to PATH. i.e. Include files from \$PATH/include, link to libraries
619            from \$PATH/lib and use binaries from \$PATH/bin.            from \$PATH/lib and use binaries from \$PATH/bin.
620    
621        -omp | --omp
622              Activate OpenMP code + use Compiler option OMPFLAG
623        -omp=OMPFLAG | --omp=OMPFLAG
624              Activate OpenMP code + use Compiler option OMPFLAG
625    
626      -es | --es | -embed-source | --embed-source      -es | --es | -embed-source | --embed-source
627            Embed a tarball containing the full source code            Embed a tarball containing the full source code
628            (including the Makefile, etc.) used to build the            (including the Makefile, etc.) used to build the
629            executable [off by default]            executable [off by default]
630    
     -bash NAME  
           Explicitly specify the Bourne or BASH shell to use  
   
631    While it is most often a single word, the "NAME" variables specified    While it is most often a single word, the "NAME" variables specified
632    above can in many cases be a space-delimited string such as:    above can in many cases be a space-delimited string such as:
633    
# Line 630  Usage: "$0" [OPTIONS] Line 639  Usage: "$0" [OPTIONS]
639    
640    For more detailed genmake documentation, please see:    For more detailed genmake documentation, please see:
641    
642      http://mitgcm.org/devel_HOWTO/      http://mitgcm.org/public/devel_HOWTO/
643    
644  EOF  EOF
645    
# Line 1046  INCLUDES="-I. $INCLUDES" Line 1055  INCLUDES="-I. $INCLUDES"
1055  FFLAGS=  FFLAGS=
1056  FOPTIM=  FOPTIM=
1057  FEXTRAFLAGS=  FEXTRAFLAGS=
1058    USE_EXTENDED_SRC=
1059    EXTENDED_SRC_FLAG=
1060  CFLAGS=  CFLAGS=
1061  KFLAGS1=  KFLAGS1=
1062  KFLAGS2=  KFLAGS2=
# Line 1056  NOOPTFILES= Line 1067  NOOPTFILES=
1067  NOOPTFLAGS=  NOOPTFLAGS=
1068  MPI=  MPI=
1069  MPIPATH=  MPIPATH=
1070    OMP=
1071    OMPFLAG=
1072    USE_R4=
1073  TS=  TS=
1074  PAPIS=  PAPIS=
1075  PCLS=  PCLS=
# Line 1123  TAMC_EXTRA= Line 1137  TAMC_EXTRA=
1137    
1138  #  The following state can be set directly by command-line switches  #  The following state can be set directly by command-line switches
1139  gm_s1="OPTFILE PDEPEND PDEFAULT MAKEFILE PLATFORM ROOTDIR MODS DISABLE ENABLE"  gm_s1="OPTFILE PDEPEND PDEFAULT MAKEFILE PLATFORM ROOTDIR MODS DISABLE ENABLE"
1140  gm_s2="FC CPP IEEE TS PAPIS PCLS PAPI PCL HPMT GSL DEVEL MPI JAM DUMPSTATE STANDARDDIRS"  gm_s2="FC IEEE USE_R4 TS PAPIS PCLS PAPI PCL HPMT GSL DEVEL MPI OMP DUMPSTATE STANDARDDIRS"
1141    
1142  #  The following state is not directly set by command-line switches  #  The following state is not directly set by command-line switches
1143  gm_s3="LN S64 KPP LINK PACKAGES MAKEDEPEND PDEPEND PDEFAULT INCLUDES FFLAGS FOPTIM FEXTRAFLAGS"  gm_s3="LN S64 KPP LINK PACKAGES MAKEDEPEND PDEPEND PDEFAULT INCLUDES FFLAGS FOPTIM FEXTRAFLAGS"
# Line 1164  else Line 1178  else
1178  fi  fi
1179    
1180  #echo "$0::$1:$2:$3:$4:$5:$6:$7:"  #echo "$0::$1:$2:$3:$4:$5:$6:$7:"
 #OPTIONS=  
 #n=0  
 #for i ; do  
 #   echo "$i  $n"  
 #   setvar="OPTIONS[$n]='$i'"  
 #   #  echo "  $setvar"  
 #   eval "$setvar"  
 #   n=$(( $n + 1 ))  
 #done  
1181  #parse_options  #parse_options
1182  ac_prev=  ac_prev=
1183  for ac_option in "$@" ; do  for ac_option in "$@" ; do
# Line 1297  for ac_option in "$@" ; do Line 1302  for ac_option in "$@" ; do
1302          -noieee | --noieee)          -noieee | --noieee)
1303              IEEE= ;;              IEEE= ;;
1304    
1305            -use_real4 | -use_r4 | -ur4 | --use_real4 | --use_r4 | --ur4 )
1306                USE_R4=true ;;
1307    
1308          -ts | --ts)          -ts | --ts)
1309              TS=true ;;              TS=true ;;
1310          -papis | --papis)          -papis | --papis)
# Line 1324  for ac_option in "$@" ; do Line 1332  for ac_option in "$@" ; do
1332              MPIPATH=$ac_optarg              MPIPATH=$ac_optarg
1333              MPI=true ;;              MPI=true ;;
1334                    
1335  #       -jam | --jam)          -omp | --omp)
1336  #           JAM=1 ;;              OMP=true ;;
1337  #       -nojam | --nojam)          -omp=* | --omp=*)
1338  #           JAM=0 ;;              OMPFLAG=$ac_optarg
1339                OMP=true ;;
1340                    
1341          -ds | --ds)          -ds | --ds)
1342              DUMPSTATE=t ;;              DUMPSTATE=t ;;
# Line 1402  if test ! -d ${ROOTDIR} ; then Line 1411  if test ! -d ${ROOTDIR} ; then
1411  fi  fi
1412    
1413  #  Find the MITgcm ${THISVER}  #  Find the MITgcm ${THISVER}
1414  if test -f "${ROOTDIR}/doc/tag-index" ; then  version_file="${ROOTDIR}/doc/tag-index"
1415      THISVER=`grep '^checkpoint' ${ROOTDIR}/doc/tag-index | head -1`  if test -f $version_file ; then
1416        THISVER=`$AWK '/^checkpoint/{print $1; exit}' $version_file`
1417    #-  remove ./BUILD_INFO.h file if older than version_file
1418        if test -f ./BUILD_INFO.h -a ./BUILD_INFO.h -ot $version_file ; then
1419            echo "  remove ./BUILD_INFO.h (older than ${version_file})"
1420            rm -f ./BUILD_INFO.h
1421        fi
1422  fi  fi
1423    
1424  if test "x$MAKEFILE" = x ; then  if test "x$MAKEFILE" = x ; then
# Line 1559  if test ! "x$MPI" = x ; then Line 1574  if test ! "x$MPI" = x ; then
1574        echo "  Turning on MPI cpp macros"        echo "  Turning on MPI cpp macros"
1575        DEFINES="$DEFINES -DALLOW_USE_MPI -DALWAYS_USE_MPI"        DEFINES="$DEFINES -DALLOW_USE_MPI -DALWAYS_USE_MPI"
1576  fi  fi
1577    if test ! "x$OMP" = x ; then
1578          echo "  Add OMPFLAG and turn on OpenMP cpp macros"
1579          FFLAGS="$FFLAGS $OMPFLAG"
1580          F90FLAGS="$F90FLAGS $OMPFLAG"
1581          DEFINES="$DEFINES -DUSE_OMP_THREADING"
1582    fi
1583    
1584    if test ! "x$USE_R4" = x ; then
1585          echo "  Turning on LET_RS_BE_REAL4 cpp flag"
1586          DEFINES="$DEFINES -DLET_RS_BE_REAL4"
1587    fi
1588    
1589  if test ! "x$TS" = x ; then  if test ! "x$TS" = x ; then
1590        echo "  Turning on timing per timestep"        echo "  Turning on timing per timestep"
# Line 1640  if test ! "x$GSL" = x ; then Line 1666  if test ! "x$GSL" = x ; then
1666        INCLUDES="$INCLUDES $GSLINC"        INCLUDES="$INCLUDES $GSLINC"
1667        LIBS="$LIBS $GSLLIB"        LIBS="$LIBS $GSLLIB"
1668  fi  fi
1669    #- if USE_EXTENDED_SRC is set, add EXTENDED_SRC_FLAG to FFLAGS :
1670    if test ! "x$USE_EXTENDED_SRC" = x ; then
1671          FFLAGS="$FFLAGS $EXTENDED_SRC_FLAG"
1672          F90FIXEDFORMAT="$F90FIXEDFORMAT $EXTENDED_SRC_FLAG"
1673    fi
1674    
1675  printf "\n===  Checking system libraries  ===\n"  printf "\n===  Checking system libraries  ===\n"
1676  printf "  Do we have the system() command using $FC...  "  printf "  Do we have the system() command using $FC...  "
# Line 1762  fi Line 1793  fi
1793    
1794    
1795  printf "\n===  Setting defaults  ===\n"  printf "\n===  Setting defaults  ===\n"
1796  printf "  Adding MODS directories:  "  printf "  Adding MODS directories: "
1797  for d in $MODS ; do  for d in $MODS ; do
1798      if test ! -d $d ; then      if test ! -d $d ; then
1799          echo          echo
1800          echo "Error: MODS directory \"$d\" not found!"          echo "Error: MODS directory \"$d\" not found!"
1801          exit 1          exit 1
1802      else      else
1803          printf " $d"          printf "$d "
1804          SOURCEDIRS="$SOURCEDIRS $d"          SOURCEDIRS="$SOURCEDIRS $d"
1805          INCLUDEDIRS="$INCLUDEDIRS $d"          INCLUDEDIRS="$INCLUDEDIRS $d"
1806      fi      fi
# Line 2449  echo "" >> F90srclist.tmp Line 2480  echo "" >> F90srclist.tmp
2480  echo "" >> hsrclist.tmp  echo "" >> hsrclist.tmp
2481  echo "" >> ad_flow_files.tmp  echo "" >> ad_flow_files.tmp
2482    
2483    CMDLINE=$0
2484    for xx in "$@" ; do nw=`echo $xx | wc -w`
2485        if test $nw = '1' ; then CMDLINE="$CMDLINE $xx"
2486                            else CMDLINE="$CMDLINE '$xx'" ; fi
2487    done
2488    
2489  if test -f $MAKEFILE ; then  if test -f $MAKEFILE ; then
2490      mv -f $MAKEFILE "$MAKEFILE.bak"      mv -f $MAKEFILE "$MAKEFILE.bak"
2491  fi  fi
# Line 2458  echo "#    $MACHINE" >> $MAKEFILE Line 2495  echo "#    $MACHINE" >> $MAKEFILE
2495  echo "# This makefile was generated automatically on" >> $MAKEFILE  echo "# This makefile was generated automatically on" >> $MAKEFILE
2496  echo "#    $THISDATE" >> $MAKEFILE  echo "#    $THISDATE" >> $MAKEFILE
2497  echo "# by the command:" >> $MAKEFILE  echo "# by the command:" >> $MAKEFILE
2498  echo "#    $0 $G2ARGS" >> $MAKEFILE  echo "#    $CMDLINE"  >> $MAKEFILE
2499  echo "# executed by:" >> $MAKEFILE  echo "# executed by:" >> $MAKEFILE
2500  echo "#    ${THISUSER}@${THISHOST}:${THISCWD}" >> $MAKEFILE  echo "#    ${THISUSER}@${THISHOST}:${THISCWD}" >> $MAKEFILE
2501    
# Line 2515  else Line 2552  else
2552      echo "EMBEDDED_FILES = " >>$MAKEFILE      echo "EMBEDDED_FILES = " >>$MAKEFILE
2553  fi  fi
2554    
 #  Note: figure out some way to add Hyades JAM libraries here  
2555  cat >>$MAKEFILE <<EOF  cat >>$MAKEFILE <<EOF
2556  # Unix ln (link)  # Unix ln (link)
2557  LN = ${LN}  LN = ${LN}
# Line 2615  clean: Line 2651  clean:
2651          -rm -rf *.p *.$FS90 *.mod ${RMFILES} work.{pc,pcl} *.template          -rm -rf *.p *.$FS90 *.mod ${RMFILES} work.{pc,pcl} *.template
2652          -rm -rf *.o          -rm -rf *.o
2653          -rm -rf *.$FS *.flowdir          -rm -rf *.$FS *.flowdir
2654          -rm -rf *.f$FS90 *_mod.h *_mod.F90 *.FF90 *.mod-whirl ad_input*          -rm -rf *.f$FS90 \$(AD_CLEAN) ad_input*
         -rm -rf temp.sed reslice.dat  
2655  Clean:  Clean:
2656          @make clean          @make clean
2657          @make cleanlinks          @make cleanlinks
# Line 2682  cat >>$MAKEFILE <<EOF Line 2717  cat >>$MAKEFILE <<EOF
2717  # The normal chain of rules is (  .F - .$FS - .o  )  # The normal chain of rules is (  .F - .$FS - .o  )
2718    
2719  ## This nullifies any default implicit rules concerning these two file types:  ## This nullifies any default implicit rules concerning these two file types:
2720  %.o : %.F  ## %.o : %.F
2721    
2722  .F.$FS:  .F.$FS:
2723          \$(CPP) \$(DEFINES) \$(INCLUDES) > \$@          \$(CPP) \$(DEFINES) \$(INCLUDES) > \$@
# Line 2714  EOF Line 2749  EOF
2749  #===  Automatic Differentiation Rules  ===  #===  Automatic Differentiation Rules  ===
2750  #===  for TAMC/TAF  ======================  #===  for TAMC/TAF  ======================
2751    
2752  if test "x$OPENAD" == x ; then  if test "x$OPENAD" = x ; then
2753    
2754  cat >>$MAKEFILE <<EOF  cat >>$MAKEFILE <<EOF
2755    
# Line 2740  done Line 2775  done
2775  echo "  Add the source list for AD code generation"  echo "  Add the source list for AD code generation"
2776  echo >> $MAKEFILE  echo >> $MAKEFILE
2777  printf "AD_FILES = " >> $MAKEFILE  printf "AD_FILES = " >> $MAKEFILE
2778  AD_FILES=`cat ad_files`  AD_FILES=`cat adSrcFiles.tmp`
2779  for i in $AD_FILES ; do  for i in $AD_FILES ; do
2780      echo    " \\" >> $MAKEFILE      echo    " \\" >> $MAKEFILE
2781      printf " $i" >> $MAKEFILE      printf " $i" >> $MAKEFILE
2782  done  done
2783  echo >> $MAKEFILE  echo >> $MAKEFILE
2784  rm -f ad_files  rm -f adSrcFiles.tmp
2785    
2786  cat >>$MAKEFILE <<EOF  cat >>$MAKEFILE <<EOF
2787    
# Line 2755  adall: \$(EXE_AD) Line 2790  adall: \$(EXE_AD)
2790  adtaf: ad_taf_output.$FS  adtaf: ad_taf_output.$FS
2791  adtamc: ad_tamc_output.$FS  adtamc: ad_tamc_output.$FS
2792    
2793  ad_input_code.$FS: \$(AD_FILES) \$(H_SRC_FILES)  ad_input_code.$FS: \$(AD_FILES) \$(H_SRC_FILES) \$(AD_FLOW_FILES)
2794          @$BASH\$(TOOLSDIR)/convert_cpp_cmd2defines "Warning - this file is automatically generated - do NOT edit" -DALLOW_ADJOINT_RUN -UALLOW_TANGENTLINEAR_RUN -UALLOW_ECCO_OPTIMIZATION > ad_config.template          @$BASH\$(TOOLSDIR)/convert_cpp_cmd2defines "Warning - this file is automatically generated - do NOT edit" -DALLOW_ADJOINT_RUN -UALLOW_TANGENTLINEAR_RUN -UALLOW_ECCO_OPTIMIZATION > ad_config.template
2795          cmp ad_config.template AD_CONFIG.h || cat ad_config.template > AD_CONFIG.h          cmp ad_config.template AD_CONFIG.h || cat ad_config.template > AD_CONFIG.h
2796          -rm -f ad_config.template          -rm -f ad_config.template
2797          @make \$(F77_PP_SRC_FILES)          @make \$(F77_PP_SRC_FILES)
2798          @make \$(FLOFILES)          @make \$(FLOFILES)
2799          cat \$(FLOFILES) \$(AD_FILES) > ad_input_code.$FS          cat \$(FLOFILES) \$(AD_FILES) | sed -f \$(TOOLSDIR)/remove_comments_sed > ad_input_code.$FS
2800    
2801  ad_taf_output.$FS: ad_input_code.$FS  ad_taf_output.$FS: ad_input_code.$FS
2802          \$(TAF) \$(AD_TAF_FLAGS) \$(TAF_EXTRA) ad_input_code.$FS          \$(TAF) \$(AD_TAF_FLAGS) \$(TAF_EXTRA) ad_input_code.$FS
# Line 2938  timeRatio.c Line 2973  timeRatio.c
2973  f95_test_mods.f90: \$(OPENAD_SUPPORT_F90_SRC_FILES:F90=$FS90)  f95_test_mods.f90: \$(OPENAD_SUPPORT_F90_SRC_FILES:F90=$FS90)
2974          cat \$^ > \$@          cat \$^ > \$@
2975    
2976  f95_test.f90: all_mods.xb.x2w.w2f.pp.f$FS90 \$(NON_AD_F77_SRC_FILES:.F=_cb2m.f$FS90) ad_input_code.w2f.canon.xb.x2w.w2f.rs.pp.f$FS90  f95_test.f90: all_mods.xb.x2w.w2f.pp.f$FS90 \$(NON_AD_F77_SRC_FILES:.F=_cb2m.f$FS90) ad_input_code.w2f.pre.xb.x2w.w2f.td.pp.f$FS90
2977          cat \$^ > \$@          cat \$^ > \$@
2978    
2979  f95_test.out: f95_test_mods.f90 f95_test.f90  f95_test.out: f95_test_mods.f90 f95_test.f90
2980          f95 -fixed -w=unused -maxcontin=132 -c f95_test_mods.f90 > \$@ 2>&1          f95 -fixed -w=unused -maxcontin=132 -c f95_test_mods.f90 > \$@ 2>&1
2981          f95 -fixed -w=unused -maxcontin=132 -c -fixed f95_test.f90 >> \$@ 2>&1          f95 -fixed -w=unused -maxcontin=132 -c -fixed f95_test.f90 >> \$@ 2>&1
2982    
2983  AD_OBJ_FILES=\$(OPENAD_SUPPORT_F90_SRC_FILES:.F90=.o) \$(OPENAD_SUPPORT_C_SRC_FILES:.c=.o) all_mods.xb.x2w.w2f.pp.o  ad_input_code.w2f.canon.xb.x2w.w2f.rs.pp.o \$(NON_AD_F77_SRC_FILES:.F=_cb2m.o) \$(C_SRC_FILES:.c=.o) \$(F90_SRC_FILES:.F90=.o)  # the file included below is created by the
2984    # postProcessor and its inclusion sets the
2985    # variable POSTPROCESSEDFILES
2986    # used below. Because the file is made during
2987    # make it won't be read until the second (recursive)
2988    # invocation in the rule below
2989    -include postProcess.make
2990    
2991    AD_OBJ_FILES_S1=\$(OPENAD_SUPPORT_F90_SRC_FILES:.F90=.o) \$(OPENAD_SUPPORT_C_SRC_FILES:.c=.o) \$(POSTPROCESSEDFILES:.f$FS90=.o)
2992    
2993    AD_OBJ_FILES_S2=\$(AD_OBJ_FILES_S1) \$(NON_AD_F77_SRC_FILES:.F=_cb2m.o) \$(C_SRC_FILES:.c=.o) \$(F90_SRC_FILES:.F90=.o)
2994    
2995    postProcess.comp: \$(ALL_LINKED_FILES) \$(addsuffix _mod.h, \$(CB2M_F90_SRC_NAMES)) postProcess.tag \$(AD_OBJ_FILES_S1)
2996    ifeq (\$(MAKELEVEL),0)
2997            \$(MAKE) adAll
2998    else
2999            touch \$@
3000    endif
3001    
3002  \$(EXE_AD): \$(ALL_LINKED_FILES) \$(addsuffix _mod.h, \$(CB2M_F90_SRC_NAMES)) \$(AD_OBJ_FILES)  \$(EXE_AD): \$(ALL_LINKED_FILES) \$(addsuffix _mod.h, \$(CB2M_F90_SRC_NAMES)) postProcess.comp \$(AD_OBJ_FILES_S2)
3003          @echo Creating \$@ ...  ifeq (\$(MAKELEVEL),1)
3004          \$(LINK) -o \$@ \$(FFLAGS) \$(FOPTIM) \$(AD_OBJ_FILES) \$(LIBS)          \$(LINK) -o \$@ \$(FFLAGS) \$(FOPTIM) \$(AD_OBJ_FILES_S2) \$(LIBS)
3005    else
3006            touch \$@
3007    endif
3008    
3009  # makefile debug rule  # makefile debug rule
3010  openad: ad_input_code.w2f.canon.xb.x2w.w2f.rs.pp.f$FS90  openad: ad_input_code.w2f.pre.xb.x2w.w2f.td.pp.f$FS90
3011  .PHONY: openad  .PHONY: openad
3012    
3013  # create the module files  # create the module files
# Line 2979  ad_output.txt: \$(EXE_AD) Line 3034  ad_output.txt: \$(EXE_AD)
3034          @./\$(EXE_AD) > \$@          @./\$(EXE_AD) > \$@
3035    
3036  CB2M_AD_FILES=\$(AD_FILES:.f=_cb2m.f$FS90)  CB2M_AD_FILES=\$(AD_FILES:.f=_cb2m.f$FS90)
3037  ad_input_code.f$FS90: ../OAD_support/maxMinDefs.f \$(CB2M_AD_FILES)  ad_input_code.f$FS90:  \$(CB2M_AD_FILES)
3038          cat \$^ > \$@          cat \$^ > \$@
3039    
3040  # strip all comments and blanks to reduce  # strip all comments and blanks to reduce
# Line 2998  ad_input_code_sf.w2f.f$FS90: ad_input_co Line 3053  ad_input_code_sf.w2f.f$FS90: ad_input_co
3053          cat w2f__types.f90 \$(basename \$<).w2f.f > \$@          cat w2f__types.f90 \$(basename \$<).w2f.f > \$@
3054    
3055  # canonicalizer  # canonicalizer
3056  ad_input_code_sf.w2f.canon.f$FS90: ad_input_code_sf.w2f.f$FS90 canon.v1.py  ad_input_code_sf.w2f.pre.f$FS90: ad_input_code_sf.w2f.f$FS90 preProcess.py
3057          python canon.v1.py --r8 \$< > \$@          ./preProcess.py --timing --r8 -H -S \$< -o \$@
3058    
3059  # F -> WHIRL  # F -> WHIRL
3060  # note that the canonicalized version cuts off at col 72  # note that the canonicalized version cuts off at col 72
# Line 3007  ad_input_code_sf.w2f.canon.f$FS90: ad_in Line 3062  ad_input_code_sf.w2f.canon.f$FS90: ad_in
3062  # as we are in fixed mode and cut of exactly there.  # as we are in fixed mode and cut of exactly there.
3063  # Otherwise mfef90 patches in spaces to fill up to 72 (or 132)  # Otherwise mfef90 patches in spaces to fill up to 72 (or 132)
3064  # characters respectively.  # characters respectively.
3065  ad_input_code_sf.w2f.canon.B: ad_input_code_sf.w2f.canon.f$FS90 mfef90  ad_input_code_sf.w2f.pre.B: ad_input_code_sf.w2f.pre.f$FS90 mfef90
3066          ./mfef90 -r8 -z -F \$<          ./mfef90 -r8 -z -F \$<
3067          mv \$<.B \$@          mv \$<.B \$@
3068    
3069  # WHIRL -> XAIF  # WHIRL -> XAIF
3070  ad_input_code_sf.w2f.canon.xaif : ad_input_code_sf.w2f.canon.B whirl2xaif  ad_input_code_sf.w2f.pre.xaif : ad_input_code_sf.w2f.pre.B whirl2xaif
3071          ./whirl2xaif -s -n --debug 1 -o \$@ \$<          ./whirl2xaif -s -n --debug 1 -o \$@ \$<
3072    
3073  # XAIF -> XAIF'  # XAIF -> XAIF'
3074  ad_input_code_sf.w2f.canon.xb.xaif : ad_input_code_sf.w2f.canon.xaif xaif.xsd xaif_base.xsd xaif_inlinable_intrinsics.xsd xaif_derivative_propagator.xsd xaif_output.xsd openad_adm  ad_input_code_sf.w2f.pre.xb.xaif : ad_input_code_sf.w2f.pre.xaif xaif.xsd xaif_base.xsd xaif_inlinable_intrinsics.xsd xaif_derivative_propagator.xsd xaif_output.xsd oadDriver
3075          ./openad_adm -f -t forward_step -i \$< -c \${XAIFSCHEMAROOT}/schema/examples/inlinable_intrinsics.xaif -o \$@ -I -r          ./oadDriver -f -t forward_step -i \$< -c \${XAIFSCHEMAROOT}/schema/examples/inlinable_intrinsics.xaif -o \$@ -I -r
3076    
3077  # XAIF' -> WHIRL'  # XAIF' -> WHIRL'
3078  ad_input_code_sf.w2f.canon.xb.x2w.B : ad_input_code_sf.w2f.canon.xb.xaif xaif2whirl  ad_input_code_sf.w2f.pre.xb.x2w.B : ad_input_code_sf.w2f.pre.xb.xaif xaif2whirl
3079          ./xaif2whirl --debug 1 --structured ad_input_code_sf.w2f.canon.B \$<          ./xaif2whirl --debug 1 ad_input_code_sf.w2f.pre.B \$<
3080    
3081  # WHIRL' -> F'  # WHIRL' -> F'
3082  ad_input_code_sf.w2f.canon.xb.x2w.w2f.f$FS90: ad_input_code_sf.w2f.canon.xb.x2w.B whirl2f whirl2f_be  ad_input_code_sf.w2f.pre.xb.x2w.w2f.f$FS90: ad_input_code_sf.w2f.pre.xb.x2w.B whirl2f whirl2f_be
3083          ./whirl2f -FLIST:ftn_file=\$@ -openad \$<          ./whirl2f -FLIST:ftn_file=\$@ -openad \$<
3084    
 # undo slice hiding  
3085  # insert template directives  # insert template directives
3086  ad_input_code_sf.w2f.canon.xb.x2w.w2f.rs.f$FS90: ad_input_code_sf.w2f.canon.xb.x2w.w2f.f$FS90 reslicer.py ../OAD_support/insertTemplateDir.bash  ad_input_code_sf.w2f.pre.xb.x2w.w2f.td.f$FS90: ad_input_code_sf.w2f.pre.xb.x2w.w2f.f$FS90 ../OAD_support/insertTemplateDir.bash
3087          python reslicer.py \$< > \$<.1          ../OAD_support/insertTemplateDir.bash \$< \$@
         ../OAD_support/insertTemplateDir.bash \$<.1  \$@  
         rm \$<.1  
3088    
3089    PPEXTRAS=\$(wildcard ../OAD_support/ad_template.*.F) ../OAD_support/ad_inline.F
3090  # postprocess F'  # postprocess F'
3091  ad_input_code_sf.w2f.canon.xb.x2w.w2f.rs.pp.f$FS90: ad_input_code_sf.w2f.canon.xb.x2w.w2f.rs.f$FS90 multi-pp.pl ../OAD_support/ad_inline.f \$(wildcard ../OAD_support/ad_template.*.f)  postProcess.tag: ad_input_code_sf.w2f.pre.xb.x2w.w2f.td.f$FS90 postProcess.py \$(PPEXTRAS:.F=.f)
3092          perl multi-pp.pl -inline=../OAD_support/ad_inline.f \$<          # the target is a placeholder to signal execution of the rule
3093          # the postprocessor still gets the name wrong          touch \$@
3094          cat \$<.pp | sed 's/RETURN//' > \$@          # this step also creates the file postProcess.make but we cannot
3095            # name it as the target or else make will try to remake it for
3096  # extract all transformed modules          # the include directive above for any rule, e.g. make clean
3097  all_mods.xb.x2w.w2f.pp.f$FS90: ad_input_code_sf.w2f.canon.xb.x2w.w2f.rs.pp.f$FS90          ./postProcess.py --progress --timing --outputFormat=fixed -m r -i ../OAD_support/ad_inline.f --width 4 \$<
         cat \$< | sed -n '/MODULE /,/END MODULE/p' > \$@  
   
 # remove the transformed globals module from the  
 # transformed ad_input_code file  
 # and remove for now the duplicate variables  
 # and fix 2 data statements  
 ad_input_code.w2f.canon.xb.x2w.w2f.rs.pp.f$FS90: ad_input_code_sf.w2f.canon.xb.x2w.w2f.rs.pp.f$FS90  
         cat \$< | sed '/MODULE /,/END MODULE/d' | sed '/^      INTEGER(w2f__i4) DOLOOP_UB/d' > \$@  
3098    
3099  # setup some links  # setup some links
3100  %.xsd:  %.xsd:
# Line 3065  mfef90: Line 3110  mfef90:
3110  whirl2xaif xaif2whirl:  whirl2xaif xaif2whirl:
3111          \$(LN) \${OPENADFORTTK}/bin/\$@ .          \$(LN) \${OPENADFORTTK}/bin/\$@ .
3112    
3113  %.pl:  preProcess.py postProcess.py:
3114          \$(LN) \${OPENADFORTTK}/bin/\$@ .          \$(LN) \${OPENADFORTTK_BASE}/tools/SourceProcessing/\$@ .
   
 %.py:  
         \$(LN) \${OPENADROOT}/OpenADFortTk/tools/canonicalize/\$@ .  
3115    
3116  whirl2f whirl2f_be:  whirl2f whirl2f_be:
3117          \$(LN) \${OPEN64ROOT}/whirl2f/\$@ .          \$(LN) \${OPEN64ROOT}/whirl2f/\$@ .
3118    
3119  openad_adm:  oadDriver:
3120          \$(LN) \${XAIFBOOSTERROOT}/xaifBooster/algorithms/BasicBlockPreaccumulationReverse/test/t \$@          \$(LN) \${XAIFBOOSTERROOT}/xaifBooster/algorithms/BasicBlockPreaccumulationReverse/driver/oadDriver \$@
3121    
3122    AD_CLEAN += *_mod.h *_mod.F90 *.FF90 *.mod-whirl temp.sed oad_cp.* postProcess.make postProcess.tag postProcess.comp \$(PPEXTRAS:.F=.f)
3123    
3124  # ============ end OpenAD specific section ==============  # ============ end OpenAD specific section ==============
3125    

Legend:
Removed from v.1.174  
changed lines
  Added in v.1.203

  ViewVC Help
Powered by ViewVC 1.1.22