From 7f8fc06f5aa339d2409d374700afe6f8a2d05f4e Mon Sep 17 00:00:00 2001 From: Timo Heister Date: Mon, 21 Mar 2022 14:14:58 -0400 Subject: [PATCH] native optimizations: enable -O3 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 | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/deal.II-toolchain/packages/dealii.package b/deal.II-toolchain/packages/dealii.package index 58d399b..ea1ed0b 100644 --- a/deal.II-toolchain/packages/dealii.package +++ b/deal.II-toolchain/packages/dealii.package @@ -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 -- 2.39.5