Commit Graph

90 Commits

Author SHA1 Message Date
David Anderson aa04257568 client: get sizes of anonymous platform files on startup
... because if we don't,
the client won't use asynch operations for large files,
which causes heartbeat failures and unresponsiveness.
2015-05-11 13:25:57 -07:00
David Anderson af97b5f9be client: bug fixes to sorting projects alphabetically
There were two problems:
1) we were sorting before parsing the client state file
   (which is where we get project names from)
2) the Win implementation of strcasecmp() wasn't right;
   it returned difference but not order.
2015-04-10 13:20:19 -05:00
David Anderson ef22b2bd4b client: show projects in alphabetical order of project name
A while back I changed the job sched and work fetch policies to use
REC-based project priority.
The work fetch logic sorts the project list (in CLIENT_STATE::projects)
by descending priority.
This causes two problems:

- If you have a lot of projects, it's hard to find a particular one
  in the event log, e.g. in work_fetch_debug output.
- In the manager's Statistics tab, the selected project can change
  unexpectedly since we identify it by array index,
  and the array order may change.

Solution: sort CLIENT_STATE::projects alphabetically (case insensitive).
In WORK_FETCH, copy this array to a separate array,
that is then sorted by decreasing priority.
2014-12-17 09:56:01 -08:00
David Anderson 115894f1e3 client emulator: don't crash if > 64 coproc instances specified 2014-11-24 23:07:21 -08:00
David Anderson 837f93583d client: skip anonymous platform vbox apps if <dont_use_vbox/> is set
If an anonymous platform app version has a plan class containing "vbox",
and the <dont_use_vbox/> flag is set in cc_config.xml, skip the app version.
2014-11-14 13:01:26 -08:00
David Anderson aca1aead5f server: shuffle code so that the file upload handler doesn't need MySQL
Also (client): remove notices about app_config.xml after problem is fixed
2014-06-17 18:07:45 -07:00
David Anderson 6a8eab73cd replace tab characters with spaces 2014-05-01 21:03:49 -07:00
David Anderson e2ffe54c73 Client: remove unnecessary CPU benchmarking
On client startup, decide whether we need to do CPU benchmarks
(cmdline option was set, or we haven't done them for 30 days).
If so, do them when possible.
2014-04-01 00:31:26 -07:00
David Anderson 7944a791d0 client: allow <file> in app_info.xml
In a checkin on 20 July 2011, I changed <file_info> to <file>
in client_state.xml.
However, the code that parses app_info.xml still requires <file_info>.
This means you can't copy and paste stuff from
client_state.xml to app_info.xml.
Fix: parse either <file> or <file_info> in app_info.xml
2013-12-12 00:06:24 -08:00
David Anderson 8f7e94ec5d Client and Manager: make notices translatable
- Add a GUI RPC ("set_language") that lets the Manager communicate
  the user's selected language code to the client at startup.
- The client stores the language code in the client state file
- The client appends a "lang=X" GET argument to the URLs from
  which notices are fetched.
- The next steps (not done) are 1) to change the get_notices.php
  script to parse the argument and do translation, and
  2) extend our Pootle system to allow volunteer translation
  of notices by all projects.
