From 8a4dc356845d27dfccceab24d42aca517bfe5042 Mon Sep 17 00:00:00 2001 From: Erik Lindahl Date: Wed, 5 Aug 2015 17:57:08 +0200 Subject: [PATCH] Fix PGI compiler flag Work around compiler crashes by removing inter-procedural analysis. Removed the extra -fastsse option which is identical to the -fast option already added for release build types. Updated the warning about not recommending PGI for now. Change-Id: I0a43e19f3035a44330d8d32bb557639357100aa8 --- cmake/gmxCFlags.cmake | 7 ++++--- cmake/gmxTestCompilerProblems.cmake | 2 +- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/cmake/gmxCFlags.cmake b/cmake/gmxCFlags.cmake index 3e8644e843..e70bb5927a 100644 --- a/cmake/gmxCFlags.cmake +++ b/cmake/gmxCFlags.cmake @@ -239,12 +239,13 @@ MACRO(gmx_c_flags) endif() endif() - # pgi + # PGI + # Inter-procedural analysis causes pgcc/pgc++ to crash when linking the library with PGI release 15.7. if (CMAKE_C_COMPILER_ID MATCHES "PGI") - GMX_TEST_CFLAG(CFLAGS_OPT "-fastsse" GMXC_CFLAGS_RELEASE) + GMX_TEST_CFLAG(CFLAGS_OPT "-Mnoipa" GMXC_CFLAGS_RELEASE) endif() if (CMAKE_CXX_COMPILER_ID MATCHES "PGI") - GMX_TEST_CXXFLAG(CXXFLAGS_OPT "-fastsse" GMXC_CXXFLAGS_RELEASE) + GMX_TEST_CXXFLAG(CXXFLAGS_OPT "-Mnoipa" GMXC_CXXFLAGS_RELEASE) endif() # Pathscale diff --git a/cmake/gmxTestCompilerProblems.cmake b/cmake/gmxTestCompilerProblems.cmake index 223a1eb642..48580c3c77 100644 --- a/cmake/gmxTestCompilerProblems.cmake +++ b/cmake/gmxTestCompilerProblems.cmake @@ -77,7 +77,7 @@ macro(gmx_test_compiler_problems) endif() if (CMAKE_C_COMPILER_ID STREQUAL "PGI") - message(WARNING "All tested PGI compiler versions (up to 12.9.0) generate binaries which produce incorrect results, or even fail to compile GROMACS. Highly recommended to use a different compiler. If you choose to use PGI, make sure to run the regressiontests.") + message(WARNING "Currently tested PGI compiler versions (up to 15.7) generate binaries that do not pass all regression test, and the generated binaries are significantly slower than with GCC, ICC or Clang. For now we do not recommend PGI beyond development testing - make sure to run the regressiontests.") endif() if(CMAKE_COMPILER_IS_GNUCC AND -- 2.11.4.GIT