Commit Graph

49 Commits

Author SHA1 Message Date
David Anderson ac4b390ee8 client/manager, Win: remove references to _STDWX_H_; not used anymore 2020-06-04 00:48:21 -07:00
Vitalii Koshura 2efc0964ea
Merge pull request #3443 from BOINC/dpa_hostinfo_fix
client: fix bug in GPU detection
2020-02-05 10:50:12 +01:00
David Anderson 758ff3e13a client: fix bug in GPU detection
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.
2020-01-28 14:22:28 -08:00
David Anderson 3a081aded8
[client] [Win]: don't truncate p_features at 255 characters
This fixes #3431

Signed-off-by: Vitalii Koshura <lestat.de.lionkur@gmail.com>
2020-01-28 07:55:18 +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
Vitalii Koshura 77b1f34d31
[Client] [WSL] Fix xml output
Signed-off-by: Vitalii Koshura <lestat.de.lionkur@gmail.com>
2018-06-27 01:25:38 +03:00
Vitalii Koshura f8f6443074
[Client] [WSL] Extend detection.
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>
2018-06-24 03:08:11 +03:00
Vitalii Koshura 19a13d1e80
Move common linux detection functions to separate file.
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>
2018-05-27 20:06:16 +03:00
Vitalii Koshura ada6cbd9ed
Add modifications of parse_linux_os functions to work
Signed-off-by: Vitalii Koshura <lestat.de.lionkur@gmail.com>
2018-04-28 03:59:10 +03:00
Vitalii Koshura 7da93c7c98
Move common code from get_os_info function to hostinfo struct
Signed-off-by: Vitalii Koshura <lestat.de.lionkur@gmail.com>
2018-04-02 02:17:22 +03:00
Vitalii Koshura d297b9a86f
Add hostinfo wsl fields
Signed-off-by: Vitalii Koshura <lestat.de.lionkur@gmail.com>
2018-03-31 04:50:31 +03:00
David Anderson a484b7dd6b Merge pull request #1562 from BOINC/cpu_infos_aarch64
Client: improve CPU and OS detection on Linux
2017-01-31 01:12:55 -08:00
David Anderson e92a398c0a client: fix typo 2017-01-12 13:57:31 -08:00
David Anderson 7cb58b5268 client: include # GPUs in <host_info> XML, including acct mgr requests 2017-01-12 13:15:42 -08:00
Christian Beer ede61a24ea Client: improve Linux OS detection
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.
2016-06-20 08:45:59 +02: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
David Anderson 99332624f3 scheduler: parse <opencl_cpu_prop> in scheduler requests correctly
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.
2013-11-28 14:11:42 -08:00
David Anderson 5b76909f04 scheduler: parse OpenCL/CPU descriptors, and add plan class for OpenCL/CPU/Intel 2013-08-26 23:32:32 -07:00
David Anderson b10348ca1a client (Android): use random string for domain name
- parse domain_name from state file
- if it's empty, generate one of the form android_xxxxxxxx
- don't use MAC address
2013-08-22 23:50:13 -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
David Anderson c3485cd6a9 client (Android): allow GUI to pass MAC address to client via set_host_info(). If domain name is "localhost" and MAC address is nonempty, use MAC address instead of domain name when showing host on project web page. 2013-08-03 18:42:11 -07:00
David Anderson 3bcf2a3530 client: fix bug that caused host CPID to change on each startup 2013-07-14 12:07:52 -07:00
David Anderson a132fcba02 client: parse product_name from state file only on Android 2013-05-23 23:29:44 -07:00
David Anderson 1a6a7128a1 client: get product name in Android
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.
2013-05-21 13:20:56 -07:00
David Anderson 61913b181f client (Android): GUI reports battery and wifi status to client
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.
2013-05-14 12:28:09 -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
David Anderson 994f4d6b4c - Manager: fix case where the client has only an Intel GPU,
and the manager was acting as if it had no GPUs.
2013-03-05 13:39:42 +01:00
David Anderson 53782b7de4 - lib: switch include order to the way it was (general to specific).
Should fix MinGW compile


