537 |
|
|
538 |
-ts | --ts |
-ts | --ts |
539 |
Produce timing information per timestep |
Produce timing information per timestep |
540 |
|
-papis | --papis |
541 |
|
Produce summary MFlop/s with PAPI per timestep |
542 |
|
-foolad | --foolad |
543 |
|
Fool the AD code generator |
544 |
|
-papi | --papi |
545 |
|
Performance analysis with PAPI |
546 |
|
-hpmt | --hpmt |
547 |
|
Performance analysis with the HPM Toolkit |
548 |
|
|
549 |
|
-gsl | --gsl |
550 |
|
Use GSL to control floating point rounding and precision |
551 |
|
|
552 |
-mpi | --mpi |
-mpi | --mpi |
553 |
Include MPI header files and link to MPI libraries |
Include MPI header files and link to MPI libraries |
729 |
|
|
730 |
void FC_NAMEMANGLE(sigreg) (int * aip) |
void FC_NAMEMANGLE(sigreg) (int * aip) |
731 |
{ |
{ |
|
ip = aip; |
|
732 |
struct sigaction s; |
struct sigaction s; |
733 |
|
ip = aip; |
734 |
s.sa_flags = SA_SIGINFO; |
s.sa_flags = SA_SIGINFO; |
735 |
s.sa_sigaction = (void *)killhandler; |
s.sa_sigaction = (void *)killhandler; |
736 |
if(sigaction (SIGTERM,&s,(struct sigaction *)NULL)) { |
if(sigaction (SIGTERM,&s,(struct sigaction *)NULL)) { |
961 |
MPI= |
MPI= |
962 |
MPIPATH= |
MPIPATH= |
963 |
TS= |
TS= |
964 |
|
PAPIS= |
965 |
|
FOOLAD= |
966 |
|
PAPI= |
967 |
|
HPMT= |
968 |
|
GSL= |
969 |
HAVE_TEST_L= |
HAVE_TEST_L= |
970 |
|
|
971 |
# DEFINES checked by test compilation or command-line |
# DEFINES checked by test compilation or command-line |
1023 |
|
|
1024 |
# The following state can be set directly by command-line switches |
# The following state can be set directly by command-line switches |
1025 |
gm_s1="OPTFILE PDEPEND PDEFAULT MAKEFILE PLATFORM ROOTDIR MODS DISABLE ENABLE" |
gm_s1="OPTFILE PDEPEND PDEFAULT MAKEFILE PLATFORM ROOTDIR MODS DISABLE ENABLE" |
1026 |
gm_s2="FC CPP IEEE TS MPI JAM DUMPSTATE STANDARDDIRS" |
gm_s2="FC CPP IEEE TS PAPIS PAPI HPMT GSL MPI JAM DUMPSTATE STANDARDDIRS" |
1027 |
|
|
1028 |
# The following state is not directly set by command-line switches |
# The following state is not directly set by command-line switches |
1029 |
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 " |
1205 |
|
|
1206 |
-ts | --ts) |
-ts | --ts) |
1207 |
TS=true ;; |
TS=true ;; |
1208 |
|
-papis | --papis) |
1209 |
|
PAPIS=true ;; |
1210 |
|
-foolad | --foolad) |
1211 |
|
FOOLAD=true ;; |
1212 |
|
-papi | --papi) |
1213 |
|
PAPI=true ;; |
1214 |
|
-hpmt | --hpmt) |
1215 |
|
HPMT=true ;; |
1216 |
|
|
1217 |
|
-gsl | --gsl) |
1218 |
|
GSL=true ;; |
1219 |
|
|
1220 |
-mpi | --mpi) |
-mpi | --mpi) |
1221 |
MPI=true ;; |
MPI=true ;; |
1459 |
|
|
1460 |
if test ! "x$TS" = x ; then |
if test ! "x$TS" = x ; then |
1461 |
echo " Turning on timing per timestep" |
echo " Turning on timing per timestep" |
1462 |
DEFINES="$DEFINES -DTIME_PER_TIMESTEP" |
if test ! "x$FOOLAD" = x ; then |
1463 |
|
DEFINES="$DEFINES -DTIME_PER_TIMESTEP_SFP" |
1464 |
|
else |
1465 |
|
DEFINES="$DEFINES -DTIME_PER_TIMESTEP" |
1466 |
|
fi |
1467 |
|
fi |
1468 |
|
if test ! "x$PAPIS" = x ; then |
1469 |
|
echo " Turning on PAPI flop summary per timestep" |
1470 |
|
echo " Please make sure PAPIINC, PAPILIB are defined" |
1471 |
|
if test ! "x$FOOLAD" = x ; then |
1472 |
|
DEFINES="$DEFINES -DUSE_PAPI_FLOPS_SFP" |
1473 |
|
else |
1474 |
|
DEFINES="$DEFINES -DUSE_PAPI_FLOPS" |
1475 |
|
fi |
1476 |
|
INCLUDES="$INCLUDES $PAPIINC" |
1477 |
|
LIBS="$LIBS $PAPILIB" |
1478 |
|
fi |
1479 |
|
if test ! "x$PAPI" = x ; then |
1480 |
|
if test ! "x$PAPIS" = x ; then |
1481 |
|
echo " PAPI performance analysis and flop summary per timestep cannot co-exist!" |
1482 |
|
echo " Sticking with PAPI flop summary per timestep!" |
1483 |
|
else |
1484 |
|
echo " Turning on performance analysis with PAPI" |
1485 |
|
echo " Please make sure PAPIINC, PAPILIB are defined" |
1486 |
|
DEFINES="$DEFINES -DUSE_PAPI" |
1487 |
|
INCLUDES="$INCLUDES $PAPIINC" |
1488 |
|
LIBS="$LIBS $PAPILIB" |
1489 |
|
fi |
1490 |
|
fi |
1491 |
|
if test ! "x$HPMT" = x ; then |
1492 |
|
if test ! "x$PAPI" = x ; then |
1493 |
|
echo " PAPI and the HPM Toolkit cannot co-exist!" |
1494 |
|
echo " Sticking with PAPI!" |
1495 |
|
else |
1496 |
|
echo " Turning on performance analysis with the HPM Toolkit" |
1497 |
|
echo " Please make sure HPMTINC, HPMTLIB are defined" |
1498 |
|
DEFINES="$DEFINES -DUSE_LIBHPM" |
1499 |
|
INCLUDES="$INCLUDES $HPMTINC" |
1500 |
|
LIBS="$LIBS $HPMTLIB" |
1501 |
|
fi |
1502 |
|
fi |
1503 |
|
if test ! "x$GSL" = x ; then |
1504 |
|
echo " Turning on use of GSL to control floating point calculations" |
1505 |
|
echo " Please make sure GSLINC, GSLLIB are defined" |
1506 |
|
DEFINES="$DEFINES -DUSE_GSL_IEEE" |
1507 |
|
INCLUDES="$INCLUDES $GSLINC" |
1508 |
|
LIBS="$LIBS $GSLLIB" |
1509 |
fi |
fi |
1510 |
|
|
1511 |
printf "\n=== Checking system libraries ===\n" |
printf "\n=== Checking system libraries ===\n" |
2066 |
fi |
fi |
2067 |
done |
done |
2068 |
|
|
2069 |
|
if test ! "x$DIVA" = x ; then |
2070 |
|
echo " Creating the pseudo-MPI include directory" |
2071 |
|
INCLUDES="-I./mpi_headers $INCLUDES" |
2072 |
|
rm -rf ./mpi_headers |
2073 |
|
mkdir -p ./mpi_headers |
2074 |
|
|
2075 |
|
if test "x$MPIINCLUDEDIR" = x ; then |
2076 |
|
if test "x$MPIHOME" = x ; then |
2077 |
|
MPIHOME='/usr' |
2078 |
|
fi |
2079 |
|
MPIINCLUDEDIR='$MPIHOME/include' |
2080 |
|
fi |
2081 |
|
|
2082 |
|
if test -r $MPIINCLUDEDIR/mpif.h ; then |
2083 |
|
for i in $MPI_HEADER_FILES; do |
2084 |
|
cp -p $MPIINCLUDEDIR/$i ./mpi_headers |
2085 |
|
done |
2086 |
|
|
2087 |
|
perl -i -pe 's/MPI_DISPLACEMENT_CURRENT=-1_8/MPI_DISPLACEMENT_CURRENT=-1/g' mpi_headers/mpif.h |
2088 |
|
else |
2089 |
|
echo " We cannot create a copy of mpif.h!" |
2090 |
|
exit -1 |
2091 |
|
fi |
2092 |
|
fi |
2093 |
|
|
2094 |
echo " Determining the list of source and include files" |
echo " Determining the list of source and include files" |
2095 |
rm -rf .links.tmp |
rm -rf .links.tmp |
2096 |
mkdir .links.tmp |
mkdir .links.tmp |
2374 |
.$FS90.o: |
.$FS90.o: |
2375 |
\$(F90C) \$(F90FLAGS) \$(F90OPTIM) -c \$< |
\$(F90C) \$(F90FLAGS) \$(F90OPTIM) -c \$< |
2376 |
.c.o: |
.c.o: |
2377 |
\$(CC) \$(CFLAGS) -c \$< |
\$(CC) \$(CFLAGS) \$(DEFINES) \$(INCLUDES) -c \$< |
2378 |
|
|
2379 |
# Special exceptions that use the ( .F - .p - .$FS - .o ) rule-chain |
# Special exceptions that use the ( .F - .p - .$FS - .o ) rule-chain |
2380 |
.F.p: |
.F.p: |