Warning, /tools/adjoint_options/adjoint_default is written in an unsupported language. File is not indexed.
view on githubraw file Latest commit b7b61e61 on 2025-03-02 15:55:22 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
0009 if test "x$USE_DIVA" = "x1" ; then
0010 DIVA='true'
0011 DIVA_FLAG="-pure"
0012 if test "x$MPI" != x ; then
0013 SHOW_MPI_TO_TAF=1
0014 fi
0015 else
0016 DIVA_FLAG=
0017 fi
0f20d21780 Ed H*0018
3924ebfa1b Mart*0019 AD_TAF_FLAGS="-reverse $DIVA_FLAG -l taf_ad.log $AD_TAF_FLAGS"
0020 FTL_TAF_FLAGS="-forward -l taf_ftl.log $FTL_TAF_FLAGS"
0021 SVD_TAF_FLAGS="-reverse -forward -pure -l taf_svd.log $SVD_TAF_FLAGS"
0022
ea893758ea Patr*0023 # TAF_COMMON_FLAGS is a local variable used for abbreviation
3924ebfa1b Mart*0024 TAF_COMMON_FLAGS="-i4 -r4 -intrinsic system,flush"
0025
0026 if test "x$TAMC_COMPATIBILITY_MODE" = "x1" ; then
0027 TAF_COMMON_FLAGS="-v1 -nonew_arg $TAF_COMMON_FLAGS"
0028 fi
0029
0030 if test "x$USE_EXTENDED_SRC" = "xt"; then
5b53130725 Ivan*0031 TAF_F77_FLAGS="$TAF_F77_FLAGS -e"
3924ebfa1b Mart*0032 fi
4345362f84 Jean*0033
6d7b0906cb Ivan*0034 #- select which Fortran version to specify to TAF
0035 if test "x$TAF_FORTRAN_VERS" = x ; then
0036 if test "x$ALWAYS_USE_F90" = "x1" ; then
0037 TAF_FORTRAN_VERS='F90' ;
0038 else
0039 TAF_FORTRAN_VERS='F77' ;
0040 fi
0041 fi
0042
3924ebfa1b Mart*0043 if test $TAF_FORTRAN_VERS = 'F77' ; then
0044 TAF_COMMON_FLAGS="-f77 $TAF_COMMON_FLAGS"
0045 elif test $TAF_FORTRAN_VERS = 'F90' ; then
0046 TAF_COMMON_FLAGS="-f90 $TAF_COMMON_FLAGS"
6d7b0906cb Ivan*0047 elif test $TAF_FORTRAN_VERS = 'F08' ; then
0048 TAF_COMMON_FLAGS="-f08 $TAF_COMMON_FLAGS"
b98e18de67 Jean*0049 else
3924ebfa1b Mart*0050 #- after Jan 14, 2016, TAF default is "-f95"
0051 TAF_COMMON_FLAGS="-f95 $TAF_COMMON_FLAGS"
0052 TAF_COMPILER=-f95
b98e18de67 Jean*0053 fi
0054
3924ebfa1b Mart*0055 #- Instead of using staf default server (SERVER1, currently fastopt.de),
0056 # one can either specify which server to use by setting TAF_SERVER in
0057 # genmake_local (e.g. TAF_SERVER=fastopt.net) or by changing the staf default
0058 # server (e.g., in staf version 4.0, changing line 188
0059 # from SERVER=${SERVER1} to SERVER=${SERVER2} )
0060 if test "x$TAF_SERVER" != x ; then
0061 TAF_COMMON_FLAGS="-server $TAF_SERVER $TAF_COMMON_FLAGS"
0062 fi
c82e58ec74 Ed H*0063
ec0d98bc13 Jean*0064 #- in case we need to show some MPI code to TAF:
3924ebfa1b Mart*0065 if test "x$SHOW_MPI_TO_TAF" = "x1" -a "x$MPI" != x ; then
0066 MPI_TAF_OPTIONS='-mpi -include $(LOCAL_MPI_HEADERS) -I./mpi_headers'
0067 else
0068 MPI_TAF_OPTIONS=
0069 fi
de546f5d05 Jean*0070
3924ebfa1b Mart*0071 if test "x$USE_SVD" = "x1" ; then
0072 TAF_FC=objf_state_final
0073 LIBS="${LIBS} -larpack"
0074 else
0075 TAF_FC=fc
0076 fi
0077 DIFF_FLAGS="-toplevel 'the_main_loop' \
0078 -input 'xx_obcsn_dummy \
0079 xx_obcss_dummy \
0080 xx_obcsw_dummy \
0081 xx_obcse_dummy \
0082 xx_genarr2d_dummy \
0083 xx_genarr3d_dummy \
0084 xx_gentim2d_dummy'\
0085 -output '$TAF_FC'"
c82e58ec74 Ed H*0086
3924ebfa1b Mart*0087 AD_TAF_FLAGS="$TAF_COMMON_FLAGS $AD_TAF_FLAGS $MPI_TAF_OPTIONS $DIFF_FLAGS"
c82e58ec74 Ed H*0088
3924ebfa1b Mart*0089 FTL_TAF_FLAGS="$TAF_COMMON_FLAGS $FTL_TAF_FLAGS $MPI_TAF_OPTIONS $DIFF_FLAGS"
c82e58ec74 Ed H*0090
3924ebfa1b Mart*0091 SVD_TAF_FLAGS="$TAF_COMMON_FLAGS $SVD_TAF_FLAGS $MPI_TAF_OPTIONS $DIFF_FLAGS"