Commit Graph

57 Commits

Author SHA1 Message Date
David Anderson 80562d230d code cleanup
In .cpp files, put "using std::" at the top and don't use std:: after that
2016-12-16 12:12:00 -08:00
Charlie Fenton 49275b0727 client: consolidate comments in GPU code 2016-10-28 19:55:24 -07:00
David Anderson ca3cb0c5c6 Client: add some comments to GPU code 2016-10-27 22:57:19 -07:00
Christian Beer 0b3a760924 initialize fields in constructors
fixes CID 27984 found by Coverity Scan
2015-10-20 15:58:34 +02:00
David Anderson e82e36e90e client: msg tweak 2015-04-30 00:16:01 -07:00
David Anderson 8adcd872f6 client: say whether coprocs are GPUs in event log 2014-12-11 16:18:33 -08:00
David Anderson 115894f1e3 client emulator: don't crash if > 64 coproc instances specified 2014-11-24 23:07:21 -08:00
David Anderson 7a4672e7d6 client: increase limit on coproc instances from 31 to 64
We were using an int bitmap to store flags for the instances of a coproc.
Furthermore, because of the use of 2^n-1 to generate a bitmap of 1s,
the limit on instances was 31.

Use a long long for the bitmap instead, and don't use 2^n-1.
This increases the limit to 64.
2014-11-24 00:14:23 -08:00
Charlie Fenton 6790085415 client: fix spaces in source code. 2014-11-05 02:17:13 -08:00
Charlie Fenton 408003dd71 client: Allow using NVIDIA GPUs with Compute Capability < 2.0 with CUDA driver 6.5 or later on non-Mac platforms. Future versions of CUDA will drop support for these GPUs on all platforms and presumably not report these GPUs, so we still explain that situation in the Event Log and Notices. 2014-11-05 02:12:41 -08:00
Charlie Fenton 6d1f6060d4 client: add some comments to clarify that the CUDA warning message and notice will appear only once for each relevant GPU. 2014-10-28 02:50:14 -07:00
Charlie Fenton 62e70a8e98 client: Handle future versions of CUDA which may not report NVIDIA GPUs with Compute Capability < 2.0 at all; prevent use of those GPUs for OpenCL and show explanation in Event Log and Notices. 2014-10-26 04:12:01 -07:00
Charlie Fenton 4726923ef8 client: If CUDA driver 6.5 or later is installed, prevent use of NVIDIA GPUs with Compute Capability < 2.0 and show explanation in Event Log and Notices. 2014-10-25 03:55:29 -07:00
David Anderson dcb72145e1 client: fix compile warnings 2014-07-23 09:51:34 -07:00
Charlie Fenton 512e8e2cfe client: continue adding support for OpenCL devices (GPUs and accelerators) other than AMD/ATI, NVIDIA or Intel GPUs.
For now, handle AMD/ATI, NVIDIA or Intel GPUs as before.  But for other, "new" vendors, we treat each device as a separate resource, creating an entry for each instance in the COPROCS::coprocs[] array and copying the device name COPROC::opencl_prop.name into the COPROC::type field (instead of the vendor name.)
For devices from "new" vendors, set <gpu_type> field in init_data.xml file to the vendor string supplied by OpenCL.  This should allow boinc_get_opencl_ids() to work correctly with these "new" devices without modification.
2014-07-23 05:18:51 -07:00
David Anderson 191c7347e2 client: make it compile. Charlie, please change the commented-out lines 2014-07-22 13:02:43 -07:00
Charlie Fenton 98f4c461d0 client: group new (non-NVIDIA, non-AMD, non-INTEL) OpenCL device types by vendor name string rather than by CL_DEVICE_VENDOR_ID. This assumes that OpenCL reports identical vendor name strings for all devices from the same vendor on a given host. I incorrectly thought CL_DEVICE_VENDOR_ID was a numeric ID of the vendor which would be the same for each device from that vendor, but it is actually a unique numeric ID assigned by a given vendor to each device on a particular host. 2014-07-18 04:25:45 -07:00
Charlie Fenton 7fb69fe924 client: generalize naming scheme for OpenCL devices, add more general have_rsrc() functions 2014-07-17 02:22:26 -07:00
Charlie Fenton 64d76198ea client: keep array subscripts in bounds. 2014-07-16 06:05:01 -07:00
Charlie Fenton b37cf4cd9a client: begin adding support for OpenCL devices other than AMD/ATI, NVIDIA or Intel 2014-07-16 04:33:26 -07:00
David Anderson 79906a8f1a Client: fix a few compile warnings 2014-05-08 15:38:30 -07:00
David Anderson 701e75c4da Client: post a notice if user settings (project prefs, config file, and/or account manager settings) prevent this host from ever getting work from a project 2014-02-10 11:22:35 -08:00
David Anderson 04e8f00221 client, Win: when running GPU detect, use "boinc.exe" rather than "boinc" on cmdline.
An alpha tester reported that this fixed an error; not sure why
2014-02-06 23:48:54 -08:00
Charlie Fenton 0dcb0373a6 client: Fix typo which had no actual effect in practice. 2013-12-15 03:05:41 -08:00
Charlie Fenton e68dd4ac03 client: fix build break introduced by commit 9933262 2013-12-03 16:35:12 -08:00
Charlie Fenton 544ed85aa0 client: fix Event Log descriptions of OpenCL CPUs:
- Show the OpenCL platform vendor for each OpenCL CPU description.
 - OpenCL may not reliably report total RAM, available RAM and max FLOPS for CPUs, so exclude these from the OpenCL CPU descriptions; that information is available elsewhere.
