Disable FPE for SYCL builds
[alexxy/gromacs.git] / src / gromacs / mdrun / runner.cpp
index 802b5bf3276cd7c421aa104599104a524155ea96..d42675f9fa3edb4352056be769ab89f78b6396d7 100644 (file)
@@ -1478,16 +1478,7 @@ int Mdrunner::mdrunner()
                           hw_opt.nthreads_omp_pme,
                           !thisRankHasDuty(cr, DUTY_PP));
 
-// Enable FP exception detection, but not in
-// Release mode and not for compilers with known buggy FP
-// exception support (clang with any optimization) or suspected
-// buggy FP exception support (gcc 7.* with optimization).
-#if !defined NDEBUG \
-        && !((defined __clang__ || (defined(__GNUC__) && __GNUC__ == 7)) && defined __OPTIMIZE__)
-    const bool bEnableFPE = true;
-#else
-    const bool bEnableFPE = false;
-#endif
+    const bool bEnableFPE = gmxShouldEnableFPExceptions();
     // FIXME - reconcile with gmx_feenableexcept() call from CommandLineModuleManager::run()
     if (bEnableFPE)
     {