/[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.231 by jmc, Fri Jul 6 18:55:13 2012 UTC revision 1.235 by utke, Sat Aug 18 05:48:34 2012 UTC
# Line 1029  EOF Line 1029  EOF
1029      echo " --> set HAVE_NETCDF='$HAVE_NETCDF'" >> $LOGFILE      echo " --> set HAVE_NETCDF='$HAVE_NETCDF'" >> $LOGFILE
1030  }  }
1031    
1032    check_lapack_libs()  {
1033        if test ! "x$SKIP_LAPACK_CHECK" = x ; then
1034            return
1035        fi
1036        echo >> $LOGFILE
1037        echo "running: check_lapack_libs()" >> $LOGFILE
1038        cat <<EOF > genmake_tla.F
1039          program fgenla
1040          integer info
1041          integer ipiv( 2 )
1042          double precision ab( 4, 2 ), b( 2 )
1043          data ab / 0., 0., 1., 2., 0., 2., 1., 0. /
1044          data b / 1., 1. /
1045          call dgbsv( 2, 1, 1, 1, ab, 4, ipiv, b, 2, info )
1046          IF (info .NE. 0) write(*,*) 'Error:', info
1047          write(*,*) b
1048          end
1049    EOF
1050        echo "===  genmake_tla.F  >>>" > genmake_tla.log
1051        cat genmake_tla.F >> genmake_tla.log
1052        echo "<<<  genmake_tla.F  ===" >> genmake_tla.log
1053        RET_CPP=f
1054        COMM="cat genmake_tla.F | $CPP $DEFINES $INCLUDES"
1055        echo "$COMM" >> genmake_tla.log
1056        eval $COMM > genmake_tla.$FS 2>/dev/null  &&  RET_CPP=t
1057        if test "x$RET_CPP" = xf ; then
1058            echo "  WARNING: CPP failed to pre-process the lapack test." \
1059                >> genmake_tla.log
1060            echo "    Please check that \$INCLUDES is properly set." \
1061                >> genmake_tla.log
1062        fi
1063        echo "$FC $FFLAGS $FOPTIM -c genmake_tla.$FS  \ " >> genmake_tla.log
1064        echo "  &&  $LINK $FFLAGS $FOPTIM -o genmake_tla.o $LIBS" >> genmake_tla.log
1065        $FC $FFLAGS $FOPTIM -c genmake_tla.$FS >> genmake_tla.log 2>&1  \
1066            &&  $LINK $FFLAGS $FOPTIM -o genmake_tla genmake_tla.o $LIBS >> genmake_tla.log 2>&1
1067        RET_COMPILE=$?
1068        cat genmake_tla.log >> $LOGFILE
1069    
1070        # test program execution not always possible (see check_netcdf_libs)
1071        #
1072        #test -x ./genmake_tla  &&  ./genmake_tla >> genmake_tla.log 2>&1
1073        #RETVAL=$?
1074        #if test "x$RET_COMPILE" = x0 -a "x$RETVAL" = x0 ; then
1075    
1076        if test "x$RET_COMPILE" = x0 ; then
1077            HAVE_LAPACK=t
1078            echo "check_lapack: successful" >> $LOGFILE
1079        else
1080            # try again with "-llapack" added to the libs
1081            echo "==> try again with added '-llapack'" > genmake_tla.log
1082            echo "cat genmake_tla.F | $CPP $DEFINES $INCLUDES > genmake_tla.$FS \ " >> genmake_tla.log
1083            echo " &&  $FC $FFLAGS $FOPTIM -c genmake_tla.$FS \ " >> genmake_tla.log
1084            echo " &&  $LINK $FFLAGS $FOPTIM -o genmake_tla genmake_tla.o $LIBS -llapack" >> genmake_tla.log
1085            cat genmake_tla.F | $CPP $DEFINES $INCLUDES > genmake_tla.$FS 2>/dev/null  \
1086                &&  $FC $FFLAGS $FOPTIM -c genmake_tla.$FS >> genmake_tla.log 2>&1  \
1087                &&  $LINK $FFLAGS $FOPTIM -o genmake_tla genmake_tla.o $LIBS -llapack >> genmake_tla.log 2>&1
1088            RET_COMPILE=$?
1089            echo >> $LOGFILE
1090            cat genmake_tla.log >> $LOGFILE
1091            if test "x$RET_COMPILE" = x0 ; then
1092                LIBS="$LIBS -llapack"
1093                HAVE_LAPACK=t
1094                echo "check_lapack: successful" >> $LOGFILE
1095            else
1096            # try again with "-lf77blas -lcblas" added to the libs
1097                echo "==> try again with added '-llapack -lf77blas -lcblas'" > genmake_tla.log
1098                echo "cat genmake_tla.F | $CPP $DEFINES $INCLUDES > genmake_tla.$FS \ " >> genmake_tla.log
1099                echo " &&  $FC $FFLAGS $FOPTIM -c genmake_tla.$FS \ " >> genmake_tla.log
1100                echo " &&  $LINK $FFLAGS $FOPTIM -o genmake_tla genmake_tla.o $LIBS -llapack -lf77blas -lcblas" >> genmake_tla.log
1101                cat genmake_tla.F | $CPP $DEFINES $INCLUDES > genmake_tla.$FS 2>/dev/null  \
1102                    &&  $FC $FFLAGS $FOPTIM -c genmake_tla.$FS >> genmake_tla.log 2>&1  \
1103                    &&  $LINK $FFLAGS $FOPTIM -o genmake_tla genmake_tla.o $LIBS -llapack -lf77blas -lcblas >> genmake_tla.log 2>&1
1104                RET_COMPILE=$?
1105                echo >> $LOGFILE
1106                cat genmake_tla.log >> $LOGFILE
1107                if test "x$RET_COMPILE" = x0 ; then
1108                    LIBS="$LIBS -llapack -lf77blas -lcblas"
1109                    HAVE_LAPACK=t
1110                    echo "check_lapack: successful" >> $LOGFILE
1111                else
1112                # try again with "-latlas" added to the libs
1113                    echo "==> try again with added '-llapack -lf77blas -lcblas -latlas'" > genmake_tla.log
1114                    echo "cat genmake_tla.F | $CPP $DEFINES $INCLUDES > genmake_tla.$FS \ " >> genmake_tla.log
1115                    echo " &&  $FC $FFLAGS $FOPTIM -c genmake_tla.$FS \ " >> genmake_tla.log
1116                    echo " &&  $LINK $FFLAGS $FOPTIM -o genmake_tla genmake_tla.o $LIBS -llapack -lf77blas -lcblas -latlas" >> genmake_tla.log
1117                    cat genmake_tla.F | $CPP $DEFINES $INCLUDES > genmake_tla.$FS 2>/dev/null  \
1118                        &&  $FC $FFLAGS $FOPTIM -c genmake_tla.$FS >> genmake_tla.log 2>&1  \
1119                        &&  $LINK $FFLAGS $FOPTIM -o genmake_tla genmake_tla.o $LIBS -llapack -lf77blas -lcblas -latlas >> genmake_tla.log 2>&1
1120                    RET_COMPILE=$?
1121                    echo >> $LOGFILE
1122                    cat genmake_tla.log >> $LOGFILE
1123                    if test "x$RET_COMPILE" = x0 ; then
1124                        LIBS="$LIBS -llapack -lf77blas -lcblas -latlas"
1125                        HAVE_LAPACK=t
1126                        echo "check_lapack: successful" >> $LOGFILE
1127                    fi
1128                fi
1129            fi
1130        fi
1131        rm -f genmake_tla*
1132        echo " --> set HAVE_LAPACK='$HAVE_LAPACK'" >> $LOGFILE
1133    }
1134    
1135    
1136  ###############################################################################  ###############################################################################
1137  #   Sequential part of script starts here  #   Sequential part of script starts here
# Line 1096  HAVE_STAT= Line 1199  HAVE_STAT=
1199  HAVE_NETCDF=  HAVE_NETCDF=
1200  HAVE_ETIME=  HAVE_ETIME=
1201  IGNORE_TIME=  IGNORE_TIME=
1202    HAVE_LAPACK=
1203    
1204  MODS=  MODS=
1205  TOOLSDIR=  TOOLSDIR=
# Line 1148  gm_s4="LN S64 LINK MAKE PACKAGES INCLUDE Line 1252  gm_s4="LN S64 LINK MAKE PACKAGES INCLUDE
1252  gm_s5="CFLAGS LIBS KPP KFLAGS1 KFLAGS2 KPPFILES NOOPTFILES NOOPTFLAGS"  gm_s5="CFLAGS LIBS KPP KFLAGS1 KFLAGS2 KPPFILES NOOPTFILES NOOPTFLAGS"
1253  gm_s6="TOOLSDIR SOURCEDIRS INCLUDEDIRS EXEDIR EXECUTABLE EXEHOOK"  gm_s6="TOOLSDIR SOURCEDIRS INCLUDEDIRS EXEDIR EXECUTABLE EXEHOOK"
1254  gm_s7="PWD THISHOST THISUSER THISDATE THISVER MACHINE"  gm_s7="PWD THISHOST THISUSER THISDATE THISVER MACHINE"
1255  gm_s8="FC_NAMEMANGLE HAVE_NETCDF HAVE_SYSTEM HAVE_FDATE HAVE_ETIME"  gm_s8="FC_NAMEMANGLE HAVE_NETCDF HAVE_SYSTEM HAVE_FDATE HAVE_ETIME HAVE_LAPACK"
1256    
1257  #  The following are all related to adjoint/tangent-linear stuff  #  The following are all related to adjoint/tangent-linear stuff
1258  gm_s10="AUTODIFF_PKG_USED AD_OPTFILE TAMC TAF AD_TAMC_FLAGS AD_TAF_FLAGS"  gm_s10="AUTODIFF_PKG_USED AD_OPTFILE TAMC TAF AD_TAMC_FLAGS AD_TAF_FLAGS"
# Line 1808  if test "x$HAVE_NETCDF" != x ; then Line 1912  if test "x$HAVE_NETCDF" != x ; then
1912  else  else
1913      echo "no"      echo "no"
1914  fi  fi
1915    
1916    printf "  Can we create LAPACK-enabled binaries...  "
1917    check_lapack_libs
1918    if test "x$HAVE_LAPACK" != x ; then
1919        DEFINES="$DEFINES -DHAVE_LAPACK"
1920        echo "yes"
1921    else
1922        echo "no"
1923    fi
1924  DEFINES="$DEFINES $IGNORE_TIME"  DEFINES="$DEFINES $IGNORE_TIME"
1925    
1926  if test "x$EMBED_SRC" = xt ; then  if test "x$EMBED_SRC" = xt ; then
# Line 2121  EOF Line 2234  EOF
2234      fi      fi
2235  fi  fi
2236    
2237    #  Check for package RADTRANS: if LAPACK is not available,
2238    #  then issue a warning that the direct radtrans solver is not available.
2239    if test "x$HAVE_LAPACK" != xt ; then
2240        echo " $PACKAGES " | grep ' radtrans ' > /dev/null 2>&1
2241        RETVAL=$?
2242        if test "x$RETVAL" = x0 ; then
2243            cat <<EOF
2244    *********************************************************************
2245    WARNING: the "radtrans" package was enabled but tests failed to
2246      compile LAPACK applications.  This means that the direct radtrans
2247      solver is not available and compilation will fail if it is enabled.
2248      If you want to use the direct solver, please check that:
2249    
2250      1) LAPACK is correctly installed for this compiler and
2251      2) the LIBS variable (within the "optfile") specifies the correct
2252         LAPACK library to link against.
2253    *********************************************************************
2254    EOF
2255        fi
2256    fi
2257    
2258  if  test "x${PKG_DEPEND}" != x ; then  if  test "x${PKG_DEPEND}" != x ; then
2259    echo "  applying package dependency rules"    echo "  applying package dependency rules"
2260    ck=    ck=
# Line 2725  Clean: Line 2859  Clean:
2859          @make -f \$(MAKEFILE) clean          @make -f \$(MAKEFILE) clean
2860          @make -f \$(MAKEFILE) cleanlinks          @make -f \$(MAKEFILE) cleanlinks
2861          -rm -f \$(SPECIAL_FILES) f90mkdepend.log $MAKEFILE.old          -rm -f \$(SPECIAL_FILES) f90mkdepend.log $MAKEFILE.old
2862          -rm -f taf_command taf_output taf_ad.log taf_ad_flow.log          -rm -f taf_command taf_output taf_ad.log taf_ad_flow.log taf_ftl.log
2863          -rm -f genmake_warnings genmake_errors make.log          -rm -f genmake_warnings genmake_errors make.log
2864    
2865  # remove also the executable, files that "genmake2" generates (except Makefile)  # remove also the executable, files that "genmake2" generates (except Makefile)
2866  #         and output from a run (plus log files from testreport)  #         and output from a run (plus log files from testreport)
2867  CLEAN:  CLEAN:
2868          @make -f \$(MAKEFILE) Clean          @make -f \$(MAKEFILE) Clean
2869          -rm -f \$(EXECUTABLE) \$(EXE_AD) *.bak          -rm -f \$(EXECUTABLE) \$(EXE_AD) \$(EXE_FTL) *.bak
2870          -rm -f $LOGFILE genmake_state genmake_*optfile          -rm -f $LOGFILE genmake_state genmake_*optfile
2871          -rm -f SIZE.h.mpi genmake.tr_log make.tr_log          -rm -f SIZE.h.mpi genmake.tr_log make.tr_log
2872          -find \$(EXEDIR) -name "*.meta" -exec rm {} \;          -find \$(EXEDIR) -name "*.meta" -exec rm {} \;
# Line 2903  adtrick: Line 3037  adtrick:
3037  adobj: ad_taf_output.o \$(OBJFILES)  adobj: ad_taf_output.o \$(OBJFILES)
3038    
3039  # ... FTL ...  # ... FTL ...
3040  ftlall: ftl_taf  ftlall: \$(EXE_FTL)
3041  ftltaf: ftl_taf_output.$FS  ftltaf: ftl_taf_output.$FS
3042  ftltamc: ftl_tamc_output.$FS  ftltamc: ftl_tamc_output.$FS
3043    
# Line 2913  ftl_input_code.$FS: \$(AD_FILES) \$(H_SR Line 3047  ftl_input_code.$FS: \$(AD_FILES) \$(H_SR
3047          -rm -f ftl_config.template          -rm -f ftl_config.template
3048          @make -f \$(MAKEFILE) \$(F77_PP_SRC_FILES)          @make -f \$(MAKEFILE) \$(F77_PP_SRC_FILES)
3049          @make -f \$(MAKEFILE) \$(AD_FLOW_FILES)          @make -f \$(MAKEFILE) \$(AD_FLOW_FILES)
3050          cat \$(AD_FLOW_FILES) \$(AD_FILES) > ftl_input_code.$FS          cat \$(AD_FLOW_FILES) \$(AD_FILES) | sed -f \$(TOOLSDIR)/remove_comments_sed > ftl_input_code.$FS
3051    
3052  ftl_taf_output.$FS: ftl_input_code.$FS  ftl_taf_output.$FS: ftl_input_code.$FS
3053          \$(TAF) \$(FTL_TAF_FLAGS) \$(TAF_EXTRA) ftl_input_code.$FS          \$(TAF) \$(FTL_TAF_FLAGS) \$(TAF_EXTRA) ftl_input_code.$FS
# Line 2925  ftltafonly: Line 3059  ftltafonly:
3059          ls -l ftl_input_code_ftl.$FS          ls -l ftl_input_code_ftl.$FS
3060          cat ftl_input_code_ftl.$FS | sed -f \$(TOOLSDIR)/adjoint_sed > ftl_taf_output.$FS          cat ftl_input_code_ftl.$FS | sed -f \$(TOOLSDIR)/adjoint_sed > ftl_taf_output.$FS
3061    
3062  ftl_taf: ftl_taf_output.o \$(OBJFILES)  \${EXE_FTL}: ftl_taf_output.o \$(OBJFILES)
3063          \$(LINK) -o ${EXE_FTL} \$(FFLAGS) \$(FOPTIM) \$(OBJFILES) ftl_taf_output.o \$(LIBS)          \$(LINK) -o \${EXE_FTL} \$(FFLAGS) \$(FOPTIM) \$(OBJFILES) ftl_taf_output.o \$(LIBS)
3064    
3065  ftl_tamc_output.$FS: ftl_input_code.$FS  ftl_tamc_output.$FS: ftl_input_code.$FS
3066          \$(TAMC) \$(FTL_TAMC_FLAGS) \$(TAMC_EXTRA) ftl_input_code.$FS          \$(TAMC) \$(FTL_TAMC_FLAGS) \$(TAMC_EXTRA) ftl_input_code.$FS
# Line 3057  f95_test.out: f95_test_mods.f90 f95_test Line 3191  f95_test.out: f95_test_mods.f90 f95_test
3191          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
3192          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
3193    
3194  # the file included below is created by the  CB2M_AD_FILES=\$(AD_FILES:.f=_cb2m.f$FS90)
 # postProcessor and its inclusion sets the  
 # variable POSTPROCESSEDFILES  
 # used below. Because the file is made during  
 # make it won't be read until the second (recursive)  
 # invocation in the rule below  
 -include postProcess.make  
