Warning, /tools/adjoint_options/adjoint_default is written in an unsupported language. File is not indexed.
view on githubraw file Latest commit ea893758 on 2024-08-17 21:25:09 UTC
c82e58ec74 Ed H*0001 #!/bin/bash
0002 #
a15b6fbc2c Jean*0003 # This AD option-file contains the default settings for the adjoint
0004 # and tangent-linear compilers. If you need to change these settings,
c82e58ec74 Ed H*0005 # please make a separate (local) copy of this file.
0006
a007869b2a Patr*0007 TAF=staf
3924ebfa1b Mart*0008 TAMC=stamc
0009
0010 if test "x$USE_DIVA" = "x1" ; then
0011 DIVA='true'
0012 DIVA_FLAG="-pure"
0013 if test "x$MPI" != x ; then
0014 SHOW_MPI_TO_TAF=1
0015 fi
0016 else
0017 DIVA_FLAG=
0018 fi
0f20d21780 Ed H*0019
632445003e Jean*0020 AD_TAMC_FLAGS="-reverse -admark ad -i4 -r4 -l tamc_ad.log $AD_TAMC_FLAGS"
0021 FTL_TAMC_FLAGS="-forward -ftlmark g_ -i4 -r4 -l tamc_ftl.log $FTL_TAMC_FLAGS"
0022 SVD_TAMC_FLAGS="-reverse -forward -pure -i4 -r4 -l tamc_svd.log $SVD_TAMC_FLAGS"
de546f5d05 Jean*0023
3924ebfa1b Mart*0024 AD_TAF_FLAGS="-reverse $DIVA_FLAG -l taf_ad.log $AD_TAF_FLAGS"
0025 FTL_TAF_FLAGS="-forward -l taf_ftl.log $FTL_TAF_FLAGS"
0026 SVD_TAF_FLAGS="-reverse -forward -pure -l taf_svd.log $SVD_TAF_FLAGS"
0027
ea893758ea Patr*0028 # TAF_COMMON_FLAGS is a local variable used for abbreviation
3924ebfa1b Mart*0029 TAF_COMMON_FLAGS="-i4 -r4 -intrinsic system,flush"
0030
0031 if test "x$TAMC_COMPATIBILITY_MODE" = "x1" ; then
0032 TAF_COMMON_FLAGS="-v1 -nonew_arg $TAF_COMMON_FLAGS"
0033 fi
0034
0035 if test "x$USE_EXTENDED_SRC" = "xt"; then
0036 TAF_COMMON_FLAGS="-e $TAF_COMMON_FLAGS"
0037 fi
4345362f84 Jean*0038
6d7b0906cb Ivan*0039 #- select which Fortran version to specify to TAF
0040 if test "x$TAF_FORTRAN_VERS" = x ; then
0041 if test "x$ALWAYS_USE_F90" = "x1" ; then
0042 TAF_FORTRAN_VERS='F90' ;
0043 else
0044 TAF_FORTRAN_VERS='F77' ;
0045 fi
0046 fi
0047
3924ebfa1b Mart*0048 if test $TAF_FORTRAN_VERS = 'F77' ; then
0049 TAF_COMMON_FLAGS="-f77 $TAF_COMMON_FLAGS"
0050 elif test $TAF_FORTRAN_VERS = 'F90' ; then
0051 TAF_COMMON_FLAGS="-f90 $TAF_COMMON_FLAGS"
6d7b0906cb Ivan*0052 elif test $TAF_FORTRAN_VERS = 'F08' ; then
0053 TAF_COMMON_FLAGS="-f08 $TAF_COMMON_FLAGS"
b98e18de67 Jean*0054 else
3924ebfa1b Mart*0055 #- after Jan 14, 2016, TAF default is "-f95"
0056 TAF_COMMON_FLAGS="-f95 $TAF_COMMON_FLAGS"
0057 TAF_COMPILER=-f95
b98e18de67 Jean*0058 fi
0059
3924ebfa1b Mart*0060 #- Instead of using staf default server (SERVER1, currently fastopt.de),
0061 # one can either specify which server to use by setting TAF_SERVER in
0062 # genmake_local (e.g. TAF_SERVER=fastopt.net) or by changing the staf default
0063 # server (e.g., in staf version 4.0, changing line 188
0064 # from SERVER=${SERVER1} to SERVER=${SERVER2} )
0065 if test "x$TAF_SERVER" != x ; then
0066 TAF_COMMON_FLAGS="-server $TAF_SERVER $TAF_COMMON_FLAGS"
0067 fi
c82e58ec74 Ed H*0068
ec0d98bc13 Jean*0069 #- in case we need to show some MPI code to TAF:
3924ebfa1b Mart*0070 if test "x$SHOW_MPI_TO_TAF" = "x1" -a "x$MPI" != x ; then
0071 MPI_TAF_OPTIONS='-mpi -include $(LOCAL_MPI_HEADERS) -I./mpi_headers'
0072 else
0073 MPI_TAF_OPTIONS=
0074 fi
de546f5d05 Jean*0075
3924ebfa1b Mart*0076 if test "x$USE_SVD" = "x1" ; then
0077 TAF_FC=objf_state_final
0078 LIBS="${LIBS} -larpack"
0079 else
0080 TAF_FC=fc
0081 fi
0082 DIFF_FLAGS="-toplevel 'the_main_loop' \
0083 -input 'xx_obcsn_dummy \
0084 xx_obcss_dummy \
0085 xx_obcsw_dummy \
0086 xx_obcse_dummy \
0087 xx_genarr2d_dummy \
0088 xx_genarr3d_dummy \
0089 xx_gentim2d_dummy'\
0090 -output '$TAF_FC'"
c82e58ec74 Ed H*0091
0092 AD_TAMC_FLAGS="$AD_TAMC_FLAGS $DIFF_FLAGS"
3924ebfa1b Mart*0093 AD_TAF_FLAGS="$TAF_COMMON_FLAGS $AD_TAF_FLAGS $MPI_TAF_OPTIONS $DIFF_FLAGS"
c82e58ec74 Ed H*0094
0095 FTL_TAMC_FLAGS="$FTL_TAMC_FLAGS $DIFF_FLAGS"
3924ebfa1b Mart*0096 FTL_TAF_FLAGS="$TAF_COMMON_FLAGS $FTL_TAF_FLAGS $MPI_TAF_OPTIONS $DIFF_FLAGS"
c82e58ec74 Ed H*0097
0098 SVD_TAMC_FLAGS="$SVD_TAMC_FLAGS $DIFF_FLAGS"
3924ebfa1b Mart*0099 SVD_TAF_FLAGS="$TAF_COMMON_FLAGS $SVD_TAF_FLAGS $MPI_TAF_OPTIONS $DIFF_FLAGS"