2013-12-03 10:47:56 -08:00
David Anderson f4cfc8a624 client: message tweak 2013-09-17 13:35:28 -07:00
David Anderson 78f7610f6e remove dependency of boinc_api.h on str_replace.h (and hence config.h)
Any files that use strlcpy() or strlcat() must directly include str_replace.h
2013-06-06 17:31:46 -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 3c73f40809 - client: the logic for work fetch in the presence of GPU exclusions
(especially per-app exclusions) was incomplete and buggy.
    Changes:
    - make bitmaps of included instances per (app, resource type)
    - in round-robin simulation, we keep track of used instances
        (so that we know if there are instances that are idle
        because of exclusions).
        Do this based on app-level exclusions
        (previously it was done based on project-wide exclusions,
        which didn't include app-level exclusions).
    - compute RSC_PROJECT_WORK_FETCH::non_excluded_instances
        as the logical OR of the per-app masks.
        I.e. if you exclude an instance for all apps separately,
        it's the same as excluding it for the project as a whole.
        (Note: this bitmap is used for only 1 purpose:
        if we have idle instances, don't request work from a project
        for which those instances are excluded.)
    - define RSC_PROJECT_WORK_FETCH::ncoprocs_excluded as the # of
        instances excluded for *any* app, not the # excluded for all apps.
        This quantity is used in work fetch to make sure we don't
        unboundedly fetch jobs that turn out not to have a GPU to run on
        due to exclusions.
2013-03-05 13:42:00 +01:00
David Anderson 4857dc5c06 - client: write GPU list in get_state() GUI RPC.
Otherwise manager doesn't know what GPUs we have.
2013-03-05 13:42:00 +01:00
Rom Walton 076858a729 LIB: Standardize on using windows_format_error_string and drop windows_error_string.
* Move the windows_format_error_string function to win_util.cpp, .h instead of it being scattered between util.h and str_util.cpp.
* Convert the Windows error string into UTF8 before allowing it to be used by the caller
* Remove windows_error_string from library
2013-03-04 17:39:24 +01:00
David Anderson 1174b00aba - client/manager: tweaks to Intel GPU code 2013-03-04 15:27:25 +01:00
Charlie Fenton ce87ec9848 OpenCL: First pass at adding support for Intel Ivy Bridge GPUs 2013-03-04 15:23:39 +01:00
David Anderson e538c8c303 - client: TIME_STATS fields go in <time_stats> part of state file
- scheduler: parse TIME_STATS fields (e.g., uptime)
- admin web: small fix for manage_apps.php
2013-03-04 14:14:05 +01:00
David Anderson 9cf10b400a - GUI RPC: expose TIME_STATS info (e.g. on_frac) in
the binding of the get_state() RPC
- client: move client_start_time and previous_uptime
    from CLIENT_STATE to TIME_STATS,
    so that these are also visible in GUI RPC
- scheduler RPC: move uptime and previous_uptime
    into <time_stats>
- client: condition an RR simulation message on <rrsim_detail>
- boinccmd: show TIME_STATS info in --get_state
2013-03-01 16:08:52 +01:00
David Anderson 36c304e7d3 - client: maintain current and previous uptime, and include them in scheduler RPC request. - scheduler: parse them Note: this is to support a future feature where the scheduler will send non-checkpointing jobs only clients likely to be able to complete them. 2013-02-26 16:53:20 +01:00
David Anderson 925f029556 - Unix startup script fixes, from Andrew Stevenson
svn path=/trunk/boinc/; revision=26140
2012-09-22 20:29:21 +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 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 6591272c80 - client: fix crashing bug that happened when a scheduler reply
had a parse error, and it included project files.
    While parsing the scheduler reply we'd add FILE_REFs to
    PROJECT::project_files,
    but wouldn't link them to FILE_INFOs since this is done
    only if the reply parses correctly.
    The next garbage_collect() would dereference these NULL pointers.

    Solution: parse the FILE_REFS into SCHEDULER_REPLY::project_files.
    Copy this to PROJECT::project_files only if the reply parses.


svn path=/trunk/boinc/; revision=25598
2012-04-25 05:51:26 +00:00
David Anderson 015a70e757 - client: define a "arrived-first" order on results
in which the tiebreaker is MD5 of name.
    That way the order is stable
    (it doesn't change from one run of the client to the next)
    and it doesn't grep results with similar names
    (and hence for the same app).
    This ordering is used for
    1) the order of display in the manager
    2) the job scheduler's notion of FIFO


svn path=/trunk/boinc/; revision=25300
2012-02-20 22:31:40 +00:00
Charlie Fenton 4120c8d505 MGR: If CPU or GPU is suspended from Activity Menu, change "Snooze" to "Resume" in system tray menu; client: always remember previous CPU and GPU activity settings
svn path=/trunk/boinc/; revision=25160
2012-01-27 13:02:35 +00:00
David Anderson 921b5c50df - client: create and destroy PERS_FILE_XFERs even if network suspended.
This will show pending uploads in the Transfers tab.
- file_upload_handler: fix message to client when can't acquire lock
- client: parse <alt_platform> in state file correctly


svn path=/trunk/boinc/; revision=24391
2011-10-13 19:05:18 +00:00
David Anderson 228f56b464 - client: in the function that sorts jobs by arrival time,
don't use name as a tiebreaker.
    The will typically group jobs of the same application,
    and (it is believed that) things run faster when
    applications are mixed.
- scheduler: bug: if a client gets host-specific prefs
    (e.g. from an account manager)
    it will send only the working prefs to the scheduler.
    The scheduler then always sends back the DB prefs,
    overwriting the host-specific prefs.
    Fix: note the mod time in the working prefs,
    and only send the DB prefs if they're more recent.