3195    
3196  AD_OBJ_FILES_S1=\$(OPENAD_SUPPORT_F90_SRC_FILES:.F90=.o) \$(OPENAD_SUPPORT_C_SRC_FILES:.c=.o) \$(POSTPROCESSEDFILES:.f$FS90=.o)  AD_OBJ_FILES_S1=\$(OPENAD_SUPPORT_F90_SRC_FILES:.F90=.o) \$(OPENAD_SUPPORT_C_SRC_FILES:.c=.o)  OAD_intrinsics_oad.o \$(CB2M_AD_FILES:.f$FS90=_oad.o)
3197    
3198  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)  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)
3199    
3200  postProcess.comp: \$(ALL_LINKED_FILES) \$(addsuffix _mod.h, \$(CB2M_F90_SRC_NAMES)) postProcess.tag \$(AD_OBJ_FILES_S1)  \$(EXE_AD): \$(ALL_LINKED_FILES) \$(addsuffix _mod.h, \$(CB2M_F90_SRC_NAMES)) postProcess.tag \$(AD_OBJ_FILES_S2)
 ifeq (\$(MAKELEVEL),0)  
         \$(MAKE) adAll  
 else  
         touch \$@  
 endif  
   
 \$(EXE_AD): \$(ALL_LINKED_FILES) \$(addsuffix _mod.h, \$(CB2M_F90_SRC_NAMES)) postProcess.comp \$(AD_OBJ_FILES_S2)  
 ifeq (\$(MAKELEVEL),1)  
