Forum Discussion
Altera_Forum
Honored Contributor
11 years agoI tried to use both OpenCL libraries from NVIDIA and Altera using dynamic loading. I modified the code for listing OpenCL platform from here (http://dhruba.name/2012/08/13/opencl-cookbook-listing-all-platforms-and-their-attributes/) by loading all OpenCL libraries from Altera (version 13.0sp1.234). I also loaded their dependencies along. Now, I can list the platform from Altera and NVIDIA separately but in one host application.
However, I found problem when loading NVIDIA library first, followed by Altera. There's segmentation fault after I allocate memory for cl_platform_id and call clgetplatformids(). The order matters here. I still couldn't figure out why. I attached the source code and library files that I used. You can adjust them to your machine's environment. I would really appreciate if somebody could give me the idea why this error happened. Cheers!