summaryrefslogtreecommitdiffstats
path: root/fortran/config
diff options
context:
space:
mode:
authorQuincey Koziol <koziol@hdfgroup.org>2004-10-12 20:54:23 (GMT)
committerQuincey Koziol <koziol@hdfgroup.org>2004-10-12 20:54:23 (GMT)
commitd5a8be949d99c4acf59e86e3992504b4f96cb07b (patch)
tree6751e9ce33eb02b79ea70a3e10e5b3c072309bce /fortran/config
parent435d8d099ff928bb0646d5ab9658aa77d5ae63e8 (diff)
downloadhdf5-d5a8be949d99c4acf59e86e3992504b4f96cb07b.zip
hdf5-d5a8be949d99c4acf59e86e3992504b4f96cb07b.tar.gz
hdf5-d5a8be949d99c4acf59e86e3992504b4f96cb07b.tar.bz2
[svn-r9411] Purpose:
Bug fix Description: When mpicc/mpif90 is a wrapper around a PGI compiler, turn on less agressive optimization options to avoid testing errors. Platforms tested: Linux 2.4 (verbena) Too minor to require h5committest
Diffstat (limited to 'fortran/config')
-rw-r--r--fortran/config/pgi-fflags8
-rw-r--r--fortran/config/pgi-flags8
2 files changed, 14 insertions, 2 deletions
diff --git a/fortran/config/pgi-fflags b/fortran/config/pgi-fflags
index e617db6..c9b50f3 100644
--- a/fortran/config/pgi-fflags
+++ b/fortran/config/pgi-fflags
@@ -14,6 +14,7 @@
if test X = "X$f9x_flags_set"; then
f9x_version="`$F9X $FFLAGS -V 2>&1 |grep '^pgf90 '`"
if test X != "X$f9x_version"; then
+ is_mpi="`$F9X $FFLAGS -help 2>&1 |grep 'link MPI'`"
f9x_vendor=`echo $f9x_version |sed 's/\([a-z0-9]*\).*/\1/'`
f9x_version=`echo $f9x_version |sed 's/pgf90 \([-a-z0-9\.\-]*\).*/\1/'`
echo "compiler '$F9X' is PGI $f9x_vendor-$f9x_version"
@@ -59,7 +60,12 @@ if test "X-pgf90" = "X-$f9x_vendor"; then
FFLAGS="$FFLAGS -Mdclchk -Mstandard -Minform,warn"
# Production
- PROD_FFLAGS="-fast -s -Mnoframe"
+ # Check for MPI wrapper being used and tweak down compiler options
+ if test "X-" == "X-$is_mpi"; then
+ PROD_FFLAGS="-fast -s -Mnoframe"
+ else
+ PROD_FFLAGS="-O2 -s"
+ fi
# Debug
DEBUG_FFLAGS="-g -Mbounds -Mchkfpstk -Mchkptr"
diff --git a/fortran/config/pgi-flags b/fortran/config/pgi-flags
index 67e3af8..afc5f85 100644
--- a/fortran/config/pgi-flags
+++ b/fortran/config/pgi-flags
@@ -14,6 +14,7 @@
if test X = "X$cc_flags_set"; then
cc_version="`$CC $CFLAGS -V 2>&1 |grep '^pgcc '`"
if test X != "X$cc_version"; then
+ is_mpi="`$CC $CFLAGS -help 2>&1 |grep 'MPI'`"
cc_vendor=`echo $cc_version |sed 's/\([a-z]*\).*/\1/'`
cc_version=`echo $cc_version |sed 's/pgcc \([-a-z0-9\.\-]*\).*/\1/'`
echo "compiler '$CC' is PGI $cc_vendor-$cc_version"
@@ -56,7 +57,12 @@ if test "X-pgcc" = "X-$cc_vendor"; then
CFLAGS="$CFLAGS $arch -Minform,warn"
# Production
- PROD_CFLAGS="-fast -s -Mnoframe"
+ # Check for MPI wrapper being used and tweak down compiler options
+ if test "X-" == "X-$is_mpi"; then
+ PROD_CFLAGS="-fast -s -Mnoframe"
+ else
+ PROD_CFLAGS="-O2 -s"
+ fi
PROD_CPPFLAGS=
# Debug