Commit Graph

245 Commits

Author SHA1 Message Date
David Anderson 026c3a78df comments 2024-08-16 20:27:25 -07:00
davidpanderson 0ec2eef666 client: when we don't request work for a resource,
there are two levels of reason: project-specific and global
(i.e. buffer full).
Check both reasons when in the no-fetch message.

Include CPU in type_name_to_num()
2024-08-16 20:21:12 -07:00
David Anderson 75c7b294f0 coproc code: add comment about processor type names 2024-08-16 15:47:07 -07:00
David Anderson 02c92fc34c
client and boinccmd: show some RAM/disk sizes in GB rather than MB
When showing a system size (total RAM or VRAM, disk, swap)
use GB (with %.2f) instead of MB.
When showing the RAM or disk usage of particular job, use MB.
2024-08-08 23:54:42 +02:00
David Anderson 61e2f05f17 client: detect Apple Silicon GPUs, and their Metal capabilities,
by means other than OpenCL.
Do this using the Mac 'system_profiler' program, as suggested by Charlie.
Also:
- improve the comments in GPU detection code.
    For something this complex, we need, at the minimum,
    a comment saying what each function does.
- avoid field names like 'version' and 'name'.
    Version of what?  name of what?
2024-02-04 16:09:38 -08:00
David Anderson ea32cd70de client: in the description in host.serialnum,
use 'apple_gpu' instead of 'Apple GPU'.
Better to use the same name everywhere.
2024-01-29 14:48:56 -08:00
David Anderson 1b894b53fa Add some missing bits of code for Apple GPU 2024-01-28 14:27:44 -08:00
David Anderson 73fba33695 client/server/web: add 'Apple GPU' as an official GPU type.
For now, it's detected only via OpenCL (like Intel GPUs).
Eventually we'll detect via Metal as well.

Plan classes for Apple GPU must include 'apple_gpu' in their name.

The changes are mostly copy-and-paste of Intel GPU code.
I hate duplicate code but I don't know how to fix.
2024-01-28 01:41:12 -08:00
Vitalii Koshura 92a9b34e9c
[linux] Move all fcgi dependent stdio functions to the separate 'boinc_stdio.h' header only file
Signed-off-by: Vitalii Koshura <lestat.de.lionkur@gmail.com>
2023-02-12 19:50:22 +01:00
David Anderson 86863423e7 comment 2022-12-26 17:08:58 -08:00
David Anderson 26eaa0edb5 scheduler: set type of Apple GPUs to "Apple"
When the client reports an OpenCL GPU (other than NVIDIA/AMD/Intel)
in a scheduler request, the "type" field is the model name.
In the case of Apple GPUs this is "Apple M1" or "Apple M2"
(and other models as time goes on).
The type field is used in plan class descriptions.

In the case of Apple the models are (I think) equivalent software-wise,
and it would be a nuisance to have to make a new plan class
(and app versions) for each model.

So - in the case of Apple GPUs - use "Apple" as the type.
The model name is still available (as opencl_prop.name) if needed.
2022-12-26 16:48:34 -08:00
RichardHaselgrove 1600466914 client/scheduler: update NVidia detection again
for new RTX 30x0 range released September 2020
2020-09-25 17:47:00 +01:00
davidpanderson 8b852cb2c9 Win code cleanup; no functional changes
Platform-wide #defines belong in .h files, not .cpp
Also fixed a couple of compiler warnings.
2020-08-31 13:56:15 -07:00
David Anderson ac4b390ee8 client/manager, Win: remove references to _STDWX_H_; not used anymore 2020-06-04 00:48:21 -07:00
Dmitry Tsarevich 0f92c373ee
lib: Fix printf format specifier, unsigned int is expected 2020-05-06 23:03:30 +03:00
David Anderson 9528ddf911 client: fix stall when --skip_cpu_benchmarks used
There were two problems:
1) We weren't fetching work unless benchmarks had been run
(since a scheduler request must include a p_fpops value).
Fix: if --skip_cpu_benchmarks set, pretend that we ran benchmarks
and p_fpops is 1 GFLOPS

2) adding a project via the cmdline (--attach_project)
wasn't setting a flag to fetch the project's scheduler list.

Also: the new way of clearing structures (copying a static instance to *this)
causes a startup hang if the default constructor calls clear().
To fix this, have the static instance use a constructor
that doesn't call clear()

Also: fix message about libc version.
"[foobar] ...." means that the message is conditional on <debug_foobar>
2020-02-11 09:42:38 +01:00
David Anderson 219a540550 client: get rid of the use of memset() to initialize structs to zero.
Instead: declare a static const instance (whose data members are zero)
and copy that.
This avoid the error-prone need to assign each member,
and it works even if there are virtual function tables.
2019-11-05 00:16:02 -08:00
David Anderson ccd0e64b2b sanity-check GPU peak FLOPS in both client and server
If the calculated peak FLOPS is nonpositive or greater than 1000 TeraFLOPS,
use a default (100 GigaFLOPS) instead.

Server: use the value reported by client rather than recalculating it;
the client is probably more recent than you are.
Sanity-check it in any case.
2019-02-07 13:52:35 -08:00
RichardHaselgrove 4f6e52f1cb client/scheduler: update NVidia detection
for new architectures released since 2014, including RTX range released September 2018
2018-09-21 12:32:16 +01:00
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