Hi Anneke,
OpenCL initializes all the devices it finds if the drivers are correctly installed.
The problem comes from the GGEMSOpenCLManager::GetOpenCLDevices method in the src/GGEMSOpenCLManager.cc file. But I don’t know which function throws an error, because I can’t reproduce your error on my PC. If you look in the file, there is a problem with one of the ‘getInfo’ methods.
If you can, try to see which function does not work. To do a quick test comment out these lines (I’ve had trouble with these functions before):
CheckOpenCLError(devices_[i]->getInfo(CL_DEVICE_VERSION, &char_data), "GGEMSOpenCLManager", "GGEMSOpenCLManager");
device_version_.push_back(std::string(char_data));
CheckOpenCLError(devices_[i]->getInfo(CL_DRIVER_VERSION, &char_data), "GGEMSOpenCLManager", "GGEMSOpenCLManager");
device_driver_version_.push_back(std::string(char_data));
CheckOpenCLError(devices_[i]->getInfo(CL_DEVICE_OPENCL_C_VERSION, &char_data), "GGEMSOpenCLManager", "GGEMSOpenCLManager");
device_opencl_c_version_.push_back(std::string(char_data));
To debug, can you print the number of platforms and devices that OpenCL finds? In C++, these lines must be placed in the src/GGEMSOpenCLManager.cc file (line 189):
std::cout << "n platform: " << platforms_.size() << std::endl;
std::cout << "n device: " << devices_.size() << std::endl;
I want to be sure that OpenCL detects at least 1 platform and 1 device
I keep trying to figure out where the problem is.
Kind regards
Didier