/*! \brief Handles writing the OpenCL JIT compilation log to \c fplog.
*
- * If \c fplog is non-null and either the GMX_OCL_DUMP_LOG environment
+ * If \c fplog is non-null and either the \c GMX_OCL_DUMP_LOG environment
* variable is set or the compilation failed, then the OpenCL
* compilation log is written.
*
* \param deviceId Id of the device for which compilation took place
* \param kernelFilename File name containing the kernel
* \param preprocessorOptions String containing the preprocessor command-line options used for the
- * build \param buildFailed Whether the OpenCL build succeeded
+ * build
+ * \param buildFailed Whether the OpenCL build succeeded
*
* \throws std::bad_alloc if out of memory */
static void writeOclBuildLog(FILE* fplog,
compilerOptions += " -cl-opt-disable";
}
- /* Fastmath improves performance on all supported arch */
- if (getenv("GMX_OCL_DISABLE_FASTMATH") == nullptr)
+ /* Fastmath improves performance on all supported arch,
+ * but is tends to cause problems on Intel (Issue #3898) */
+ if ((deviceVendor != DeviceVendor::Intel) && (getenv("GMX_OCL_DISABLE_FASTMATH") == nullptr))
{
compilerOptions += " -cl-fast-relaxed-math";