Commit Graph

63 Commits

Author SHA1 Message Date
David Anderson cda6bd334b client: get static host info items only on startup
On Android, the way we were getting os_version
(Linux version + Android version)
didn't work because get_host_info() was getting called before every
scheduler RPC, and it overwrote the Android version part.

Solution: divide host info into dynamic (disk usage, network info)
and static (everything else).
Computer the static part only at startup.

Also factor the Unix HOST_INFO code into multiple functions.
2014-11-25 14:46:58 -08: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
Charlie Fenton 5a81b939e2 lib: fix a comment 2013-08-22 05:20:29 -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 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 3b18584cb3 - client (Android): change battery-status function so that it
keeps file descriptors open
    (slight simplification and performance enhancement).
2013-03-05 15:33:54 +01:00
David Anderson 21f580d9ef - client (Android): suspend processing if battery temperature > 45 C.
We can adjust this or make it configurable later.
2013-03-05 15:28:00 +01:00
David Anderson 607060ffaa - client (Android)
- Don't compute if the battery is overheated
    - Don't compute until the batter is 95% charged.
        Then stop computing if it falls below 90%.
        (On some devices, computing causes the batter to drain
        even while it's recharging).
2013-03-05 15:24:01 +01:00
Rom Walton 9ce39485b5 client: Basic detection of the battery state for a given host for Windows and Android. Useful for detecting if the battery is overheating. 2013-03-05 15:12:52 +01:00
Rom Walton 759b3b8078 client: Basic detection of how much capacity a host's battery has on Android and Windows. 2013-03-05 15:12:52 +01: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
Charlie Fenton aff3b7675c client: Don't support CUDA on dual-GPU MacBooks with automatic GPU switching to save battery power
svn path=/trunk/boinc/; revision=26088
2012-09-12 10:05:41 +00:00
David Anderson 22f93cf009 - Client: initial checkin for Android version. From Joachim Fritzsch.
svn path=/trunk/boinc/; revision=25982
2012-08-04 00:27:32 +00:00
David Anderson cf932e622d - assimilator: when enumerating results for a WU, check retval.
Otherwise we might get a partial list,
    which screws up assimilation logic.


svn path=/trunk/boinc/; revision=25259
2012-02-14 18:50:47 +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 e279b59913 - Updates Linux notifications to use current libnotify.
- Fix build problems on Mac OS X using autotools
- Consistently use #if HAVE_X for platform checks,
    rather than #ifdef HAVE_X or #if defined(HAVE_X)
- In Unix build, make lots of compiler checks standard
- Fix some compile warnings

From Matt Arsenault.

Note: there are now lots of compile warnings in clientgui/ on Unix,
    mostly in WxWidgets code


svn path=/trunk/boinc/; revision=24303
2011-09-27 19:45:27 +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
Charlie Fenton 98a2be83c2 Mac: Begin changes for XCode 4.1 and GCC 4.2
svn path=/trunk/boinc/; revision=23869
2011-07-25 11:37:06 +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 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
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 6b937c7e54 - more code shuffle: add COPROCS to HOST_INFO
svn path=/trunk/boinc/; revision=19797
2009-12-07 01:21:42 +00:00
Charlie Fenton 2a18a8abeb client: Revise Apple idle time detection for compatibility with OS 10.6
svn path=/trunk/boinc/; revision=17432
2009-03-03 01:57:48 +00:00
Rom Walton 4aa95488a7 - WIN: remove accelerators from the HOST_INFO class. It doesn't appear
to be used by anybody, and was only meant as a stop-gap until
        we had some formal way to deal with co-processors.
        
    client/
        hostinfo_win.C
    lib/
        hostinfo.C, .h

svn path=/trunk/boinc/; revision=15849
2008-08-15 04:59:09 +00:00
David Anderson 4f66bb4c95 - added copyright and license info to .C, .cpp, .h files
- scheduler: fix bug in adaptive replication:
    if send an unreplicated job to untrusted host,
    set both wu.target_nresults and wu.min_quorum to app.target_nresults.

svn path=/trunk/boinc/; revision=15762
2008-08-06 18:36:30 +00:00
Charlie Fenton aa2629a8e0 Mac Client: revert to using older API NXIdleTime() to get user idle time
svn path=/trunk/boinc/; revision=14456
2008-01-02 11:15:20 +00:00
Frank Thomas 3bfc78b511 Updated the postal address of the Free Software Foundation in all license headers. See http://lists.ssl.berkeley.edu/pipermail/boinc_dev/2007-October/008939.html for reference.
svn path=/trunk/boinc/; revision=13804
2007-10-09 11:35:47 +00:00
David Anderson ba39bd9cb5 *** empty log message ***
svn path=/trunk/boinc/; revision=12246
2007-03-19 20:03:06 +00:00
David Anderson 138f17af40 *** empty log message ***
svn path=/trunk/boinc/; revision=12216
2007-03-13 19:33:27 +00:00
Charlie Fenton 8e3a02cbb5 *** empty log message ***
svn path=/trunk/boinc/; revision=12163
2007-02-27 09:52:01 +00:00
Charlie Fenton d3b5d084df *** empty log message ***
svn path=/trunk/boinc/; revision=12143
2007-02-23 13:30:33 +00:00
Rom Walton 2de818edb8 *** empty log message ***
svn path=/trunk/boinc/; revision=11931
2007-01-22 19:34:59 +00:00
Rom Walton f27530a3e6 *** empty log message ***
svn path=/trunk/boinc/; revision=11915
2007-01-21 16:27:04 +00:00
David Anderson 610c331ead *** empty log message ***
svn path=/trunk/boinc/; revision=10506
2006-06-23 20:41:47 +00:00
David Anderson 85be4593fa symstore support
svn path=/trunk/boinc/; revision=10174
2006-05-22 09:54:31 +00:00
Rom Walton aa3b8430af *** empty log message ***
svn path=/trunk/boinc/; revision=10156
2006-05-17 22:29:37 +00:00
Rom Walton da6f65746f *** empty log message ***
svn path=/trunk/boinc/; revision=10145
2006-05-16 20:43:11 +00:00
David Anderson f8776ebd8c fix warnings
svn path=/trunk/boinc/; revision=8739
2005-10-23 07:19:03 +00:00
David Anderson 7959b99a3c *** empty log message ***
svn path=/trunk/boinc/; revision=8704
2005-10-19 18:33:16 +00:00
David Anderson c9d0b1fe8f *** empty log message ***
svn path=/trunk/boinc/; revision=8680
2005-10-15 05:08:59 +00:00
David Anderson 4bc558ffc8 disk usage fixes
svn path=/trunk/boinc/; revision=8442
2005-10-04 21:44:58 +00:00
David Anderson 30e93d5e5d use libcrypto
svn path=/trunk/boinc/; revision=7186
2005-08-04 16:17:30 +00:00