13 |
test_for_package_in_cpp_options() { |
test_for_package_in_cpp_options() { |
14 |
cpp_options=$1 |
cpp_options=$1 |
15 |
pkg=$2 |
pkg=$2 |
16 |
test_for_string_in_file $cpp_options "^[ ]*#define.*ALLOW_$pkg" || exit 99 |
test_for_string_in_file $cpp_options "^[ ]*#define.*ALLOW_$pkg[ ]" |
17 |
test_for_string_in_file $cpp_options "^[ ]*#undef.*ALLOW_$pkg" || exit 99 |
test_for_string_in_file $cpp_options "^[ ]*#undef.*ALLOW_$pkg[ ]" |
18 |
test_for_string_in_file $cpp_options "^[ ]*#define.*DISABLE_$pkg" || exit 99 |
test_for_string_in_file $cpp_options "^[ ]*#define.*DISABLE_$pkg[ ]" |
19 |
test_for_string_in_file $cpp_options "^[ ]*#undef.*DISABLE_$pkg" || exit 99 |
test_for_string_in_file $cpp_options "^[ ]*#undef.*DISABLE_$pkg[ ]" |
20 |
|
test_for_string_in_file $cpp_options "^[ ]*#define.*ALLOW_$pkg$" |
21 |
|
test_for_string_in_file $cpp_options "^[ ]*#undef.*ALLOW_$pkg$" |
22 |
|
test_for_string_in_file $cpp_options "^[ ]*#define.*DISABLE_$pkg$" |
23 |
|
test_for_string_in_file $cpp_options "^[ ]*#undef.*DISABLE_$pkg$" |
24 |
} |
} |
25 |
|
|
26 |
# Search for particular CPP #cmds associated with MPI |
# Search for particular CPP #cmds associated with MPI |
27 |
# usage: test_for_mpi_in_cpp_eeoptions CPP_file |
# usage: test_for_mpi_in_cpp_eeoptions CPP_file |
28 |
test_for_mpi_in_cpp_eeoptions() { |
test_for_mpi_in_cpp_eeoptions() { |
29 |
cpp_options=$1 |
cpp_options=$1 |
30 |
test_for_string_in_file $cpp_options "^[ ]*#define.*ALLOW_USE_MPI" || exit 99 |
test_for_string_in_file $cpp_options "^[ ]*#define.*ALLOW_USE_MPI[ ]" |
31 |
test_for_string_in_file $cpp_options "^[ ]*#undef.*ALLOW_USE_MPI" || exit 99 |
test_for_string_in_file $cpp_options "^[ ]*#undef.*ALLOW_USE_MPI[ ]" |
32 |
test_for_string_in_file $cpp_options "^[ ]*#define.*ALWAYS_USE_MPI" || exit 99 |
test_for_string_in_file $cpp_options "^[ ]*#define.*ALWAYS_USE_MPI[ ]" |
33 |
test_for_string_in_file $cpp_options "^[ ]*#undef.*ALWAYS_USE_MPI" || exit 99 |
test_for_string_in_file $cpp_options "^[ ]*#undef.*ALWAYS_USE_MPI[ ]" |
34 |
|
test_for_string_in_file $cpp_options "^[ ]*#define.*ALLOW_USE_MPI$" |
35 |
|
test_for_string_in_file $cpp_options "^[ ]*#undef.*ALLOW_USE_MPI$" |
36 |
|
test_for_string_in_file $cpp_options "^[ ]*#define.*ALWAYS_USE_MPI$" |
37 |
|
test_for_string_in_file $cpp_options "^[ ]*#undef.*ALWAYS_USE_MPI$" |
38 |
} |
} |
39 |
|
|
40 |
# Search for particular string in a file. Return 1 if detected, 0 if not |
# Search for particular string in a file. Return 1 if detected, 0 if not |
47 |
if test "x${RETVAL}" = x0 ; then |
if test "x${RETVAL}" = x0 ; then |
48 |
printf "Error: In $file there is an illegal line: " |
printf "Error: In $file there is an illegal line: " |
49 |
grep -i "$strng" $file |
grep -i "$strng" $file |
50 |
return 1 |
exit 99 |
51 |
fi |
fi |
52 |
return 0 |
return 0 |
53 |
} |
} |
587 |
-ts | --ts |
-ts | --ts |
588 |
Produce timing information per timestep |
Produce timing information per timestep |
589 |
-papis | --papis |
-papis | --papis |
590 |
Produce summary MFlop/s with PAPI per timestep |
Produce summary MFlop/s (and IPC) with PAPI per timestep |
591 |
|
-pcls | --pcls |
592 |
|
Produce summary MFlop/s etc. with PCL per timestep |
593 |
-foolad | --foolad |
-foolad | --foolad |
594 |
Fool the AD code generator |
Fool the AD code generator |
595 |
-papi | --papi |
-papi | --papi |
596 |
Performance analysis with PAPI |
Performance analysis with PAPI |
597 |
|
-pcl | --pcl |
598 |
|
Performance analysis with PCL |
599 |
-hpmt | --hpmt |
-hpmt | --hpmt |
600 |
Performance analysis with the HPM Toolkit |
Performance analysis with the HPM Toolkit |
601 |
|
|
1020 |
MPIPATH= |
MPIPATH= |
1021 |
TS= |
TS= |
1022 |
PAPIS= |
PAPIS= |
1023 |
|
PCLS= |
1024 |
FOOLAD= |
FOOLAD= |
1025 |
PAPI= |
PAPI= |
1026 |
|
PCL= |
1027 |
HPMT= |
HPMT= |
1028 |
GSL= |
GSL= |
1029 |
HAVE_TEST_L= |
HAVE_TEST_L= |
1084 |
|
|
1085 |
# The following state can be set directly by command-line switches |
# The following state can be set directly by command-line switches |
1086 |
gm_s1="OPTFILE PDEPEND PDEFAULT MAKEFILE PLATFORM ROOTDIR MODS DISABLE ENABLE" |
gm_s1="OPTFILE PDEPEND PDEFAULT MAKEFILE PLATFORM ROOTDIR MODS DISABLE ENABLE" |
1087 |
gm_s2="FC CPP IEEE TS PAPIS PAPI HPMT GSL MPI JAM DUMPSTATE STANDARDDIRS" |
gm_s2="FC CPP IEEE TS PAPIS PCLS PAPI PCL HPMT GSL MPI JAM DUMPSTATE STANDARDDIRS" |
1088 |
|
|
1089 |
# The following state is not directly set by command-line switches |
# The following state is not directly set by command-line switches |
1090 |
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 " |
1268 |
TS=true ;; |
TS=true ;; |
1269 |
-papis | --papis) |
-papis | --papis) |
1270 |
PAPIS=true ;; |
PAPIS=true ;; |
1271 |
|
-pcls | --pcls) |
1272 |
|
PCLS=true ;; |
1273 |
-foolad | --foolad) |
-foolad | --foolad) |
1274 |
FOOLAD=true ;; |
FOOLAD=true ;; |
1275 |
-papi | --papi) |
-papi | --papi) |
1276 |
PAPI=true ;; |
PAPI=true ;; |
1277 |
|
-pcl | --pcl) |
1278 |
|
PCL=true ;; |
1279 |
-hpmt | --hpmt) |
-hpmt | --hpmt) |
1280 |
HPMT=true ;; |
HPMT=true ;; |
1281 |
|
|
1544 |
INCLUDES="$INCLUDES $PAPIINC" |
INCLUDES="$INCLUDES $PAPIINC" |
1545 |
LIBS="$LIBS $PAPILIB" |
LIBS="$LIBS $PAPILIB" |
1546 |
fi |
fi |
1547 |
|
if test ! "x$PCLS" = x ; then |
1548 |
|
echo " Turning on PCL counter summary per timestep" |
1549 |
|
echo " Please make sure PCLINC, PCLLIB are defined" |
1550 |
|
if test ! "x$FOOLAD" = x ; then |
1551 |
|
DEFINES="$DEFINES -DUSE_PCL_FLOPS_SFP" |
1552 |
|
else |
1553 |
|
DEFINES="$DEFINES -DUSE_PCL_FLOPS" |
1554 |
|
fi |
1555 |
|
INCLUDES="$INCLUDES $PCLINC" |
1556 |
|
LIBS="$LIBS $PCLLIB" |
1557 |
|
fi |
1558 |
if test ! "x$PAPI" = x ; then |
if test ! "x$PAPI" = x ; then |
1559 |
if test ! "x$PAPIS" = x ; then |
if test ! "x$PAPIS" = x ; then |
1560 |
echo " PAPI performance analysis and flop summary per timestep cannot co-exist!" |
echo " PAPI performance analysis and flop summary per timestep cannot co-exist!" |
1567 |
LIBS="$LIBS $PAPILIB" |
LIBS="$LIBS $PAPILIB" |
1568 |
fi |
fi |
1569 |
fi |
fi |
1570 |
|
if test ! "x$PCL" = x ; then |
1571 |
|
if test ! "x$PCLS" = x ; then |
1572 |
|
echo " PCL performance analysis and flop summary per timestep cannot co-exist!" |
1573 |
|
echo " Sticking with PCL flop summary per timestep!" |
1574 |
|
else |
1575 |
|
echo " Turning on performance analysis with PCL" |
1576 |
|
echo " Please make sure PCLINC, PCLLIB are defined" |
1577 |
|
DEFINES="$DEFINES -DUSE_PCL" |
1578 |
|
INCLUDES="$INCLUDES $PCLINC" |
1579 |
|
LIBS="$LIBS $PCLLIB" |
1580 |
|
fi |
1581 |
|
fi |
1582 |
if test ! "x$HPMT" = x ; then |
if test ! "x$HPMT" = x ; then |
1583 |
if test ! "x$PAPI" = x ; then |
if test ! "x$PAPI" = x ; then |
1584 |
echo " PAPI and the HPM Toolkit cannot co-exist!" |
echo " PAPI and the HPM Toolkit cannot co-exist!" |
1585 |
echo " Sticking with PAPI!" |
echo " Sticking with PAPI!" |
1586 |
|
else if test ! "x$PCL" = x ; then |
1587 |
|
echo " PCL and the HPM Toolkit cannot co-exist!" |
1588 |
|
echo " Sticking with PCL!" |
1589 |
else |
else |
1590 |
echo " Turning on performance analysis with the HPM Toolkit" |
echo " Turning on performance analysis with the HPM Toolkit" |
1591 |
echo " Please make sure HPMTINC, HPMTLIB are defined" |
echo " Please make sure HPMTINC, HPMTLIB are defined" |