client: work around a nasty bug which crashes OSX (!) on some dual-gpu MacBooks with CUDA

svn path=/trunk/boinc/; revision=26082
This commit is contained in:
Charlie Fenton 2012-09-08 13:04:37 +00:00
parent 5a7f63db93
commit a02ceae225
2 changed files with 13 additions and 2 deletions

View File

@ -5903,3 +5903,11 @@ David 7 Sept 2012
sched/
sched_array.cpp
Charlie 8 Sep 2012
- client: work around a nasty bug which crashes OSX (!) on some
dual-gpu MacBooks with CUDA installed if we call cuInit()
unless we force use of the discrete (NVIDIA) GPU.
client/
gpu_opencl.cpp

View File

@ -233,7 +233,7 @@ void COPROCS::get_opencl(
device_index
);
}
continue; // Should never happen
return; // Should never happen
}
if (!strcmp(prop.name, nvidia_gpus[current_CUDA_index].prop.name)) {
break; // We have a match
@ -323,7 +323,10 @@ void COPROCS::get_opencl(
// This has already been fixed on latest Catalyst
// drivers, but Mac does not use Catalyst drivers.
if (ati_opencls.size() > 0) {
// We also must call this if we have CUDA installed because
// a bug causes the OS to crash on some dual-GPU MacBooks
// unless we force use of the discrete (NVIDIA) GPU.
if ((ati_opencls.size() > 0) || nvidia.have_cuda) {
opencl_get_ati_mem_size_from_opengl();
}