]> https://gitweb.dealii.org/ - candi.git/commitdiff
native optimizations: enable -O3 284/head
authorTimo Heister <timo.heister@gmail.com>
Mon, 21 Mar 2022 18:14:58 +0000 (14:14 -0400)
committerTimo Heister <timo.heister@gmail.com>
Mon, 21 Mar 2022 18:14:58 +0000 (14:14 -0400)
We found out that -O3 makes a measurable difference in matrix-free
performance for recent gcc versions. Enable this when the user requests
native optimizations.

deal.II-toolchain/packages/dealii.package

index 58d399bf41d666e7fef86d89ab62b7e1492ca2cb..ea1ed0b4a023cb3630003791a8fd97650b4794cc 100644 (file)
@@ -38,7 +38,8 @@ fi
 # Choice of whether native compiler optimizations should be enabled
 if [ ${NATIVE_OPTIMIZATIONS} = ON ]; then
     CONFOPTS="${CONFOPTS} \
-      -D CMAKE_CXX_FLAGS='-march=native'"
+      -D CMAKE_CXX_FLAGS='-march=native' \
+      -D CMAKE_CXX_FLAGS_RELEASE='-O3'"
 fi
 
 if [ ${USE_DEAL_II_CMAKE_MPI_COMPILER} = ON ]; then

In the beginning the Universe was created. This has made a lot of people very angry and has been widely regarded as a bad move.

Douglas Adams


Typeset in Trocchi and Trocchi Bold Sans Serif.