Commit Graph

226 Commits

Author SHA1 Message Date
David Anderson d1561a7402 Merge pull request #1638 from BOINC/fix_c++11_build
Fix c++11 build
2017-08-14 16:56:02 -07:00
David Anderson 90f8a1d4b4 client/scheduler/db: store GPU count and peak FLOPS in DB host table
This lets a project easily see how many GPUs and how much GPU power it has
2017-06-13 22:35:17 -07:00
David Anderson ca3cb0c5c6 Client: add some comments to GPU code 2016-10-27 22:57:19 -07:00
David Anderson 47b93e7170 show OpenCL GPUs on host web page
- parse <opencl_device_prop> in <coproc> elements
- add entry in host.serialnum string for OpenCL GPUs
- display this in human-readable string on web
2016-10-25 11:08:16 -07:00
Christian Beer 2715c5b8a7 Lib/FCGI: fix broken build introduced by 67b5f98
Thanks Travis-CI.
2016-09-12 08:30:01 +02:00
David Anderson 67b5f980a7 scheduler: fix FCGI compile warnings 2016-09-11 19:57:08 -07:00
Christian Beer 5650ac8989 Lib/Sched: remove superfluous ';'
Those extra ';' produce warnings when using the "-std=gnu++11 -pedantic" flags because they are not conform with the C++11 standard.
2016-09-01 16:40:31 +02:00
Christian Beer 09fa014300 Build: fix whitespace and UTF8 issues 2016-09-01 16:37:02 +02:00
Rom Walton 90d23b72d8 lib: Cleanup low hanging fruit with regards to cleaning up sprintf.
Use snprintf instead.
2016-02-17 18:50:28 -05:00
Rom Walton 16e51ec218 LIB: Cleanup low hanging fruit with regards to cleaning up strcpy and strcat use.
Use safe_strcpy and safe_strcat when dealing with non-pointer data types.
2016-02-15 17:54:13 -05:00
Rom Walton 2c9fd1af74 lib: indentation, initialization of double with int
(from: Steffen Moeller)
2016-02-14 00:29:56 -05:00
Rom Walton 8e3b69fa46 client: Adjust the peak flop estimate for Nvidia GPUs when detecting them with OpenCL. 2016-01-07 19:51:29 -05:00
Rom Walton d147f0aa35 client: add simd_instruction_width to the peak FLOPS calculation.
A small attempt at future proofing things.  The value is 1 on my new GPU, but might not be on higher end cards.  Docs implies it should be part of the calculation.
2016-01-07 11:44:35 -05:00
Rom Walton b9981d7a56 client: Properly calculate the peak FLOPS of new AMD GPU(s) that only support OpenCL.
Use AMD's vendor specific extension if it is available to calculate the total number of shaders and determine the peak FLOP rate from that.

My new GPU I got for Christmas was only reporting 30% of its peak FLOP rate and does not support CAL.
2016-01-07 01:01:51 -05:00
David Anderson b0a02bb128 client: fix bug in GPU detection 2015-11-25 13:39:24 -08:00
Christian Beer 7be9ff730a Lib: initialize fields in constructor
fixes CID 27975,27996,28026 found by Coverity
2015-11-05 16:46:14 +01:00
Christian Beer 7a426140c8 initialize fields in constructors
fixes CID 28008, 27983 found by Coverity Scan
2015-10-20 16:23:09 +02:00
David Anderson 658ef388a7 client: improve FLOPS estimate for NVIDIA GPUs detected only by OpenCL
If an NVIDIA GPU is detected only by OpenCL we don't know how many
cores per proc it has.
Instead of assuming 8 (compute capability 1) assume 48 (CC 2).
We could assume 192 (CC 3) but better to err on the low side.
2015-10-08 23:28:24 -07:00
David Anderson 9411118774 client: fix bug where GPU jobs non suspended
There was a bug where, when you suspend GPU activity,
GPU jobs show as suspended but are not actually suspended.
This was because of recent changes to distinguish GPU and non-GPU coprocs.
Change things so that coprocs are by default GPUs.
If you want to declare a non-GPU coproc in your cc_config.xml,
you much put <non_gpu/> in its <coproc> element.
2014-12-08 20:38:56 -08:00
David Anderson c2a0421074 scheduler: add support for miner_asic coprocessor type
I.e. treat miner ASICs as a distinct processor type;
send miner_asic jobs only if the client requests them.

Note: I was planning to do this in a more general way,
in which the scheduler wouldn't have a hard-wired list of processor types.
However, that would be a large code change,
so for now I just added miner_asic to the list of processor types
(nvidia, ati, intel_gpu),
and made various changes to get things to work.

Also: in the job dispatch logic, try to send coproc jobs
before CPU jobs.
That way if e.g. there's a limit on jobs in progress,
we'll preferentially send coproc jobs.
2014-09-21 21:08:09 -07:00
David Anderson 31541e166d client: set work requests for coprocs specified in cc_config.xml
We weren't copying the request fields from RSC_WORK_FETCH to COPROC.
Do this, and clean up the code a bit.