3201          \$(LINK) -o \$@ \$(FFLAGS) \$(FOPTIM) \$(AD_OBJ_FILES_S2) \$(LIBS)          \$(LINK) -o \$@ \$(FFLAGS) \$(FOPTIM) \$(AD_OBJ_FILES_S2) \$(LIBS)
 else  
         touch \$@  
 endif  
3202    
3203  # makefile debug rule  # create sources files modules from header files containing common blocks
 openad: ad_input_code.w2f.pre.xb.x2w.w2f.td.pp.f$FS90  
 .PHONY: openad  
   
 # create the module files  
3204  %_mod.FF90 : %.h ../OAD_support/cb2mGetModules.csh ../OAD_support/cb2mGetModules.awk  %_mod.FF90 : %.h ../OAD_support/cb2mGetModules.csh ../OAD_support/cb2mGetModules.awk
3205          ../OAD_support/cb2mGetModules.csh $< ../OAD_support/cb2mGetModules.awk          ../OAD_support/cb2mGetModules.csh $< ../OAD_support/cb2mGetModules.awk
3206    
3207  # create the header files  # create new header files with USE statements for the new modules made above
3208  %_mod.h : %.h ../OAD_support/cb2mGetHeaders.csh ../OAD_support/cb2mGetHeaders.awk  %_mod.h : %.h ../OAD_support/cb2mGetHeaders.csh ../OAD_support/cb2mGetHeaders.awk
3209          ../OAD_support/cb2mGetHeaders.csh $< ../OAD_support/cb2mGetHeaders.awk \$(CB2M_F90_SRC_NAMES)          ../OAD_support/cb2mGetHeaders.csh $< ../OAD_support/cb2mGetHeaders.awk \$(CB2M_F90_SRC_NAMES)
3210    
3211  # change everybody else to use the new module files:  # change the include directives of everybody to refer to  the new header files with the USE statements
3212  %_cb2m.FF90 : %.F ../OAD_support/cb2mUseModules.bash  %_cb2m.FF90 : %.F ../OAD_support/cb2mUseModules.bash
3213          ../OAD_support/cb2mUseModules.bash $< ${MPI}          ../OAD_support/cb2mUseModules.bash $< ${MPI}
3214    
# Line 3110  ad_output.txt: \$(EXE_AD) Line 3223  ad_output.txt: \$(EXE_AD)
3223          @printf 'running ... '          @printf 'running ... '
3224          @./\$(EXE_AD) > \$@          @./\$(EXE_AD) > \$@
3225    
 CB2M_AD_FILES=\$(AD_FILES:.f=_cb2m.f$FS90)  
