Commit Graph

24 Commits

Author SHA1 Message Date
David Anderson eee2879a57 client: fix bug that allowed work fetch request while file uploads active
A while back we added a mechanism intended to defer work-request RPCs
while file uploads are happening,
with the goal of reporting completed tasks sooner
and reducing the number of RPCs.
There were 2 bugs in this mechanism.
First, the decision of whether an upload is active was flawed;
if several uploads were active and 1 finished,
it would act like all had finished.
Second, when WORK_FETCH::choose_project.cpp() picks a project,
it sets p->sched_rpc_pending to RPC_REASON_NEED_WORK.
If we then decide not to request work because an upload
is active, we need to clear this field.
Otherwise scheduler_rpc_poll() will do an RPC to it,
piggybacking a work request and bypassing the upload check.
2013-06-14 22:40:43 -07:00
David Anderson b93e80c6f5 - client: code cleanup. Some variable/function/constant names
contained "debt" when they actually refer to REC.
    Change these names to use "rec".
2013-03-24 11:22:01 -07:00
David Anderson 9481e04e7b - client: there were many places in the code where we keep track
(usually in a static variable called "last_time")
    of the last time we did something,
    and we only do it again when now - last_time exceeds some interval.
    Example: sending heartbeat messages to apps.
    Problem: if the system clock is decreased by X,
    we won't do any of these actions are time X,
    making it appear that the client is frozen.
    Solution: when we detect that the system clock has decreased,
    set a global var "clock_change" for 1 iteration of the polling loop,
    and disable these time checks if clock_change is set.
2013-03-22 10:28:20 +01: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 72368a6b20 - A first attempt to fix the bug where apps die with exit(1)
(whereas they didn't do this w/ older clients).
    On Windows, the client uses TerminateProcess(h, 1) to kill processes;
    the 1 is the exit code the process will appear to have.

    So instead, add a "will_restart" bool arg to the various kill
    functions, and if set use 0 (= STATUS_SUCCESS),
    otherwise use EXIT_ABORTED_BY_CLIENT.

    Note: in principle this shouldn't make any difference
    for quitting tasks,
    since handle_exited_app() checks for task state QUIT_PENDING
    and ignores the exit code in that case.
    The only place I can see where it would make any difference
    is when we kill a process because it hasn't been handling
    queued shared-memory messages for 180 seconds.

- client: add more info to the message about an exited app

- client: function return values (ERR_*) are different from
    process exit codes (EXIT_*).
    But in many places we were using return values as exit codes.
    Fix these.
    Also, break out the different types of limits a job can exceed
    (time, disk, memory) into difference exit codes.


svn path=/trunk/boinc/; revision=25601
2012-04-26 05:28:45 +00:00
David Anderson bfe3b7cbb8 - client: fix bug in async file verify.
File verify is done in 4 places:
    - after a download finishes
    - transition result to DOWNLOADED
    - if project->verify_files_on_app_start, on app start
    Use asynchrony only in the first 2 cases,
    since the async logic is set up to mark the file as PRESENT
    when done, not to restart a task


svn path=/trunk/boinc/; revision=25219
2012-02-08 19:30:57 +00:00
David Anderson 3a4e85bff3 - client: async file stuff
- set threshold at 10 MB for doing things asynchronously
		- don't count VERIFY_PENDING as failure

svn path=/trunk/boinc/; revision=25215
2012-02-08 00:45:37 +00:00
David Anderson e268b81a3d - async file stuff. mostly working. still a few bugs
svn path=/trunk/boinc/; revision=25214
2012-02-07 17:54:09 +00:00
David Anderson cdd40fcc10 - client: intermediate checkin for async file verification
svn path=/trunk/boinc/; revision=25202
2012-02-06 06:06:44 +00:00
David Anderson 9667ff52a8 - client simulator: fixes
- client: message tweaks


svn path=/trunk/boinc/; revision=24297
2011-09-26 23:34:40 +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 396dc5a8b4 svn path=/trunk/boinc/; revision=22895 2011-01-12 01:17:07 +00:00
David Anderson 6784283211 - user web: fix bugs in server status page
- fix some indentation


svn path=/trunk/boinc/; revision=22890
2011-01-06 23:09:13 +00:00
David Anderson ccac28c863 - client: when an app exits, adjust debts before erasing ACTIVE_TASK.
Otherwise the last episode won't get accounted
- client simulator: add output file for debt info

svn path=/trunk/boinc/; revision=22505
2010-10-14 19:07:02 +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
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 d6b6f8d5db - client (Mac): append /usr/local/cuda/lib to LD_LIBRARY_PATH
and DYLD_LIBRARY_PATH
- client simulator: compile fixes

svn path=/trunk/boinc/; revision=20117
2010-01-09 16:41:17 +00:00
David Anderson 31e7127776 - client: make timeout values into #defines
svn path=/trunk/boinc/; revision=17396
2009-02-26 03:24:39 +00:00
David Anderson 8c591e31df - client: first whack at new work-fetch logic. Very preliminary.
svn path=/trunk/boinc/; revision=16754
2008-12-31 23:07:59 +00:00
David Anderson 79fb6e969e - Remove the notion of "CPU efficiency" from both client and server.
This wasn't being measured correctly for coproc/multithread apps,
    and its effect is now subsumed in DCF.

svn path=/trunk/boinc/; revision=16610
2008-12-03 19:50:06 +00:00
David Anderson 89548f04da - client: compute duration_correction_factor based on elapsed time, not CPU time
(otherwise it doesn't work for coproc or multi-proc apps)
    - client: in estimate of job completion time,
        weight the estimate based on fraction done more heavily
        (quadratic rather than linear)

svn path=/trunk/boinc/; revision=16603
2008-12-02 22:19:39 +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