756 |
print *," HELLO WORLD", wtime |
print *," HELLO WORLD", wtime |
757 |
end |
end |
758 |
EOF |
EOF |
759 |
$FC $FFLAGS -o genmake_tc genmake_tc_2.$FS genmake_tc_1.o >> genmake_warnings 2>&1 |
COMM="$FC $FFLAGS -o genmake_tc genmake_tc_2.$FS genmake_tc_1.o" |
760 |
|
echo $COMM >> genmake_warnings |
761 |
|
$COMM >> genmake_warnings 2>&1 |
762 |
RET_F=$? |
RET_F=$? |
763 |
test -x ./genmake_tc && ./genmake_tc >> genmake_warnings 2>&1 |
test -x ./genmake_tc && ./genmake_tc >> genmake_warnings 2>&1 |
764 |
RETVAL=$? |
RETVAL=$? |
1037 |
INCLUDES="-I. $INCLUDES" |
INCLUDES="-I. $INCLUDES" |
1038 |
FFLAGS= |
FFLAGS= |
1039 |
FOPTIM= |
FOPTIM= |
1040 |
|
FEXTRAFLAGS= |
1041 |
CFLAGS= |
CFLAGS= |
1042 |
KFLAGS1= |
KFLAGS1= |
1043 |
KFLAGS2= |
KFLAGS2= |
1118 |
gm_s2="FC CPP IEEE TS PAPIS PCLS PAPI PCL HPMT GSL DEVEL MPI JAM DUMPSTATE STANDARDDIRS" |
gm_s2="FC CPP IEEE TS PAPIS PCLS PAPI PCL HPMT GSL DEVEL MPI JAM DUMPSTATE STANDARDDIRS" |
1119 |
|
|
1120 |
# The following state is not directly set by command-line switches |
# The following state is not directly set by command-line switches |
1121 |
gm_s3="LN S64 KPP LINK PACKAGES MAKEDEPEND PDEPEND PDEFAULT INCLUDES FFLAGS FOPTIM " |
gm_s3="LN S64 KPP LINK PACKAGES MAKEDEPEND PDEPEND PDEFAULT INCLUDES FFLAGS FOPTIM FEXTRAFLAGS" |
1122 |
gm_s4="CFLAGS KFLAGS1 KFLAGS2 LIBS KPPFILES NOOPTFILES NOOPTFLAGS" |
gm_s4="CFLAGS KFLAGS1 KFLAGS2 LIBS KPPFILES NOOPTFILES NOOPTFLAGS" |
1123 |
gm_s5="TOOLSDIR SOURCEDIRS INCLUDEDIRS PWD MAKE THISHOST THISUSER THISDATE THISVER MACHINE" |
gm_s5="TOOLSDIR SOURCEDIRS INCLUDEDIRS PWD MAKE THISHOST THISUSER THISDATE THISVER MACHINE" |
1124 |
gm_s6="EXECUTABLE EXEHOOK EXEDIR PACKAGES_CONF" |
gm_s6="EXECUTABLE EXEHOOK EXEDIR PACKAGES_CONF" |
1364 |
if test -f ./.genmakerc ; then |
if test -f ./.genmakerc ; then |
1365 |
echo |
echo |
1366 |
echo "WARNING: genmake2 has detected a copy of the old-style \"./.genmakerc\"" |
echo "WARNING: genmake2 has detected a copy of the old-style \"./.genmakerc\"" |
1367 |
echo " file. This file format is no longer supported. Please see:" |
echo " file. This file format is no longer supported. For directions on" |
1368 |
echo |
echo " how to setup and use the new \"genmake2\" script, please see:" |
1369 |
echo " http://mitgcm.org/devel_HOWTO/" |
echo " http://mitgcm.org/devel_HOWTO/" |
1370 |
echo |
echo " and send an email to MITgcm-support@mitgcm.org if you need help." |
1371 |
echo " for directions on how to setup and use the new \"genmake2\" input" |
echo "WARNING: ignore \"./.genmakerc\" and continue." |
|
echo " files and send an email to MITgcm-support@mitgcm.org if you want help." |
|
1372 |
echo |
echo |
1373 |
fi |
fi |
1374 |
|
|
1565 |
else |
else |
1566 |
DEFINES="$DEFINES -DTIME_PER_TIMESTEP" |
DEFINES="$DEFINES -DTIME_PER_TIMESTEP" |
1567 |
fi |
fi |
1568 |
|
PACKAGES="$PACKAGES showflops" |
1569 |
fi |
fi |
1570 |
if test ! "x$PAPIS" = x ; then |
if test ! "x$PAPIS" = x ; then |
1571 |
echo " Turning on PAPI flop summary per timestep" |
echo " Turning on PAPI flop summary per timestep" |
1577 |
fi |
fi |
1578 |
INCLUDES="$INCLUDES $PAPIINC" |
INCLUDES="$INCLUDES $PAPIINC" |
1579 |
LIBS="$LIBS $PAPILIB" |
LIBS="$LIBS $PAPILIB" |
1580 |
|
PACKAGES="$PACKAGES showflops" |
1581 |
fi |
fi |
1582 |
if test ! "x$PCLS" = x ; then |
if test ! "x$PCLS" = x ; then |
1583 |
echo " Turning on PCL counter summary per timestep" |
echo " Turning on PCL counter summary per timestep" |
1589 |
fi |
fi |
1590 |
INCLUDES="$INCLUDES $PCLINC" |
INCLUDES="$INCLUDES $PCLINC" |
1591 |
LIBS="$LIBS $PCLLIB" |
LIBS="$LIBS $PCLLIB" |
1592 |
|
PACKAGES="$PACKAGES showflops" |
1593 |
fi |
fi |
1594 |
if test ! "x$PAPI" = x ; then |
if test ! "x$PAPI" = x ; then |
1595 |
if test ! "x$PAPIS" = x ; then |
if test ! "x$PAPIS" = x ; then |
1969 |
rm -f ./.tmp_pack |
rm -f ./.tmp_pack |
1970 |
echo " packages are: $PACKAGES" |
echo " packages are: $PACKAGES" |
1971 |
|
|
1972 |
# Check availability of NetCDF and then either build the MNC template |
# Check for package MNC: if NetCDF is available, then build the MNC |
1973 |
# files or delete mnc from the list of available packages. |
# template files ; otherwise, delete mnc from the list of packages. |
1974 |
echo $PACKAGES | grep ' mnc ' > /dev/null 2>&1 |
echo $PACKAGES | grep ' mnc ' > /dev/null 2>&1 |
1975 |
RETVAL=$? |
RETVAL=$? |
1976 |
if test "x$RETVAL" = x0 ; then |
if test "x$RETVAL" = x0 ; then |
2004 |
fi |
fi |
2005 |
fi |
fi |
2006 |
|
|
2007 |
|
# Check for package PROFILES: if NetCDF is not available, |
2008 |
|
# then delete profiles from the list of available packages. |
2009 |
|
echo $PACKAGES | grep ' profiles ' > /dev/null 2>&1 |
2010 |
|
RETVAL=$? |
2011 |
|
if test "x$RETVAL" = x0 ; then |
2012 |
|
if test "x$HAVE_NETCDF" != xt ; then |
2013 |
|
cat <<EOF |
2014 |
|
|
2015 |
|
********************************************************************* |
2016 |
|
WARNING: the "profiles" package was enabled but tests failed to |
2017 |
|
compile NetCDF applications. Please check that: |
2018 |
|
|
2019 |
|
1) NetCDF is correctly installed for this compiler and |
2020 |
|
2) the LIBS variable (within the "optfile") specifies the correct |
2021 |
|
NetCDF library to link against. |
2022 |
|
|
2023 |
|
Due to this failure, the "profiles" package is now DISABLED. |
2024 |
|
********************************************************************* |
2025 |
|
|
2026 |
|
EOF |
2027 |
|
PACKAGES=`echo $PACKAGES | sed -e 's/profiles//g'` |
2028 |
|
DISABLE="$DISABLE profiles" |
2029 |
|
fi |
2030 |
|
fi |
2031 |
|
|
2032 |
echo " applying package dependency rules" |
echo " applying package dependency rules" |
2033 |
ck= |
ck= |
2034 |
while test "x$ck" != xtt ; do |
while test "x$ck" != xtt ; do |
2035 |
i=0 |
i=0 |
2036 |
# rtot=${#PNAME[@]} |
# rtot=${#PNAME[@]} |
2037 |
rtot=$nname |
rtot=$nname |
2038 |
while test $i -lt $rtot ; do |
while test $i -le $rtot ; do |
2039 |
|
|
2040 |
# Is $pname in the current $PACKAGES list? |
# Is $pname in the current $PACKAGES list? |
2041 |
# pname=${PNAME[$i]} |
# pname=${PNAME[$i]} |
2069 |
|
|
2070 |
# Do we need to add $dname according to the dependency rules? |
# Do we need to add $dname according to the dependency rules? |
2071 |
if test "x$pin" = xt -a "x$plus" = "x+" -a "x$din" = xf ; then |
if test "x$pin" = xt -a "x$plus" = "x+" -a "x$din" = xf ; then |
2072 |
|
#echo " " $pname ": need to add :" $dname |
2073 |
in_dis="f" |
in_dis="f" |
2074 |
for dis in $DISABLE ; do |
for dis in $DISABLE ; do |
2075 |
if test "x$dis" = "x$dname" ; then |
if test "x$dis" = "x$dname" ; then |
2462 |
KFLAGS1 = ${KFLAGS1} |
KFLAGS1 = ${KFLAGS1} |
2463 |
KFLAGS2 = ${KFLAGS2} |
KFLAGS2 = ${KFLAGS2} |
2464 |
# Optim./debug for FC |
# Optim./debug for FC |
2465 |
FFLAGS = ${FFLAGS} |
FFLAGS = ${FFLAGS} ${FEXTRAFLAGS} |
2466 |
FOPTIM = ${FOPTIM} |
FOPTIM = ${FOPTIM} |
2467 |
# Optim./debug for FC |
# Optim./debug for FC |
2468 |
F90FLAGS = ${F90FLAGS} |
F90FLAGS = ${F90FLAGS} |