3226  ad_input_code.f$FS90:  \$(CB2M_AD_FILES)  ad_input_code.f$FS90:  \$(CB2M_AD_FILES)
3227          cat \$^ > \$@          cat \$^ > \$@
3228    
 # strip all comments and blanks to reduce  
 # the file size in order to reduce perl's memory requirements  
 ad_input_code_sf.f$FS90 : ad_input_code.f$FS90  
         cat \$^ | sed -f ../OAD_support/strip.sed | sed -f ../OAD_support/stop2print.sed > \$@  
   
 # mfef90 preprocessing  
 # expand statement functions  
 # expose mfef90 specific substring handling  
 # add the w2f__types module  
 ad_input_code_sf.w2f.f$FS90: ad_input_code_sf.f$FS90 mfef90 whirl2f whirl2f_be w2f__types.f90  
         ./mfef90 -r8 -z -F -N132 \$<  
         mv \$<.B \$(basename \$<).B  
         ./whirl2f -openad \$(basename \$<).B  
         cat w2f__types.f90 \$(basename \$<).w2f.f > \$@  
   
3229  # canonicalizer  # canonicalizer
3230  ad_input_code_sf.w2f.pre.f$FS90: ad_input_code_sf.w2f.f$FS90 preProcess.py  ad_input_code_sf.pre.f90 : \$(CB2M_AD_FILES)
3231          ./preProcess.py --timing --r8 -H -S \$< -o \$@          \${OPENADFORTTK_BASE}/tools/SourceProcessing/preProcess.py --timing --r8 -H -S  -o \$@ \$^
3232    
3233    # replace stop statements (to avoid the implied unstructured control flow)  with print statements
3234    ad_input_code_sf.pre.s2p.f90 : ad_input_code_sf.pre.f90
3235            cat \$< | sed -f ../OAD_support/stop2print.sed > ad_input_code_sf.pre.s2p.f90
3236    
3237  # F -> WHIRL  # F -> WHIRL
3238  # note that the canonicalized version cuts off at col 72  ad_input_code_sf.pre.s2p.B: ad_input_code_sf.pre.s2p.f90
3239  # doing this also for string constants which is ok as long          \${OPEN64ROOT}/crayf90/sgi/mfef90 -r8 -z -F ad_input_code_sf.pre.s2p.f90
 # as we are in fixed mode and cut of exactly there.  
 # Otherwise mfef90 patches in spaces to fill up to 72 (or 132)  
 # characters respectively.  
 ad_input_code_sf.w2f.pre.B: ad_input_code_sf.w2f.pre.f$FS90 mfef90  
         ./mfef90 -r8 -z -F \$<  
         mv \$<.B \$@  
