19 |
-help | --help | -h | --h |
-help | --help | -h | --h |
20 |
Print this help message and exit. |
Print this help message and exit. |
21 |
|
|
22 |
|
-oad | --oad |
23 |
|
Generate a Makefile for an OpenAD built |
24 |
|
|
25 |
-adoptfile NAME | --adoptfile NAME | -adof NAME | --adof NAME |
-adoptfile NAME | --adoptfile NAME | -adof NAME | --adof NAME |
26 |
-adoptfile=NAME | --adoptfile=NAME | -adof=NAME | --adof=NAME |
-adoptfile=NAME | --adoptfile=NAME | -adof=NAME | --adof=NAME |
27 |
Use "NAME" as the adoptfile. By default, the file at |
Use "NAME" as the adoptfile. By default, the file at |
28 |
|
"tools/adjoint_options/adjoint_oad" (for OpenAD built) or |
29 |
"tools/adjoint_options/adjoint_default" will be used. |
"tools/adjoint_options/adjoint_default" will be used. |
30 |
|
|
31 |
-nooptfile | --nooptfile |
-nooptfile | --nooptfile |
1329 |
FS90= |
FS90= |
1330 |
|
|
1331 |
AUTODIFF_PKG_USED=f |
AUTODIFF_PKG_USED=f |
1332 |
|
OPENAD= |
1333 |
AD_OPTFILE= |
AD_OPTFILE= |
1334 |
TAF= |
TAF= |
1335 |
AD_TAF_FLAGS= |
AD_TAF_FLAGS= |
1360 |
gm_s8="HAVE_NETCDF HAVE_SYSTEM HAVE_FDATE HAVE_ETIME HAVE_LAPACK HAVE_FLUSH" |
gm_s8="HAVE_NETCDF HAVE_SYSTEM HAVE_FDATE HAVE_ETIME HAVE_LAPACK HAVE_FLUSH" |
1361 |
|
|
1362 |
# The following are all related to adjoint/tangent-linear stuff |
# The following are all related to adjoint/tangent-linear stuff |
1363 |
gm_s10="AUTODIFF_PKG_USED AD_OPTFILE TAMC TAF AD_TAMC_FLAGS AD_TAF_FLAGS" |
gm_s10="AUTODIFF_PKG_USED AD_OPTFILE OPENAD TAMC TAF AD_TAMC_FLAGS AD_TAF_FLAGS" |
1364 |
gm_s11="FTL_TAMC_FLAGS FTL_TAF_FLAGS SVD_TAMC_FLAGS SVD_TAF_FLAGS" |
gm_s11="FTL_TAMC_FLAGS FTL_TAF_FLAGS SVD_TAMC_FLAGS SVD_TAF_FLAGS" |
1365 |
gm_s12="TAF_EXTRA TAMC_EXTRA DIVA MPIINCLUDEDIR MPI_HEADER_FILES" |
gm_s12="TAF_EXTRA TAMC_EXTRA DIVA MPIINCLUDEDIR MPI_HEADER_FILES" |
1366 |
|
|
1412 |
-optfile=* | --optfile=* | -of=* | --of=*) |
-optfile=* | --optfile=* | -of=* | --of=*) |
1413 |
OPTFILE=$ac_optarg ;; |
OPTFILE=$ac_optarg ;; |
1414 |
|
|
1415 |
|
-oad | --oad) |
1416 |
|
OPENAD="true" ;; |
1417 |
-adoptfile | --adoptfile | -adof | --adof) |
-adoptfile | --adoptfile | -adof | --adof) |
1418 |
ac_prev=AD_OPTFILE ;; |
ac_prev=AD_OPTFILE ;; |
1419 |
-adoptfile=* | --adoptfile=* | -adof=* | --adof=*) |
-adoptfile=* | --adoptfile=* | -adof=* | --adof=*) |
1583 |
|
|
1584 |
done |
done |
1585 |
|
|
1586 |
TMP=./genmk_$$ |
#TMP=./genmk_$$ |
1587 |
#- try to put temporary files in system-local /tmp dir |
#- try to put temporary files in system-local /tmp dir |
1588 |
#TMP=/tmp/genmk_$$ |
TMP=/tmp/genmk_$$ |
1589 |
#touch $TMP ; retVal=$? |
touch $TMP ; retVal=$? |
1590 |
#if [ $retVal -eq 0 ] ; then |
if [ $retVal -eq 0 ] ; then |
1591 |
# if test ! -r $TMP ; then TMP=./genmk_$$ ; fi |
if test ! -r $TMP ; then TMP=./genmk_$$ ; fi |
1592 |
#else |
else |
1593 |
# TMP=./genmk_$$ |
TMP=./genmk_$$ |
1594 |
#fi |
fi |
1595 |
#rm -f $TMP |
rm -f $TMP |
1596 |
##echo " temp files: $TMP.*" |
#echo " temp files: $TMP.*" |
1597 |
|
|
1598 |
printf " getting local config information: " |
printf " getting local config information: " |
1599 |
if test -f $gm_local ; then |
if test -f $gm_local ; then |
1687 |
|
|
1688 |
echo " getting AD_OPTFILE information:" |
echo " getting AD_OPTFILE information:" |
1689 |
if test "x${AD_OPTFILE}" = x ; then |
if test "x${AD_OPTFILE}" = x ; then |
1690 |
if test "x$MITGCM_AD_OF" = x ; then |
if test "x$MITGCM_AD_OF" != x ; then |
1691 |
|
AD_OPTFILE=$MITGCM_AD_OF |
1692 |
|
elif test "x$OPENAD" = x ; then |
1693 |
AD_OPTFILE=$ROOTDIR/tools/adjoint_options/adjoint_default |
AD_OPTFILE=$ROOTDIR/tools/adjoint_options/adjoint_default |
1694 |
else |
else |
1695 |
AD_OPTFILE=$MITGCM_AD_OF |
AD_OPTFILE=$ROOTDIR/tools/adjoint_options/adjoint_oad |
1696 |
fi |
fi |
1697 |
fi |
fi |
1698 |
if test "x${AD_OPTFILE}" != xNONE ; then |
if test "x${AD_OPTFILE}" != xNONE ; then |
2365 |
fi |
fi |
2366 |
fi |
fi |
2367 |
|
|
2368 |
# Check for package RADTRANS: if LAPACK is not available, |
# Make sure the openad package is enabled if using OpenAD |
2369 |
# then issue a warning that the direct radtrans solver is not available. |
if test "x$OPENAD" != x ; then |
2370 |
if test "x$HAVE_LAPACK" != xt ; then |
echo " $PACKAGES " | grep ' openad ' > /dev/null 2>&1 |
|
echo " $PACKAGES " | grep ' radtrans ' > /dev/null 2>&1 |
|
2371 |
RETVAL=$? |
RETVAL=$? |
2372 |
if test "x$RETVAL" = x0 ; then |
if test "x$RETVAL" != x0 ; then |
2373 |
cat <<EOF |
cat <<EOF |
|
********************************************************************* |
|
|
WARNING: the "radtrans" package was enabled but tests failed to |
|
|
compile LAPACK applications. This means that the direct radtrans |
|
|
solver is not available and compilation will fail if it is enabled. |
|
|
If you want to use the direct solver, please check that: |
|
2374 |
|
|
|
1) LAPACK is correctly installed for this compiler and |
|
|
2) the LIBS variable (within the "optfile") specifies the correct |
|
|
LAPACK library to link against. |
|
2375 |
********************************************************************* |
********************************************************************* |
2376 |
|
ERROR: when generating an adjoint with OpenAD, the openad package |
2377 |
|
must be enabled. Please add it to packages.conf. |
2378 |
|
********************************************************************* |
2379 |
|
|
2380 |
EOF |
EOF |
2381 |
|
exit 1 |
2382 |
fi |
fi |
2383 |
fi |
fi |
2384 |
|
|