From 63680e00b593be97bf31e2209ccce0c5c0192613 Mon Sep 17 00:00:00 2001
From: Olivier Coulaud <coulaud@mistral09.plafrim.cluster>
Date: Wed, 12 Mar 2014 15:44:33 +0100
Subject: [PATCH] Add floating point arithmetic options

---
 CMakeLists.txt                          | 4 ++--
 Tests/Kernels/testNewCompareKernels.cpp | 2 +-
 2 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/CMakeLists.txt b/CMakeLists.txt
index e52ca801a..6f6dd8b95 100755
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -88,7 +88,7 @@ if( ScalFMM_BUILD_DEBUG )
   IF( APPLE ) 
     SET(SCALFMM_FLAGS_OPTI_DEBUG "-m64  -funroll-loops" CACHE STRING "Set your optimization flags for debug mode.")
   ELSE(APPLE)
-    SET(SCALFMM_FLAGS_OPTI_DEBUG "${FLAGS_64bits} -march=native -funroll-loops" CACHE STRING "Set your optimization flags for debug mode.")
+    SET(SCALFMM_FLAGS_OPTI_DEBUG "${FLAGS_64bits} -fp-model strict -march=native -funroll-loops" CACHE STRING "Set your optimization flags for debug mode.")
   ENDIF(APPLE)
 #  ADD_DEFINITIONS(${SCALFMM_FLAGS_OPTI_DEBUG})
   SET(ScaLFMM_CXX_FLAGS  "${ScaLFMM_CXX_FLAGS} ${SCALFMM_FLAGS_OPTI_DEBUG}")
@@ -111,7 +111,7 @@ else()
   ELSE(APPLE)
     # Not apple system - Check the compilater flags 
     if(CMAKE_CXX_COMPILER_ID STREQUAL "Intel")
-      SET(SCALFMM_FLAGS_OPTI_RELEASE "${FLAGS_64bits} -march=native -funroll-loops -ftree-vectorize" CACHE STRING "Set your optimization flags for release mode.")
+      SET(SCALFMM_FLAGS_OPTI_RELEASE "${FLAGS_64bits} -fp-model precise -fp-model source -fimf-precision=low  -march=native -funroll-loops -ftree-vectorize" CACHE STRING "Set your optimization flags for release mode.")
     else()
       SET(SCALFMM_FLAGS_OPTI_RELEASE "${FLAGS_64bits} -ffast-math -flto -march=native -funroll-loops -ftree-vectorize" CACHE STRING "Set your optimization flags for release mode.")
     endif()
diff --git a/Tests/Kernels/testNewCompareKernels.cpp b/Tests/Kernels/testNewCompareKernels.cpp
index 7bbd86080..e07081cd3 100644
--- a/Tests/Kernels/testNewCompareKernels.cpp
+++ b/Tests/Kernels/testNewCompareKernels.cpp
@@ -372,7 +372,7 @@ int main(int argc, char* argv[])
 #endif
 
 {
-  const static int P = 7;
+  const static int P = 8;
   typedef FRotationCell<P>               CellClass;
   typedef FP2PParticleContainerIndexed<>          ContainerClass;
   typedef FSimpleLeaf< ContainerClass >                     LeafClass;
-- 
GitLab