svn path=/trunk/boinc/; revision=26008
2012-08-11 05:47:18 +00:00
David Anderson 405f567c81 - code cleanup: in foo.cpp, include foo.h first
svn path=/trunk/boinc/; revision=25933
2012-08-01 20:04:05 +00:00
David Anderson 7f3fd1f45e - LAMMPS script: chdir back to html/user, else page_head() breaks
svn path=/trunk/boinc/; revision=25674
2012-05-14 06:54:38 +00:00
David Anderson c7d766f6d7 - client: parse HOST_INFO::p_vm_extensions_disabled correctly
svn path=/trunk/boinc/; revision=25105
2012-01-19 09:38:35 +00:00
Rom Walton 741eb51893 - client: processor features buffer is supposed to be 1024 bytes. avoid
truncation.
        
    lib/
        hostinfo.cpp

svn path=/trunk/boinc/; revision=24945
2011-12-30 15:59:46 +00:00
David Anderson 95ebb112c2 - client: for VBox apps, check stderr for "ERR_CPU_VM_EXTENSIONS_DISABLED".
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
2011-12-30 09:43:58 +00:00
David Anderson 609d5665cc - client: pass XML_PARSER& rather than MIOFILE& to parse functions.
Preparatory to using new-style XML parsing everywhere.


svn path=/trunk/boinc/; revision=23975
2011-08-09 21:44:14 +00:00
David Anderson 382905661f svn path=/trunk/boinc/; revision=23478 2011-04-28 21:54:42 +00:00
David Anderson 3b906a191c - client: generalize the GPU framework so that
- 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
2011-03-25 03:44:09 +00:00
David Anderson e09a9ef73c - client: send host info in account manager request message
svn path=/trunk/boinc/; revision=22751
2010-11-27 20:15:48 +00:00
David Anderson 3355b66241 - client and scheduler: a client host may have multiple VM systems installed.
TODO: check for VirtualBox on Mac, Linux

svn path=/trunk/boinc/; revision=22704
2010-11-17 23:19:07 +00:00
Rom Walton f0ae0b832d - client: Add support to detect VirtualBox VM software.
client/
        client_state.cpp
        hostinfo_win.cpp
    lib/
        hostinfo.cpp, .h

svn path=/trunk/boinc/; revision=22702
2010-11-17 20:08:18 +00:00
David Anderson c7e13eafb3 - client: write GPU info to client_state.xml,
so that it can be input file to the client simulator.

svn path=/trunk/boinc/; revision=22405
2010-09-23 20:54:49 +00:00
David Anderson 40eebe00af - client/scheduler: in COPROCS, instead of having a vector of
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
2010-05-18 19:22:34 +00:00
Rom Walton 9cb3e6ffc7 - client & lib: bring header inclusion up-to-date for the CC to begin
hunting down a memory leak.
        
    client/
        <Various Files>
    lib/
        <Various Files>

svn path=/trunk/boinc/; revision=21457
2010-05-11 19:10:29 +00:00
Rom Walton e14e1cad34 - Remove BOINC_RCSID tags from source files, we are doing branching and tagging
properly.
        
    <Various Files>

svn path=/trunk/boinc/; revision=20873
2010-03-12 16:51:57 +00:00
David Anderson 54e7c50b48 fix GPU bug
svn path=/trunk/boinc/; revision=19837
2009-12-09 01:09:28 +00:00
David Anderson e27659858d - result of code shuffle: the HOST_INFO structure returned
by the get_host_info() GUI RPC now contains GPU info

svn path=/trunk/boinc/; revision=19798
2009-12-07 06:13:17 +00:00
David Anderson 84f794e48f svn path=/trunk/boinc/; revision=18916 2009-08-25 21:35:21 +00:00
David Anderson dbd7b8b8e9 - client: when writing XML, entity-encode the following fields:
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
2009-08-25 21:32:39 +00:00
David Anderson 5141a6eabe David 5 Nov 2008
- 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
2008-11-05 20:11:45 +00:00
David Anderson 98cfb8d3b0 - rename .C files to .cpp so that Doxygen will work
svn path=/trunk/boinc/; revision=16069
2008-09-26 18:20:24 +00:00