3240    
3241  # WHIRL -> XAIF  # WHIRL -> XAIF
3242  ad_input_code_sf.w2f.pre.xaif : ad_input_code_sf.w2f.pre.B whirl2xaif  ad_input_code_sf.pre.s2p.xaif : ad_input_code_sf.pre.s2p.B
3243          ./whirl2xaif -s -n --debug 1 -o \$@ \$<          \${OPENADFORTTK}/bin/whirl2xaif -s -n --debug 1 -o \$@ \$<
3244    
3245  # XAIF -> XAIF'  # XAIF -> XAIF'
3246  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  ad_input_code_sf.pre.s2p.xb.xaif : ad_input_code_sf.pre.s2p.xaif xaif.xsd xaif_base.xsd xaif_inlinable_intrinsics.xsd xaif_derivative_propagator.xsd xaif_output.xsd
3247          ./oadDriver -f -t forward_step -i \$< -c \${XAIFSCHEMAROOT}/schema/examples/inlinable_intrinsics.xaif -o \$@ -I -r          \${XAIFBOOSTERROOT}/xaifBooster/algorithms/BasicBlockPreaccumulationReverse/driver/oadDriver -f -t forward_step -i \$< -c \${XAIFSCHEMAROOT}/schema/examples/inlinable_intrinsics.xaif -o \$@ -I -r
3248    
3249  # XAIF' -> WHIRL'  # XAIF' -> WHIRL'
3250  ad_input_code_sf.w2f.pre.xb.x2w.B : ad_input_code_sf.w2f.pre.xb.xaif xaif2whirl  ad_input_code_sf.pre.s2p.xb.x2w.B : ad_input_code_sf.pre.s2p.xb.xaif
3251          ./xaif2whirl --debug 1 ad_input_code_sf.w2f.pre.B \$<          \${OPENADFORTTK}/bin/xaif2whirl --debug 1 ad_input_code_sf.pre.s2p.B \$<
3252    
3253  # WHIRL' -> F'  # WHIRL' -> F'
3254  ad_input_code_sf.w2f.pre.xb.x2w.w2f.f$FS90: ad_input_code_sf.w2f.pre.xb.x2w.B whirl2f whirl2f_be  ad_input_code_sf.pre.s2p.xb.x2w.w2f.f$FS90: ad_input_code_sf.pre.s2p.xb.x2w.B
3255          ./whirl2f -FLIST:ftn_file=\$@ -openad \$<          \${OPEN64ROOT}/whirl2f/whirl2f -FLIST:ftn_file=\$@ -openad \$<
3256    
3257  # insert template directives  # insert template directives
3258  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  ad_input_code_sf.pre.s2p.xb.x2w.w2f.td.f$FS90: ad_input_code_sf.pre.s2p.xb.x2w.w2f.f$FS90 ../OAD_support/insertTemplateDir.bash
3259          ../OAD_support/insertTemplateDir.bash \$< \$@          ../OAD_support/insertTemplateDir.bash \$< \$@
3260    
3261  PPEXTRAS=\$(wildcard ../OAD_support/ad_template.*.F) ../OAD_support/ad_inline.F  PPEXTRAS=\$(wildcard ../OAD_support/ad_template.*.F) ../OAD_support/ad_inline.F
3262  # postprocess F'  # postprocess F'
3263  postProcess.tag: ad_input_code_sf.w2f.pre.xb.x2w.w2f.td.f$FS90 postProcess.py \$(PPEXTRAS:.F=.f)  postProcess.tag: ad_input_code_sf.pre.s2p.xb.x2w.w2f.td.f$FS90 \$(PPEXTRAS:.F=.f) | w2f__types.f90
3264          # the target is a placeholder to signal execution of the rule          \${OPENADFORTTK_BASE}/tools/SourceProcessing/postProcess.py --progress --timing --infoUnitFile w2f__types.f90 --outputFormat=fixed --separateOutput --pathSuffix "" --filenameSuffix "_oad" -m r -i ../OAD_support/ad_inline.f \$<
3265            # the target is a placeholder to trigger a single execution of the rule
3266          touch \$@          touch \$@
3267          # this step also creates the file postProcess.make but we cannot  # put this so make knows about the postprocessing output
3268          # name it as the target or else make will try to remake it for  OAD_intrinsics_oad.f \$(CB2M_AD_FILES:.f$FS90=_oad.f): postProcess.tag
         # the include directive above for any rule, e.g. make clean  
         ./postProcess.py --progress --timing --infoUnitFile w2f__types.f90 --outputFormat=fixed -m r -i ../OAD_support/ad_inline.f --width 4 \$<  
