From 5099eeb6f605f68d8442ea1c69c85e24576cd150 Mon Sep 17 00:00:00 2001 From: Roland Schulz Date: Thu, 15 Sep 2016 18:14:49 -0700 Subject: [PATCH] Better optimized ICC release flags Add those flags included in -fast which both helps performance and are appropriate for GROMACS. The flags included in -fast for Linux we weren't using were: -ipo, -no-prec-div, -static, -fimf-domain-exclusion=15 Full static depends on static libraries to be installed and thus will not always work. IPO increases compile time by a huge factor. We do require that extreme values (e.g. large negative arguments to exp and large positive to erfc) are computed correctly. This leaves -no-prec-div -fimf-domain-exclusion=14 -static-intel as safe and useful flags for GROMACS. Change-Id: Ifbee69431841e3051c95f0b4c0ad204aac965c4e --- cmake/gmxCFlags.cmake | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/cmake/gmxCFlags.cmake b/cmake/gmxCFlags.cmake index 8e1614be1a..3b580dd251 100644 --- a/cmake/gmxCFlags.cmake +++ b/cmake/gmxCFlags.cmake @@ -173,7 +173,7 @@ macro (gmx_c_flags) GMX_TEST_CFLAG(CFLAGS_WARN "-w3 -wd177 -wd593 -wd981 -wd1418 -wd1419 -wd1572 -wd1599 -wd2259 -wd2415 -wd2547 -wd2557 -wd3280 -wd11074 -wd11076" GMXC_CFLAGS) endif() GMX_TEST_CFLAG(CFLAGS_STDGNU "-std=gnu99" GMXC_CFLAGS) - GMX_TEST_CFLAG(CFLAGS_OPT "-ip -funroll-all-loops -alias-const -ansi-alias" GMXC_CFLAGS_RELEASE) + GMX_TEST_CFLAG(CFLAGS_OPT "-ip -funroll-all-loops -alias-const -ansi-alias -no-prec-div -fimf-domain-exclusion=14 -static-intel" GMXC_CFLAGS_RELEASE) GMX_TEST_CFLAG(CFLAGS_DEBUG "-O0" GMXC_CFLAGS_DEBUG) #icc defaults to -O2 even with -g GMX_TEST_CFLAG(CFLAGS_FP_RELASSERT "-fp-model except -fp-model precise" GMXC_CFLAGS_RELWITHASSERT) else() @@ -208,7 +208,7 @@ macro (gmx_c_flags) #2282: unrecognized GCC pragma GMX_TEST_CXXFLAG(CXXFLAGS_WARN "-w3 -wd177 -wd383 -wd444 -wd981 -wd1418 -wd1572 -wd1599 -wd2259 -wd3280 -wd11074 -wd11076 -wd2282" GMXC_CXXFLAGS) endif() - GMX_TEST_CXXFLAG(CXXFLAGS_OPT "-ip -funroll-all-loops -alias-const -ansi-alias" GMXC_CXXFLAGS_RELEASE) + GMX_TEST_CXXFLAG(CXXFLAGS_OPT "-ip -funroll-all-loops -alias-const -ansi-alias -no-prec-div -fimf-domain-exclusion=14 -static-intel" GMXC_CXXFLAGS_RELEASE) GMX_TEST_CXXFLAG(CXXFLAGS_DEBUG "-O0" GMXC_CXXFLAGS_DEBUG) GMX_TEST_CXXFLAG(CXXFLAGS_FP_RELASSERT "-fp-model except -fp-model precise" GMXC_CXXFLAGS_RELWITHASSERT) else() -- 2.11.4.GIT