PR #3364 changed the way we clear structures.
This introduced a bug: HOST_INFO::clear_host_info()
intentionally didn't clear HOST_INFO::coprocs.
But it was replaced with HOST_INFO::clear(), which did.
This caused the client to lose GPU info.
Fix: restore HOST_INFO::clear_host_info(), and add a comment
to avoid future errors like this.
Also add some comments in GPU detection,
which is woefully lacking in them.
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.
Move WSL detection to get_host_info().
Enumerate available WSLs from registry.
Add wslapi library loading.
Add support of multiple installed wsl distros detection.
Detect only installed and configured distros.
Add extra information parse.
Add wslinfo files to save and parse wsl info.
Add dont_use_wsl param to cc_config.
Add missed hostinfo_wsl.cpp when building win client using gcc.
Fix small issues.
Small refactoring.
Signed-off-by: Vitalii Koshura <lestat.de.lionkur@gmail.com>
Move WSL detection functions to separate file.
Update projet files for Windows, linux and MacOS
Signed-off-by: Vitalii Koshura <lestat.de.lionkur@gmail.com>
Gathers more information about the Linux OS using lsb_release, /etc/os-release or /etc/redhat-release (in that order) and adds that information to the os_name and os_version fields. This produces information like this:
os_name: Linux CentOS Linux
os_version: 3.10.0-327.18.2.el7.x86_64 (CentOS Linux 7 (Core))
os_name: Linux
os_version: 2.6.32-642.1.1.el6.x86_64 (CentOS release 6.8 (Final))
os_name: Linux Ubuntu
os_version: 3.14.65-68 (Ubuntu 16.04 LTS)
product_name: ODROID-C2
os_name: Linux Debian
os_version: 4.5.0-2-amd64 (Debian GNU/Linux testing (stretch))
This should work on most major distributions and will give a better overview on what Distribution is used by volunteers.
The OPENCL_CPU_PROP structure was being referred to as both
"opencl_cpu_prop" and "cpu_opencl_prop", roughly 50/50,
in variable names and XML tags.
Let's standardize on "opencl_cpu_prop",
which is what current clients are sending in scheduler requests.
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.
We want to track the product name (e.g. "HTC One X") of Android devices.
On Android, the API to get this is Java,
so we need to do it in the GUI rather than the client.
- Add product_name field to HOST_INFO
- Add a GUI RPC for passing this info from the GUI to the client.
- Store it in client_state.xml, so that the client knows it initially.
The product name is included in scheduler RPC requests, as part of <host_info>.
TODO: add server-side support for parsing it and storing in DB.
Also: move DEVICE_STATUS out of HOST_INFO; it didn't belong there.
Previously the client had (C++) code to
- check whether on AC or USB power
- get battery status and temperature
- check whether on wifi
These functions looked in various places under /sys.
Problem: the paths are system-dependent,
so whatever we do won't work on all devices.
The Android APIs for getting this info are in Java,
so we can't call them from the client.
Solution: have the GUI periodically get this info
and report it to the client via a GUI RPC.
The GUI must make this RPC periodically:
if the client doesn't get one within some period of time
(currently 30 sec) it suspends computing and network.
Also: if suspending jobs because of battery charge level
or temperature, leave them in memory.
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.
If found, set HOST_INFO::p_vm_extensions_disabled,
and pass this to the scheduler.
- scheduler (VBox app plan function) if a host has p_vm_extensions_disabled
set, don't sent it multicore VBox jobs.
Note: if you have a host with VM extensions, and they're disabled
in the BIOS, and you enable them, you can remove the
<p_vm_extensions_disabled> line from client_state.xml
and you'll be eligible to get multicore VM jobs again.
svn path=/trunk/boinc/; revision=24944
- new GPU types can be added easily
- users can specify GPUs in cc_config.xml,
referred to by app_info.xml,
and they will be scheduled by BOINC
and passed --device N options
Note: the parsing of cc_config.xml is not done yet.
- RPC protocols (account manager and scheduler)
can now specify GPU types in separate elements
rather than embedding them in tag names
e.g. <no_rsc>NVIDIA</no_rsc> rather than <no_cuda/>
- client: in account manager replies, parse elements of the form
<no_rsc>NAME</no_rsc>
indicating the GPUs of type NAME should not be used.
This allows account managers to control GPU types
not hardwired into the client.
Note: <no_cuda/> and <no_ati/> will continue to be supported.
- scheduler RPC reply: add
<no_rsc_apps>NAME</no_rsc_apps>
(NAME = GPU name)
to indicate that the project has no jobs for the indicated GPU type.
<no_cuda_apps> etc. are still supported
- client/lib: remove set_debts() GUI RPC
- client/scheduler RPC
remove <cuda_backoff> etc. (superceded by no_app)
Exception: <ip_result> elements in sched request
still have <ncudas> and <natis>.
Fix this later.
Implementation notes:
- client/lib: change "CUDA" to "NVIDIA" in type/variable names, and in XML
Continue to recognize "CUDA" for compatibility
- host_info.coprocs no longer used within the client;
use a global var (COPROCS coprocs) instead.
COPROCS now has an array of COPROCs;
GPUs types are identified by the array index.
Index zero means CPU.
- a bunch of other resource-specific structs (like RSC_WORK_FETCH)
are now stored in arrays, with same indices as COPROCS
(i.e. index 0 is CPU)
- COPROCS still has COPROC_NVIDIA and COPROC_ATI structs to hold vendor-specific info
- APP_VERSION now has a struct GPU_USAGE to describe its GPU usage
svn path=/trunk/boinc/; revision=23253
pointers to dynamically allocated COPROC-derived objects,
just have the objects themselves.
Dynamic allocation should be avoided at all costs.
svn path=/trunk/boinc/; revision=21564
FILE_INFO::url
HOST_INFO::p_vendor, p_model, p_features, os_name, os_version
The following fields are already entity-encoded:
PROJECT::user_name, team_name
APP_INIT_DATA::user_name, team_name
PROXY_INFO:: user names and passwds
These are (as far as I know) the only fields that can
contain special chars.
This is now documented in:
http://boinc.berkeley.edu/trac/wiki/XmlNotes
- client: XML_PARSER::parse_str() now does xml_unescape(),
same as ::parse_str().
svn path=/trunk/boinc/; revision=18915
- client: make host CPID a function of:
MAC addresses + hostname + IP addr
This means that a given host will generally always get the same CPID.
Helpful e.g. on grids where the client gets installed repeatedly.
From Artyom Sharov.
client/
hostinfo_network.cpp
lib/
hostinfo.cpp
mac_address.cpp,h
win_build/
boinc_cli_curl.vcproj
libboinc.vcproj
svn path=/trunk/boinc/; revision=16432