Commit Graph

124 Commits

Author SHA1 Message Date
David Anderson 979d726c9f client: debug account manager fix from 2 days ago 2015-01-19 09:39:13 -08:00
Julien Nabet d75222ebf3 cppcheck: Prefer prefix ++/-- operators for non-primitive types 2015-01-14 21:18:29 +01:00
David Anderson 2b2b04188a client: "suspend GPUs" shouldn't suspend non-GPU coprocessors
The following should apply to GPUs but not other coprocs (e.g. miner ASICs):
- "suspend GPUs" command in GUI
- prefs for suspending GPUs
- always removing app from memory when suspended
2014-11-07 00:57:39 -08:00
David Anderson daf5ddd580 client: fix bugs in task cleanup
There was at least one case where we weren't cleaning up
subsidiary processes (e.g. VMs) when a task's main process exited.

Fix this by consolidating task cleanup (shared mem and subsidiary processes)
in ACTIVE_TASK::cleanup_task().
This gets called when a tasks' main process exits.
2014-07-31 15:42:56 -07:00
David Anderson befb90f0d4 client: don't pass --device to GPU apps w/ API version >= 7.5
This addresses a problem w/ Bitcoin Utopia,
whose coprocessor app (run via the wrapper) doesn't expect a --device arg,
and fails if it gets one.
The --device mechanism has been superceded by APP_INIT_DATA.gpu_device_num.
GPU apps built with the current API and later should not expect a --device arg.
2014-07-30 13:16:42 -07:00
David Anderson 119962bc0f client: minor code shuffle 2014-07-29 11:14:10 -07:00
David Anderson 9d9f29f509 client: fix compile warning 2014-07-21 12:06:39 -07:00
David Anderson 1e2fcb4b68 client/lib: change CONFIG to CC_CONFIG, config to cc_config.
Eliminates ambiguity of "config" global var, which is used in server code.
This confuses IDEs that are looking at all the code at once.
2014-05-08 00:51:18 -07:00
David Anderson 6a8eab73cd replace tab characters with spaces 2014-05-01 21:03:49 -07:00
David Anderson f8ee2e51fe client: keep track of a job's network usage, if it reports it.
If a job reports its network usage (via boinc_network_usage()),
keep track of this across episodes of the job, and report it to the server
(some projects may want to give credit for network usage).
2014-04-30 00:21:29 -07:00
David Anderson b1a6fa39fc Client: keep track of job's peak WSS, swap size, and disk usage; send to server
Also fixed a bug where, if a job was aborted while not running,
its final CPU and elapsed time weren't copied from ACTIVE_TASK to RESULT,
hence not sent to scheduler
2014-04-02 00:56:15 -07:00
David Anderson a66b0a8a80 Client: if <mem_usage_debug> set, show totals of BOINC tasks 2014-02-11 22:45:08 -08:00
David Anderson 38e83a3cd7 Client: don't use sub-second CPU throttling
I forgot that the wrapper has a 1-second poll for suspend and resume,
so sub-second throttling won't work properly for wrapper apps.
Revert to a variant of the old scheme,
in which the min of the suspended and resumed periods is 1 sec.

Also, fix task start/suspend/resume log messages.
2014-01-22 17:26:26 -08:00
David Anderson 9d056d60cb client: <cpu_sched> shouldn't show suspend/resume msgs for CPU throttling 2014-01-22 11:08:09 -08:00
David Anderson 217ad5ae5d client: if app doesn't report fraction done, estimate fraction done in a way that converges to but never reaches 100%. 2014-01-15 01:03:48 -08:00
David Anderson 506c3b6e41 client: if app doesn't report fraction done, estimate it 2014-01-14 23:56:20 -08:00
David Anderson 47b4d6bacc client: fix bugs involving CPU throttling and GPU apps
Suspended tasks can be either left in memory (LIM) or removed
from memory (RFM).
CPU throttling always uses LIM.
Other types of suspension (e.g. user request) use LIM or RFM
depending on user prefs, except that RFM is always used for GPU tasks.