3269    
3270  # setup some links  # link the XAIF schema files
3271  %.xsd:  %.xsd:
3272          \$(LN) \${XAIFSCHEMAROOT}/schema/\$@ .          \$(LN) \${XAIFSCHEMAROOT}/schema/\$@ .
3273    
 mfef90:  
         \$(LN) \${OPEN64ROOT}/crayf90/sgi/mfef90 .  
   
3274  # link the support files:  # link the support files:
3275  \$(OPENAD_SUPPORT_F90_SRC_FILES) \$(OPENAD_SUPPORT_C_SRC_FILES):  \$(OPENAD_SUPPORT_F90_SRC_FILES) \$(OPENAD_SUPPORT_C_SRC_FILES):
3276          \$(LN) ../OAD_support/\$@ .          \$(LN) ../OAD_support/\$@ .
3277    
3278  whirl2xaif xaif2whirl:  AD_CLEAN += *_mod.h *_mod.F90 *.FF90 *.mod-whirl temp.sed oad_cp.* postProcess.tag \$(PPEXTRAS:.F=.f)
         \$(LN) \${OPENADFORTTK}/bin/\$@ .  
   
 preProcess.py postProcess.py:  
         \$(LN) \${OPENADFORTTK_BASE}/tools/SourceProcessing/\$@ .  
   
 whirl2f whirl2f_be:  
         \$(LN) \${OPEN64ROOT}/whirl2f/\$@ .  
   
 oadDriver:  
         \$(LN) \${XAIFBOOSTERROOT}/xaifBooster/algorithms/BasicBlockPreaccumulationReverse/driver/oadDriver \$@  
   
 AD_CLEAN += *_mod.h *_mod.F90 *.FF90 *.mod-whirl temp.sed oad_cp.* postProcess.make postProcess.tag postProcess.comp \$(PPEXTRAS:.F=.f)  
3279    
3280  # ============ end OpenAD specific section ==============  # ============ end OpenAD specific section ==============
3281    

Legend:
Removed from v.1.231  
changed lines
  Added in v.1.235

  ViewVC Help
Powered by ViewVC 1.1.22