Note: the arrays that parallel the COPROCS::coprocs array
are a bit of a kludge; that stuff logically belongs in COPROC.
But it's specific to the client, so I can't put it there.
Maybe I could do something fancy with derived classes, not sure.
2014-08-09 21:44:39 -07:00
David Anderson 3d447b02b6 scheduler: fix FCGI build 2014-07-26 10:25:59 -07:00
David Anderson 89b51ea43d scheduler: preliminary support for generic coprocessors
A "generic" coprocessor is one that's reported by the client,
but's not of a type that the scheduler knows about (NVIDIA, AMD, Intel).

With this commit the following works:
- On the client, define a <coproc> in your cc_config.xml
  with a custom name, say 'miner_asic'.
- define a plan class such as
  <plan_class>
    <name>foobar</name>
    <gpu_type>miner_asic</gpu_type>
    <cpu_frac>0.5</cpu_frac>
  <plan_class>
- App versions of this plan class will be sent only to hosts
  that report a coproc of type "miner_asic".
  The <app_version>s in the scheduler reply will include
  a <coproc> element with the given name and count=1.
  This will cause the client (at least the current client)
  to run only one of these jobs at a time,
  and to schedule the CPU appropriately.

Note: there's a lot missing from this;
- app version FLOPS will be those of a CPU app;
- jobs will be sent only if CPU work is requested
... and many other things.
Fixing these issues requires a significant re-architecture of the scheduler,
in particular getting rid of the PROC_TYPE_* constants
and the associated arrays,
which hard-wire the 3 fixed GPU types.
2014-07-25 12:40:35 -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 035541f7a7 scheduler: recent coproc changes caused crash; undo them 2014-07-22 09:13:29 -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 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 3edb124ab4 client/scheduler: NVIDIA compute capability 5 GPUS have 128 cores, not 192
NVIDIA has no plans to provide an API that tells you how many cores; I've asked
2014-02-24 15:57:05 -08:00
David Anderson 86a0dc0850 client: message tweak 2013-12-11 00:35:30 -08:00
David Anderson feb2f1971d scheduler: fix bug that prevented Intel GPU work from being sent to anonymous platform clients 2013-11-21 22:31:15 -08:00
David Anderson c1ee47216b Move OpenCL-related code to a separate file 2013-08-25 14:13:14 -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 21b1af954e client: fix display of CUDA version. 2013-07-02 21:57: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 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
David Anderson 846b8c7757 all components: change strcpy() to strlcpy() when possible.
This commit should cover the client and manager code.
2013-06-03 20:24:48 -07:00
David Anderson 35390ef974 - client: add support for CPU OpenCL apps.
Add OPENCL_DEVICE_PROP cpu_opencl_prop to HOST_INFO;
    this store info about the host's ability to run CPU OpenCL apps.
    Detect this, and report it in scheduler requests.
2013-04-16 22:42:29 -07:00
Eric J Korpela 61609281c1 - added opencl_driver_revision to OPENCL_DEVICE_PROP and PLAN_CLASS_SPEC. This
was necessary because ATI is releasing OpenCL drivers that don't work.
2013-04-10 18:20:22 -07:00
Oliver Bock 1c65db4a76 Merge branch 'master' of ssh://boinc.berkeley.edu/boinc 2013-03-05 17:11:45 +01:00
David Anderson b95e0dc728 - scheduler and web: store OpenCL version along with other GPU info
in host.serialnum.  Display it on web.
2013-03-05 17:11:33 +01:00
David Anderson 9ff0f0daeb - include OpenCL info when faking an NVIDIA GPU 2013-03-05 17:01:21 +01:00
David Anderson c3ec0e91de - client: show nvidia driver version as 314.07 instead of 314.7 2013-03-05 16:58:44 +01:00
Rom Walton 0bc567d8c3 lib: Remove duplicate GPU text in the OpenCL description 2013-03-05 14:17:54 +01:00
David Anderson 9817ee5850 - scheduler: fix typo in sticky file deletion code 2013-03-05 13:53:58 +01:00
David Anderson 78fc91a29b - client: show Intel GPU memory size as integer 2013-03-04 17:13:23 +01:00
David Anderson 0c4a9bc452 - lib: actually let's make it "intel_gpu". 2013-03-04 17:01:37 +01:00
David Anderson 2a1ef0bb6f - lib: the XML type field for an Intel GPU is INTEL_GPU, not INTEL 2013-03-04 17:01:37 +01:00
David Anderson 66e95c59c6 - lib: the XML tag for the description of an Intel GPU is
<coproc_intel_gpu>, not <intel_gpu>
2013-03-04 17:01:36 +01:00
Charlie Fenton 6d6403545a client: clean up redundant and confusing GPU descriptions 2013-03-04 16:42:16 +01:00
Oliver Bock 508b9b572b Merge branch 'master' of ssh://boinc.berkeley.edu/boinc
Conflicts:
	checkin_notes
	client/acct_mgr.cpp
	client/cs_statefile.cpp
	client/gpu_opencl.cpp
	lib/coproc.cpp

Additional changes:
	client/Makefile.am

Dropped changes:
	client/cs_scheduler.cpp (516eff6)
	sched/sched_send.cpp (2dd8288)
2013-03-04 16:35:08 +01:00