mirror of https://github.com/BOINC/boinc.git
client (Unix): use dlerror() for GPU library failures; shows the filename
This commit is contained in:
parent
a41adf92ab
commit
bc8b9a5d9e
|
@ -160,7 +160,8 @@ void COPROC_ATI::get(
|
|||
|
||||
void* callib = dlopen("libaticalrt.so", RTLD_NOW);
|
||||
if (!callib) {
|
||||
warnings.push_back("No ATI library found");
|
||||
sprintf(buf, "ATI: %s", dlerror());
|
||||
warnings.push_back(buf);
|
||||
return;
|
||||
}
|
||||
|
||||
|
|
|
@ -287,7 +287,8 @@ void* cudalib = NULL;
|
|||
cudalib = dlopen("libcuda.so", RTLD_NOW);
|
||||
#endif
|
||||
if (!cudalib) {
|
||||
warnings.push_back("No NVIDIA library found");
|
||||
sprintf(buf, "NVIDIA: %s", dlerror());
|
||||
warnings.push_back(buf);
|
||||
return;
|
||||
}
|
||||
__cuDeviceGetCount = (int(*)(int*)) dlsym(cudalib, "cuDeviceGetCount");
|
||||
|
|
|
@ -185,7 +185,8 @@ void COPROCS::get_opencl(
|
|||
}
|
||||
#endif
|
||||
if (!opencl_lib) {
|
||||
warnings.push_back("No OpenCL library found");
|
||||
sprintf(buf, "OpenCL: %s", dlerror());
|
||||
warnings.push_back(buf);
|
||||
return;
|
||||
}
|
||||
__clGetPlatformIDs = (cl_int(*)(cl_uint, cl_platform_id*, cl_uint*)) dlsym( opencl_lib, "clGetPlatformIDs" );
|
||||
|
|
Loading…
Reference in New Issue