Improve reporting by making messages more specific; also added logging of binary caching also for the case where a cache files is found in addition to the case where no cache file is present
nullptr, &cl_error);
if (cl_error != CL_SUCCESS)
{
- GMX_THROW(InternalError("Could not create OpenCL program, error was "
- + ocl_get_error_string(cl_error)));
+ GMX_THROW(InternalError("Could not create OpenCL program from the cache file " + filename
+ + ", error was " + ocl_get_error_string(cl_error)));
}
return program;
// Failing to read from the cache is not a critical error
formatExceptionMessageToFile(fplog, e);
}
+ fprintf(fplog, "OpenCL binary cache file %s is present, will load kernels.\n",
+ cacheFilename.c_str());
}
else
{
fprintf(fplog,
- "No OpenCL binary cache file was present, so will compile kernels normally.\n");
+ "No OpenCL binary cache file was present for %s, so will compile kernels "
+ "normally.\n",
+ kernelBaseFilename.c_str());
}
}
if (program == nullptr)
}
catch (gmx::GromacsException& e)
{
- e.prependContext(gmx::formatString("Failed to compile NBNXN kernels for GPU #%s\n",
- nb->deviceContext_->deviceInfo().device_name));
+ e.prependContext(gmx::formatString(
+ "Failed to compile/load nbnxm kernels for GPU #%d %s\n",
+ nb->deviceContext_->deviceInfo().id, nb->deviceContext_->deviceInfo().device_name));
throw;
}
}