svn path=/trunk/boinc/; revision=24332
2011-10-05 04:12:16 +00:00
David Anderson 289bd16269 - client emulator fixes
svn path=/trunk/boinc/; revision=24024
2011-08-22 15:07:59 +00:00
David Anderson 1383142b03 - client: use new XML parser pretty much everywhere
svn path=/trunk/boinc/; revision=23984
2011-08-11 06:17:33 +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 cceea7f6d4 - client: rename MODE to RUN_MODE, and rename vars accordingly
svn path=/trunk/boinc/; revision=23974
2011-08-09 20:41:15 +00:00
David Anderson 880d01af58 - client: debug distributed storage functions
svn path=/trunk/boinc/; revision=23867
2011-07-20 22:29:17 +00:00
David Anderson 8296968cbb - client: changes to the client file model to support distributed storage,
as described here: http://boinc.berkeley.edu/trac/wiki/ClientDataModel
        Compatibility:
            clients that upgrade to this version should see nothing unusual.
            Clients that downgrade from this version to a previous version
            should see all projects reset
            (i.e. tasks disappear and then get re-downloaded).
    - manager: always show whether a file transfer is upload or download
    - client: don't scale work requests by resource share

svn path=/trunk/boinc/; revision=23862
2011-07-20 19:12:10 +00:00
David Anderson 6c59ef3bff - GUI RPC: restore <have_cuda>, <have_ati> elements in CC_STATE for compatibility
- client: copy coprocs to host_info._coprocs at startup
		(else GUI RPCs don't have right info)

svn path=/trunk/boinc/; revision=23757
2011-06-20 23:18:37 +00:00
David Anderson 6b0eba4641 - create_work and other tools: verify that the current dir,
parent dir, or BOINC_PROJECT_DIR actually is a project dir.
- client simulator: improvements


svn path=/trunk/boinc/; revision=23415
2011-04-21 17:04: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 4f7ceb2334 - client: remove auto update stuff from makefiles.
This feature is mothballed.


svn path=/trunk/boinc/; revision=23103
2011-02-24 22:18:14 +00:00
David Anderson 3a9549979e - client: tweak to ATI CPU recognition
from [P3D] Crashtest

svn path=/trunk/boinc/; revision=22845
2010-12-18 17:09:57 +00:00
David Anderson 58dadd91a8 - client, acct manager protocol:
allow <no_cpu>, <no_cuda> and <no_ati> bools
    within <account> in reply message.
    They suppress work fetch for that resource type from that project.
- scheduler:
    check max_granted_credit after wu.rsc_fpops_bound,
    so that max_granted_credit will be enforced
    even if wu.rsc_fpops_bound is absurdly high
    Fixes #1034.  From Diggory Hardy.


svn path=/trunk/boinc/; revision=22793
2010-12-02 04:53:12 +00:00
David Anderson 33713781d1 - client: distinguish between messages to be displayed as HTML
(e.g. "Download new client here" link) and others
		(e.g. "Bad tag in cc_config.xml: <foo>").
	- code cleanup; move show_message from main.cpp to client_msgs.cpp

svn path=/trunk/boinc/; revision=22548
2010-10-18 20:09:51 +00:00
David Anderson a20e7d5837 - client simulator: updates. Fix web interface.
svn path=/trunk/boinc/; revision=22476
2010-10-07 21:41:31 +00:00
David Anderson aeaac7026b - client: remove debugging code accidentally left in
svn path=/trunk/boinc/; revision=22443
2010-10-04 18:38:59 +00:00
David Anderson 794214208f - validator: if credit calculation returns an error,
wait 6 hours before retrying

svn path=/trunk/boinc/; revision=22418
2010-09-28 20:17:09 +00:00
David Anderson 1c4422985f - client: add <no_info_fetch> config option and --no_info_fetch
cmdline arg.
    Suppresses the fetch of project list and of current client version #.
    Use when running on grid nodes.
- debugging on client simulator.  Not done yet.

svn path=/trunk/boinc/; revision=22414
2010-09-27 20:34:47 +00:00
David Anderson fcbb8a286e - client simulator: major remodel and upgrade.
Insteady of using its own XML input files,
    the simulator now takes a client_state.xml file as input.
    The simulator generates a synthetic workload based on the
    projects, apps, app versions, WUs, and result it finds there.

    This means that a user seeing aberrant behavior
    can just send their client_state.xml file
    and (hopefully) we can use the simulator to repro.

    The simulator now can model GPUs.

    As of this checkin, the simulator compiles but doesn't work.
    There should be no change in the actual client.


svn path=/trunk/boinc/; revision=22409
2010-09-24 20:02:42 +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