There was a bug: if tasks were suspended because of CPU throttling,
and then the user suspended activity,
GPU apps would remain LIM.
They need to be RFM.
2013-12-12 00:03:22 -08:00
David Anderson 2882ca2c94 client emulator: build fixes 2013-12-10 10:04:04 -08:00
David Anderson 44793a4fcd client: don't show "Resuming - CPU throttle" messages w/ cpu_sched flag 2013-11-21 13:55:06 -08:00
David Anderson 0fc0f80c30 Fix win compile warnings. Let's shoot for zero warnings, OK? 2013-11-11 10:42:03 -08:00
David Anderson 41f2c94902 Client: limit # of slots to #CPUS*100. Also, consider an app verison a VM app if one of its files contains "vboxwrapper" 2013-10-24 14:21:30 -07:00
David Anderson 45dfb684a6 Client: don't allow more than 1000 slot dirs.
There was a report of a situation where the client created unbounded slot dirs.
Not sure why this happened, but may as well impose a limit.
2013-10-23 21:37:24 -07:00
David Anderson 590bbf517a Client: for VM apps, use rsc_memory_bound as the working set size.
On Windows, the working-set size reported by the OS for VM apps is too low.
Apparently the RAM usage is in fact roughly the VM size.
This can lead to running multiple VM apps,
which use more RAM than is available, causing performance problems.
Solution: use workunit.rsc_memory_bound as the working set size for VM apps.
(Note: for now, a VM app is one where the plan class includes "vbox").
2013-10-22 22:21:13 -07:00
Charlie Fenton 29b50b9276 client: fix build break on Mac 2013-10-03 23:26:20 -07:00
Rom Walton 310acf1892 client: Initialize diagnostics framework for the sub-second CPU throttler. 2013-10-03 20:24:42 -04:00
David Anderson 35f489d36f Client: debug sub-second CPU throttling 2013-09-20 23:18:33 -07:00
David Anderson ebde7809ce client: preliminary implementation (commented out) of sub-second throttling 2013-09-20 14:30:04 -07:00
David Anderson 4fd76ee325 boinccmd: show result states as strings instead of numbers 2013-06-18 11:33:22 -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 64d7fa3474 - client: more fixes to GUI RPC addition.
Also, replace get_project_dir() with a memoized member function of PROJECT
2013-04-18 13:57:33 -07:00
David Anderson 3960a9fc83 - client simulator: fix build errors 2013-03-04 17:19:39 +01:00
David Anderson 0f5fcca435 - client: if exiting because of exit_after_finished flag,
write state file before exiting so we don't restart the job later.
2013-03-01 16:08:52 +01:00
David Anderson 83211fd1c6 client: kill lingering apps
- client: if an app's finish file has existed for 10 seconds, kill it;
    it must be hung in boinc_finish().
    This behavior has been seen with LHC@home and maybe other projects.
2013-03-01 15:56:12 +01:00
David Anderson f0b331e0d2 - client: MAXPATHLEN tweak
svn path=/trunk/boinc/; revision=26135
2012-09-21 16:17:42 +00:00
David Anderson aa289f0916 - A bunch of tweaks from Steffen Moller, e.g. using MAXPATHLEN
svn path=/trunk/boinc/; revision=26133
2012-09-21 03:52:24 +00:00
David Anderson b9f138b4f4 - client: message tweak
svn path=/trunk/boinc/; revision=26129
2012-09-20 06:51:01 +00:00
David Anderson 5e5ec6f367 - client: enforce excluded app at startup
- win compile fix

svn path=/trunk/boinc/; revision=26120
2012-09-16 20:22:15 +00:00
David Anderson 32a08d27d9 - C++ code: use MAXPATHLEN for char arrays that hold paths
svn path=/trunk/boinc/; revision=25659
2012-05-09 16:11:50 +00:00
David Anderson bbfbef0fe8 - client: code cleanup. Move RESULT and PROJECT to separate files
svn path=/trunk/boinc/; revision=25621
2012-04-30 21:00:28 +00:00
David Anderson c22ac04ad0 - scheduler: don't max with min_work_buffer() in estimating
job turnaround time.
    min_work_buffer doesn't necessarily reflect network disconnect periods
