Open bkloppenborg opened 12 years ago
The current method of checking OpenCL/OpenGL errors involves calls to COpenCL::CheckOCLError
which although informative, could be better. The AMDAPP SDK includes a nice series of inlined functions checkVal
, getOpenCLErrorCodeStr
, and CHECK_OPENCL_ERROR
which generate similarly verbose messages to COpenCL::CheckOCLError
, but also output the file and line number from which the errors were generated. This, combined with a git version, would be quite useful in a debugging/logging framework.
See AMDAPP/include/SDKUtil/CLUtil.hpp
for more details
In commit ffff0a5 we improved the error messages. Previously only the OpenCL error code was shown. Now the OpenCL error code, file name, and line number are displayed. For example:
Error: clSetKernelArg failed. Error code : CL_INVALID_ARG_INDEX
Location : /home/bkloppenborg/workspace/liboi/src/CRoutine_FTtoT3.cpp:84
It would be nice if liboi had a built-in logging framework with different levels of verbosity. The logging framework should compute md5 or sha hashes of any files read in (kernels, data files) too. Suggestion comes from conversation with Will M. about problems when doing support work for HITRAN