bkloppenborg / liboi

OpenCL Interferometry Library
https://github.com/bkloppenborg/liboi/wiki
GNU Lesser General Public License v3.0
5 stars 6 forks source link

Create logging framework #11

Open bkloppenborg opened 12 years ago

bkloppenborg commented 12 years ago

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

bkloppenborg commented 10 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

bkloppenborg commented 10 years ago

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