- client simulator: compile fixes


svn path=/trunk/boinc/; revision=25521
2012-03-30 21:39:22 +00:00
David Anderson d0847d098b - client: when killing a task, don't delete its shmem or change its state.
These mess up the logic for dealing with exited processes.


svn path=/trunk/boinc/; revision=25431
2012-03-15 07:32:32 +00:00
David Anderson 5aa97b5578 - API: fix various bugs related to process control and critical sections.
- client: code cleanup (no functional change)


svn path=/trunk/boinc/; revision=25392
2012-03-08 22:22:45 +00:00
David Anderson 3dc7dc9ad3 - client: debug async file copy. Seems to be working.
svn path=/trunk/boinc/; revision=25195
2012-02-03 22:08:11 +00:00
David Anderson 4adba7ee4e - client: first pass at async file copy feature.
When a large file is copied from a project dir to a slot dir,
    it's copied in chunks,
    interleaved with other polling activities such as GUI RPCs.
    That way the manager doesn't freeze while large copies
    (e.g. VM images) are happening


svn path=/trunk/boinc/; revision=25192
2012-02-03 18:33:39 +00:00
David Anderson 81b29b0cc9 - API: fix queueing problem for graphics-related messages
(web graphics URL and remote desktop addr)
- GUI RPC and API:
    change "remote_desktop_connection" to "remote_desktop_addr" everywhere.
    It's an address, not a connection.
- vboxwrapper: log message cleanup


svn path=/trunk/boinc/; revision=25044
2012-01-13 19:00:16 +00:00
Rom Walton 3bc326db3e - client: Add plumbing to support passing the remote desktop
connection information to the manager
    - MGR: Add a "Show VM Console" button for those tasks which
        report a remote desktop port number.

    client/
        app.cpp, .h
        app_control.cpp
    clientgui/
        Events.h
        MainDocument.cpp, .h
        ViewWork.cpp, .h
    lib/
        gui_rpc_client.h
        gui_rpc_client_ops.cpp

svn path=/trunk/boinc/; revision=25036
2012-01-12 22:05:25 +00:00
David Anderson b003b8e290 - add support for APP::needs_network flag.
If set, don't run jobs for that app while network is suspended.
		- client: parse this flag and maintain in state file;
			do a job reschedule when network suspend state changes
		- GUI RPC: add RESULT::network_wait flag;
			if set, this job is waiting for network access to be allowed
		- Manager: display the above in task info
	- add support for "web graphics URL" (see above)
		- client: parse message containing URL on graphics_reply channel
			and store in ACTIVE_TASK::web_graphics_url
		- GUI RPC: add RESULT::web_graphics_url
		- Manager: if web graphics URL is present, Show Graphics opens a browser
	- remove some vestigial code for pre-V6 graphics

svn path=/trunk/boinc/; revision=24899
2011-12-26 03:30:32 +00:00
David Anderson ad2f3771da - client: fix bugs when writing/parsing cc_config.xml via GUI RPCs
(e.g. when editing it via the Manager).
    Include only the GPUs that were specified in the original cc_config.xml,
    not those detected by the client.
- client: fix bug that failed to require authorization for
    GUI RPCs that are supposed to be authorized
- client: report parse errors in acct_mgr_url.xml and acct_mgr_login.xml
- fix compile warnings
- user web: in sample project_specific_prefs.inc,
    get app names from the DB instead of listing them in the PHP code.


svn path=/trunk/boinc/; revision=24518
2011-11-03 19:19:36 +00:00
David Anderson d2e5ed17cf - client: smoothed working-set size wasn't being computed correctly.
It was always just the most recent size.


svn path=/trunk/boinc/; revision=24500
2011-10-26 23:23:01 +00:00
David Anderson c61103ac26 - client: make the attributes of GUI RPCs (network, authentication)
explicit rather than determined by position in a list.
- client: add a new "read-only" attribute for GUI RPCs.
    This is in preparation for handling GUI RPCs in separate threads.
- client: remove code to support pre-V6 graphics.


svn path=/trunk/boinc/; revision=24232
2011-09-18 21:06:49 +00:00