It took us several days to solve this problem, and I hope that this post will help others avoid our frustration.
We are porting from CUDA to OpenCL on an AMD 7850 APU. Our Ubuntu 14.04 system is a hybrid with both CUDA & AMD's OpenCL installed. We can run our code using either CUDA or OpenCL. Unfortunately CodeXL doesn't seem to work on code that includes CUDA even if the CUDA instructions are not executed.
We tested this theory by starting with code that CodeXL could work with. We then took this code and linked with the CUDA runtime library (libcudart.so) and added one trivial call to CUDA:
The OpenCL program still compiles & runs with this small bit of new code, but CodeXL gives several unrelated errors and stops profiling. Ideally CodeXL would ignore CUDA instructions, but it seems like CodeXL doesn't believe in peaceful coexistence.
Our conclusion is that CodeXL will bail if the program that it is profiling links to a CUDA library. We corrected this problem by putting #ifdefs around the CUDA code. It would be nice if CodeXL 1.7 can tolerate CUDA/OpenCL hybrid programs. This would simplify the porting of our CUDA code.
I'll make sure this gets noted by the development team as a feature request. Makes perfect sense to me.
AND, I appreciate you helping out the community, who may very well run into this problem.
Are you trying to use "Application Timeline Trace" profile or "GPU: Performance Counters" profile feature of CodeXL?
I assume you are using "GPU: Performance Counters" run. Also, what kind of error messages are you getting?
Do you get a pop-up saying "Unable to gather profile data. This error can occur for one of several reasons: "?
Thanks in advance for your time and help.