2013-10-11 03:47:56 -07:00
Rom Walton 8f637a291b bug fix 2013-10-10 16:13:18 -04:00
Rom Walton b1aaff7dd6 client: Do not use child process GPU detection when debugging. 2013-10-10 16:11:20 -04:00
Rom Walton 8888ba6aa8 client: Detect OpenCL CPUs with the latest Intel drivers.
client: Display an OpenCL CPU event log item for every OpenCL CPU detected.
2013-10-10 14:23:30 -04:00
Charlie Fenton cb46429336 client: Clarify comment about max RAM size reported by OpenCL CPU detection 2013-08-26 17:14:54 -07:00
Charlie Fenton eb15b04d4a client: implement support for OpenCL detection of CPUs
Notes:
- The same CPU can have a different cpu_opencl_prop for each of multiple OpenCL platforms.  We send them all to the project server because:
   - Different OpenCL platforms report different values for the same CPU.
   - Some OpenCL CPU apps may work better with certain OpenCL platforms.
- OpenCL has only 64 bits for global_mem_size, so it can report a max of only 4GB; get the CPU RAM size from gstate.hostinfo.m_nbytes.
2013-08-22 05:06:54 -07:00
Charlie Fenton 9ff8554ee4 client: when launching the GPU detection child process, use boinc_fopen(), more checks for error returns. 2013-07-16 01:29:00 -07:00
Rom Walton 8321ef0430 client: Use get_exit_status to wait until the GPU detection process completes and log any error code. 2013-07-15 19:42:21 -04:00
Charlie Fenton 88135a7000 client: wait as long as necessary for the GPU detection child process to exit: eliminate the 3-second limit. 2013-07-15 14:43:29 -07:00
Charlie Fenton 1d590434ea client: Fix a race condition on system reboot when using a child process for detecting GPUs, add debugging support to child process. 2013-07-12 18:35:47 -07:00
David Anderson a8485f3d3f Various: Fix some compile warnings; from Gianfranco 2013-07-09 10:34:32 -07:00
Charlie Fenton 3c3318a867 client: Fixes for launching a child process for detecting GPUs.
Allow relative path to the client executable.
Bug fix: last item in arg list for run_program() should be NULL, not empty string.
2013-07-09 05:55:53 -07:00
Charlie Fenton 4b82bac42b client: fix compiler warning. 2013-07-03 02:34:43 -07:00
Charlie Fenton 2d1a3f8589 client: use a child process for detecting GPUs on all platforms, not just on Macs. 2013-06-29 03:30:13 -07:00
Charlie Fenton f03c4a0393 client: tweaks to code for detecting GPUs via a child process. 2013-06-26 05:42:15 -07:00
Charlie Fenton 737ab61bce client: tweaks to code for detecting GPUs via a child process and change sprintf calls to safer snprintf. 2013-06-26 02:24:36 -07:00
Charlie Fenton 152a1969e5 client: fix compile break on Windows 2013-06-25 04:50:33 -07:00
Charlie Fenton e2b2370e9d client: optionally detect GPUs via a child process, for dual_GPU laptops.
Some dual-GPU laptops (e.g., Macbook Pro) don't power down the more powerful GPU until  all applications which used them exit.  To save battery life, the client launches a second instance of the client as a child process to detect and get info about the GPUs.
The child process writes the info to a temp file which our main client then reads.
This option is enabled at compile time by defining USE_CHILD_PROCESS_TO_DETECT_GPUS as non-zero in gpu_detect.cpp
2013-06-25 04:31:34 -07:00
Rom Walton 340fcfd733 client: when formatting the OpenCL description field, use the human readable version of the GPU type. People were expecting Intel GPU instead of intel_gpu. 2013-03-05 14:03:49 +01:00
Oliver Bock d41e2fb6f8 Merge branch 'master' of ssh://boinc.berkeley.edu/boinc 2013-03-04 17:05:43 +01:00
David Anderson 17a4ab8db9 David 11 Dec 2012
- Win process control (affects API and wrapper):
		Since Win doesn't have an API for process suspend/resume,
		we were suspending processes by
			1) enumerating all the threads in the system (typically several thousand)
			2) suspending those belonging to the given process
		The problem: for each thread, the code was calling a function
		in diagnostics_win.cpp to see if the thread was exempted from suspension.
		This check (which is unnecessary anyway if we're suspending another process)
		was surrounded by a semaphore acquire/release.
		The result: performance problems.
		It could take a minute to suspend the threads.
		Solution:
			1) do the check for exemption only if we're suspending threads
				in our own process (i.e. from the API)
			2) if we're suspending multiple processes, enumerate the threads
				only once, and see if each one belongs to any of the processes
			3) have the wrapper elevate itself to normal priority.
				Otherwise it can get preempted for long periods,
				sometimes in the middle of scanning the threads.
		Note: post-9x versions of Win have a process group API that includes suspend/resume.
		We'll switch to this soon.
2013-03-04 17:02:40 +01:00
Charlie Fenton 298988918c client: clean up redundant and confusing GPU description 2013-03-04 17:01:36 +01:00
Charlie Fenton 462be89f01 Restore changes lost due to GIT confusion 2013-03-04 17:01:36 +01:00
David Anderson 5ad78a8b9d - client: replace ignore_nvidia_dev etc. with an array.
PRINCIPLE: AVOID PER-GPU-TYPE VARIABLES
- get rid of alloca() stuff in gutil.cpp; almost certainly not needed
- don't include malloc.h; it doesn't exist on BSD systems
2013-03-04 16:44:52 +01:00
Charlie Fenton 6d6403545a client: clean up redundant and confusing GPU descriptions 2013-03-04 16:42:16 +01:00