From 508307eff943409116ce9a62c6cbeec3b0d021c9 Mon Sep 17 00:00:00 2001 From: Charlie Fenton Date: Wed, 18 Jan 2012 10:03:37 +0000 Subject: [PATCH] client: add debugging aids to coproc_detect logic svn path=/trunk/boinc/; revision=25092 --- checkin_notes | 8 ++++ client/coproc_detect.cpp | 95 +++++++++++++++++++++++++++++++++++++++- 2 files changed, 101 insertions(+), 2 deletions(-) diff --git a/checkin_notes b/checkin_notes index 97a9afdfd8..c7fadf0a6b 100644 --- a/checkin_notes +++ b/checkin_notes @@ -673,3 +673,11 @@ David 18 Jan 2012 html/user/ lammps.php sandbox.php + + +Charlie 18 Jan 2012 + - client: add debugging aids to coproc_detect logic. + + client/ + coproc_detect.cpp + diff --git a/client/coproc_detect.cpp b/client/coproc_detect.cpp index 66fdc32519..ec9671aa5e 100644 --- a/client/coproc_detect.cpp +++ b/client/coproc_detect.cpp @@ -18,6 +18,9 @@ // client-specific GPU code. Mostly GPU detection +#define FAKE2NVIDIAS 0 +#define DEBUGFOROLIVER 1 + #include "cpp.h" #ifdef _WIN32 @@ -271,6 +274,18 @@ void COPROCS::get_opencl( return; } +#if FAKE2NVIDIAS +num_devices = 3; +devices[2] = devices[1]; +#endif + +#if DEBUGFOROLIVER + if (log_flags.coproc_debug) { + msg_printf(0, MSG_INFO, + "[coproc] %d OpenCL devices detected", num_devices + ); + } +#endif for (device_index=0; device_index