Commit Graph

2147 Commits

Author SHA1 Message Date
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 fb20906923 - scheduler: ignore app_version.max_core_version if it's zero
svn path=/trunk/boinc/; revision=25505
2012-03-29 07:58:47 +00:00
David Anderson 7f3b3584d0 - scheduler: zero host.nsame_ip_addr if IP addr differs from previous
svn path=/trunk/boinc/; revision=25500
2012-03-27 21:22:00 +00:00
David Anderson d3f2d6318f - scheduler: enforce app_version.max_core_version
svn path=/trunk/boinc/; revision=25491
2012-03-26 19:26:12 +00:00
David Anderson ec0ca2615d - scheduler: fix bug that could cause zero credit for
the first few jobs of a new application
    (in wu_estimated_pfc(), only multiply by app.min_avg_pfc
    if it's nonzero).


svn path=/trunk/boinc/; revision=25484
2012-03-23 21:47:06 +00:00
David Anderson 9caa637a4d - server: is_project_dir() was checking that cgi-bin is a directory.
This doesn't work if it's a symlink to a dir.
    Check for that too.


svn path=/trunk/boinc/; revision=25480
2012-03-23 17:45:04 +00:00
David Anderson adab6254bc Update Translation
svn path=/trunk/boinc/; revision=25477
2012-03-23 16:25:19 +00:00
Bernd Machenschalk 75a2116f2e - scheduler: fix hu.peak_flops and hu.projected_flops caclculation
in plan_class_spec by using coproc_pref() and capped_host_fpops()
        (moved coproc_perf() to sched_customize.h to make it available
        in plan_class_spec.cpp, and cleaned up includes)


svn path=/trunk/boinc/; revision=25467
2012-03-21 12:40:18 +00:00
David Anderson 2a0f17c990 - scheduler: if we can't resend a job (e.g. it's for an app
for which the anonymous-platform client doesn't have a version)
    mark it as sent so the transitioner can do its thing


svn path=/trunk/boinc/; revision=25461
2012-03-20 04:36:14 +00:00
David Anderson d677f2c1cd - scheduler: fix a bug in assigning deadlines to resent jobs.
From Kevin.
    NOTE: Kevin also reported a bug that resulted in
    way too large (e.g. year) deadlines.


svn path=/trunk/boinc/; revision=25458
2012-03-19 22:46:00 +00:00
David Anderson 73474ac408 - scheduler: when HR is being used,
make per-HR slot allocation an option rather than the default.
    Kevin reported that slot allocation wasn't working for WCG.
    The default is now no slot allocation,
    and use the regular result enumeration function
    rather than the once that scans the entire table.
    The config flag for enabling slot allocation is <hr_allocate_slots/>.


svn path=/trunk/boinc/; revision=25432
2012-03-15 19:50:10 +00:00
David Anderson 4ce9d9e212 - scheduler: code cleanup for the above
svn path=/trunk/boinc/; revision=25427
2012-03-14 22:42:38 +00:00
David Anderson a16032dee5 - scheduler: add an alternative way of defining app plan functions
that uses an XML configuration file;
    see http://boinc.berkeley.edu/trac/wiki/AppPlanConfig
    From Bernd.


svn path=/trunk/boinc/; revision=25426
2012-03-14 19:53:16 +00:00
David Anderson b155c668fc - transitioner: don't clear a WU's HR and HAV class if there are
timed-out instances; they could still be returned.


svn path=/trunk/boinc/; revision=25420
2012-03-14 07:08:05 +00:00
David Anderson 5c8cdc3957 - scheduler: do homogeneous app version check before rereading WU
as well as after.


svn path=/trunk/boinc/; revision=25419
2012-03-14 06:56:48 +00:00
Bernd Machenschalk 731c551284 scheduler: remove lock file when scheduler caught SIGTERM
svn path=/trunk/boinc/; revision=25402
2012-03-12 09:10:42 +00:00
Bernd Machenschalk 83df8f360b scheduler: fix/augment file_deleter usage message
svn path=/trunk/boinc/; revision=25379
2012-03-05 13:19:47 +00:00
David Anderson 64a371173b - client: fix crashing bug when there is 1 instance of a resources.
I'm not sure how this every worked.


svn path=/trunk/boinc/; revision=25362
2012-03-02 03:56:26 +00:00
David Anderson 127e905e0d - storage stuff. Getting there.
svn path=/trunk/boinc/; revision=25355
2012-02-29 07:22:59 +00:00
David Anderson 516e5ad798 - storage stuff
svn path=/trunk/boinc/; revision=25354
2012-02-29 01:11:28 +00:00
David Anderson f18ffd6fe7 - VDA: add some log messages
- scheduler: add VDA
- client, web: change default prefs to min_buf=.1 days, max_buf=.5 days
- scheduler: app plan function for vbox requires 7.0+ client


svn path=/trunk/boinc/; revision=25351
2012-02-28 06:57:28 +00:00
Rytis Slatkevičius 433770dc16 change antique_file_deleter logic not to delete files that still have workunit records
svn path=/trunk/boinc/; revision=25350
2012-02-27 18:35:07 +00:00
Bernd Machenschalk 9cb28dd25c scheduler: Another feature for debugging the scheduler.
Previously (little known) the scheduler could be hacked to preserve
  the sched_request.xml and sched_reply.xml in own directories
  (you had to modify the initial value of use_files in sched_main.cpp).
  This feature could now be switched on and off on the fly just by
  changing the project config.
  When there is an (existing) directory configured as
  <debug_req_reply_dir>, each schduler instance will write three
  files in there: PID_C_sched.log, PID_C_sched_request.xml and (if all
  goes well) PID_C_sched_reply.xml. PID is the process id of this
  scheduler instance, C is an internal counter within the process if
  FCGI is used. The sched.log will contain nothing else than the
  pid and the IP address of the client. This should allow for
  identifying the scheduler instance responsible for a given
  apache error log message ("premature end of script headers") when
  a scheduler crashed. sched_request.xml (obviously) is the scheduler
  request, and if the scheduler doesn't crash in between, there will
  also be the reply to the client kept in sched_reply.xml
  Remove the <debug_req_reply_dir> tag from the project config
  to turn this feature off.

svn path=/trunk/boinc/; revision=25349
2012-02-27 13:12:24 +00:00
Bernd Machenschalk 3fa88ac1e3 scheduler: the scheduler (stderr) log is buffered to keep the output of
one instance together in the scheduler.log when multiple instances are
  running. Currently the buffer has a fixed size of 32768 charaters.
  On one hand with much debug output this buffer may turn out to be
  too small. OTOH the log of this instance is completely lost in case
  of a crash, which doesn't help with debugging. Thus make the
  scheduler log buffer size configurable using the tag
  <scheduler_log_buffer> in project config. The default value is
  still the old size (32768), set it to 0 to disable buffering
  completely, e.g. for debugging.

svn path=/trunk/boinc/; revision=25348
2012-02-27 12:40:43 +00:00
Bernd Machenschalk d6290ac541 fix typo in previous commit (patch was using old parser)
svn path=/trunk/boinc/; revision=25347
2012-02-27 12:26:46 +00:00
Bernd Machenschalk 5bb86f79b8 scheduler: allow to configure userids for which the scheduler should
not scan the host table. This was previously hardcoded for
  Einstein@home to prevent some users with many (identical) hosts
  from flooding the DB with slow queries. Now add
  <dont_search_host_for_userid>userid</dont_search_host_for_userid>
  to the project config (in config.xml) for each such userid.

svn path=/trunk/boinc/; revision=25346
2012-02-27 12:08:25 +00:00
Bernd Machenschalk df439c128b validator: output the version string even when not in project directory
svn path=/trunk/boinc/; revision=25345
2012-02-27 11:54:02 +00:00
Bernd Machenschalk 7de8d05277 - db_purge: record result and workunit name in index file
svn path=/trunk/boinc/; revision=25344
2012-02-27 11:08:14 +00:00
David Anderson dc4584156d - scheduler: when choosing the best app version,
by default we skip app versions that use a resource
    for which work has not been requested.
    This is determined by the "check_req" arg to get_app_version().
    This flag is cleared whenever we want to send a job
    regardless of whether a requested resource can be used:
    namely, when resending lost jobs, and when sending assigned jobs.

    Fix a bug that could skip unrequested versions even
    when check_req is false.

    NOTES:

    1) The current semantics aren't right.
    When check_req is false, we selected the fastest of all app versions,
    including those for which no work is requested.
    Instead, we should select the fastest of the versions
    for which work is requested if there are any;
    otherwise, select the fastest version.

    2) The mechanism isn't implemented for anonymous platform.
    It should be.

    3) If we've cached an answer (including NULL) for a given
    value of check_req, that answer may be wrong for a different value.


svn path=/trunk/boinc/; revision=25342
2012-02-25 03:54:23 +00:00
David Anderson ce52c9cf3e - storage stuff
svn path=/trunk/boinc/; revision=25341
2012-02-24 22:55:11 +00:00
David Anderson 000dbadc3d - install antique file deleter as periodic task (24 hours)
when create new project


svn path=/trunk/boinc/; revision=25322
2012-02-24 03:26:30 +00:00
David Anderson a8f883d2fa - server: split out the "antique file deletion" feature of
file_deleter.cpp into a separate program,
    since it blocks normal file deletion while it's running.
    From Bernd.
- storage stuff


svn path=/trunk/boinc/; revision=25321
2012-02-24 03:09:56 +00:00
David Anderson 2ed1cfbbb2 - scheduler and create_work: fix bugs that caused targeted jobs
to be sent to non-targeted hosts.
    The feeder was erroneously putting targeted jobs
    in the shared mem cache.
    Changes:
    - The feeder only enumerates jobs for which
        workunit.transitioner_flags is zero.
        NOTE: this field is nonzero iff the job is assigned.
    - create_work: when creating an assigned jobs,
        set workunit.transitioner_flags appropriately


svn path=/trunk/boinc/; revision=25314
2012-02-22 22:13:08 +00:00
David Anderson c2ff0d9719 - scheduler: tell the user if we're not sending work because
VirtualBox is not installed


svn path=/trunk/boinc/; revision=25313
2012-02-22 21:21:15 +00:00
David Anderson c4d1229830 - scheduler: in version selection, when deciding which version is fastest,
we multiple projected FLOPS by a normal random var
    with mean 1 and stddev 0.1.
    Make the stddev configurable; in particular it can be zero.


svn path=/trunk/boinc/; revision=25311
2012-02-22 19:51:09 +00:00
David Anderson f3df549482 - scheduler: fix a couple of assigned-job bugs
(need "where" at start of enumerate() clause!)


svn path=/trunk/boinc/; revision=25299
2012-02-20 21:54:31 +00:00
David Anderson fa11d48f1d - client: message tweaks
- scheduler: fix crash when use <enable_assignment>


svn path=/trunk/boinc/; revision=25296
2012-02-20 19:59:36 +00:00
David Anderson a6bf5aecf3 - client: tweak to work-fetch policy:
if we're making a scheduler RPC to a project for reasons
    other than work fetch,
    and we're deciding whether to ask for work, ignore hysteresis;
    i.e. ask for work even if we're above the min buffer
    (idea from John McLeod).


svn path=/trunk/boinc/; revision=25291
2012-02-18 23:19:06 +00:00
David Anderson 61e169f270 - server: add volunteer data archival to the build system
svn path=/trunk/boinc/; revision=25285
2012-02-17 19:16:49 +00:00
David Anderson 24d386e511 - db_purge: when deleting a workunit record,
delete any assignments that refer to it


svn path=/trunk/boinc/; revision=25284
2012-02-17 18:26:36 +00:00
David Anderson 1b8d6b098d - storage stuff (work in progress)
- small code shuffle


svn path=/trunk/boinc/; revision=25274
2012-02-16 23:59:26 +00:00
David Anderson 14199c7b97 - web: change wording of buffer-size prefs
svn path=/trunk/boinc/; revision=25272
2012-02-16 16:52:07 +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 ba04760fee - scheduler: fix bug that broke broadcast jobs (from Kevin)
svn path=/trunk/boinc/; revision=25258
2012-02-14 16:58:18 +00:00
David Anderson 64608800cb - scheduler: don't send "update GPU driver" messages if
the client didn't report a driver version #


svn path=/trunk/boinc/; revision=25232
2012-02-09 20:34:29 +00:00
David Anderson 8f84416ab7 - scheduler: add log messages to show VM-related request items
- fix typos in db_update script


svn path=/trunk/boinc/; revision=25183
2012-02-02 00:18:42 +00:00
David Anderson 480e28b54c - web: fix the user search feature
- scheduler: parse d_project_share
- scheduler: if vbox and vbox_mt are both available,
    use vbox for a 1-CPU machine


svn path=/trunk/boinc/; revision=25176
2012-02-01 03:30:14 +00:00
David Anderson 130d6ed4f0 - server: revamp the "assigned job" mechanism.
This now supports two main use cases:
    1) there's a job that you want to run once on all hosts,
        present and future
        (or all hosts belonging to a user, or to a team).
        The job is never transitioned, validated, or assimilated.
    2) There's a normal job for which you want to use only
        hosts belonging to a specific user (e.g. cluster or cloud hosts).
        This restriction can be made either when the job is created,
        or on the fly,
        e.g. as part of a scheme for accelerating batch completion.
        For the latter purposes we now provide a function
            restrict_wu_to_user(DB_WORKUNIT&, int userid);

        The job goes through the standard
        transitioner/validator/assimilator path.

    These cases are enabled by config flags
        <enable_assignment_multi/>
        <enable_assignment/>
    respectively.

    Assignment of type 2) are no longer stored in shared mem,
    so there is no limit on their number.

    There is no longer a rule that assigned job names must contain "asgn".

    NOTE: this requires a database update.


svn path=/trunk/boinc/; revision=25169
2012-01-30 22:39:13 +00:00
Rom Walton be9e807e31 - sched: adjust the vbox??_mt plan classes to use 1.5 CPUs instead
of the full 2 CPUs. Vboxwrapper uses ceil() to allocate enough
        whole CPUs for Virtualbox.  Ideally this will cause the BOINC
        client-side scheduler to use the remaining fraction of the CPU
        for GPU data transfer which will then free up one whole CPU for
        another job.  All without over-commiting anything.
        
    sched/
        sched_customize.cpp

svn path=/trunk/boinc/; revision=25120
2012-01-21 18:51:37 +00:00
David Anderson 77086f1c6e - feeder: if we're rereading the DB because of trigger file,
do PERF_INFO::get_from_db() also.
    From Teemu Mannermaa.


svn path=/trunk/boinc/; revision=25114
2012-01-20 23:48:07 +00:00
David Anderson 8cd608605f - feeder fix
svn path=/branches/server_stable/; revision=25113
2012-01-20 23:43:37 +00:00
David Anderson 46fb7bd97a - file deleter: improved logging; from Oliver
svn path=/trunk/boinc/; revision=25050
2012-01-13 23:39:14 +00:00
David Anderson dd16170fc1 - scheduler: the p_fpops value reported by clients can't be trusted.
Some credit cheats (e.g. with credit_by_runtime) can be done
    by reporting a huge value.
    Fix this by capping the value at 1.1 times the 95th percentile
    of host.p_fpops, taken over active hosts.


svn path=/trunk/boinc/; revision=25017
2012-01-09 17:35:48 +00:00
David Anderson 436d56e70b - scheduler: change vbox_mt plan function to use at most 2 cores, not 3
(CERN doesn't actually need 3)


svn path=/trunk/boinc/; revision=25013
2012-01-09 02:48:51 +00:00
David Anderson e8657adfd2 - scheduler: change vbox_mt app plan function to use 1, 2 or 3 CPUs
depending on how many the host has,
    and whether CPU VM extensions are present
    (this reflects the requirements of CernVM).


svn path=/trunk/boinc/; revision=25009
2012-01-08 01:28:39 +00:00
David Anderson 5020e3af2f - validator: for credit_from_runtime,
use result.flops_estimate rather than host.p_fpops;
    otherwise it doesn't work for multicore apps.
    TODO: cheat-proofing


svn path=/trunk/boinc/; revision=25006
2012-01-06 22:22:02 +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 0f46b80985 - scheduler: record Vbox version correctly in host records
- remote job submission: partial checkin for new file sandbox stuff


svn path=/trunk/boinc/; revision=24937
2011-12-29 06:30:18 +00:00
David Anderson df5d595c3a - scheduler, vbox plan class function:
send only 32/64 bit version to 32/64 bit host


svn path=/trunk/boinc/; revision=24916
2011-12-27 02:29:51 +00:00
David Anderson 73eebc69fc - scheduler: we were using CPU time for elapsed time
when the latter wasn't reported.
    Do this BEFORE sanity checks on elapsed time
    to prevent cheating.


svn path=/trunk/boinc/; revision=24906
2011-12-26 14:31:14 +00:00
Rom Walton 94c7b82d3b svn path=/trunk/boinc/; revision=24903 2011-12-26 13:42:34 +00:00
David Anderson fe16024982 - scheduler: in vbox plan class, require that host have
VM acceleration hardware feature
- remove job submission: typo fix


svn path=/trunk/boinc/; revision=24902
2011-12-26 08:27:40 +00:00
David Anderson 4774eeda52 - make_project: don't try to copy nonexistent file; fixes #1166
- scheduler: change Vbox app plan function to accommodate
    single and multithreaded variants


svn path=/trunk/boinc/; revision=24884
2011-12-24 05:07:20 +00:00
David Anderson fe90776614 - scheduler: if an app has only GPU versions,
scale their PFC by 0.1 in credit calculations.
    This reflects the fact that GPU apps are typically less efficient
    (relative to device peak FLOPS) than are CPU apps.
    The actual values from SETI@home and Milkyway are 0.05 and 0.08.


svn path=/trunk/boinc/; revision=24842
2011-12-21 03:21:52 +00:00
David Anderson 0777ab174a - scheduler: if using homogeneous app version and a WU is committed
to a superceded or deprecated app version, use it anyway.
    The current app version may not validate against the old one.


svn path=/trunk/boinc/; revision=24823
2011-12-17 22:11:26 +00:00
David Anderson 5c02170d5a - storage simulator: add stats for network load and fault tolerance.
- client: msg tweak
- client: minimum work buffer lower bound is 180 sec
- scheduler: in computing HOST_USAGE::project_flops for a job,
    if we don't have sufficient elapsed_time statistics
    for either the (host, app_version) or the app_version,
    use a conservative estimate (p_fpops*(#cpus+#ngpus))
    rather than the number returned by app_plan().
    This avoids "time limit exceeded" errors when the latter is way off.


svn path=/trunk/boinc/; revision=24820
2011-12-16 19:45:31 +00:00
David Anderson 1366dc1cdc - scheduler: if using homogeneous app version,
and a WU is committed to an app version that's been superceded,
    treat it as committed to the later version.


svn path=/trunk/boinc/; revision=24776
2011-12-12 22:57:58 +00:00
David Anderson 4e95e690f8 - client: tweak parameters of file xfer backoff to
reduce backoff intervals somewhat
- vboxwrapper: fix buffer size typo (from Attila)
- scheduler: fix crash if using homogeneous app version,
    and a WU is committed to an old or deprecated app version.
    From Kevin Reed.


svn path=/trunk/boinc/; revision=24775
2011-12-12 22:07:37 +00:00
David Anderson 819360dfe8 - scheduler: encode CAL version numbers in a way that handles
release #s > 1000


svn path=/trunk/boinc/; revision=24746
2011-12-06 19:41:14 +00:00
David Anderson 2d7573b8f7 - scheduler: in app_plan(), check for "opencl" before "ati".
Otherwise "opencl_ati" won't get handled right.
    Fixes #1158


svn path=/trunk/boinc/; revision=24716
2011-12-02 14:37:47 +00:00
David Anderson dd93780787 - API and client: add "ncpus" field to APP_INIT_DATA.
Tells multicore apps how many cores to use.
    The --nthreads command line arg to the app is now deprecated
    though we'll keep it around for the time being.


svn path=/trunk/boinc/; revision=24708
2011-12-01 18:44:19 +00:00
David Anderson 4111c5696c - scheduler: fix crashing bug (don't memset SCHED_REQUEST).
svn path=/trunk/boinc/; revision=24660
2011-11-29 04:47:10 +00:00
David Anderson 8877aa5183 - web: in GPU model list page,
look for plan classes containing "nvidia" as well as "cuda".


svn path=/trunk/boinc/; revision=24614
2011-11-16 19:47:40 +00:00
David Anderson 6e1414a07f - scheduler: increase buffer for global prefs from 8K to 64K
- lay the groundwork for changing it to std::string


svn path=/trunk/boinc/; revision=24595
2011-11-15 00:11:12 +00:00
David Anderson 2ac9fe8566 - client/scheduler:
If the file "client_opaque.txt" exists on the client,
    include its contents in scheduler request messages.
    On the scheduler, parse this into SCHEDULER_REQUEST::client_opaque,
    where it can be used by the customizable scheduler functions.


svn path=/trunk/boinc/; revision=24586
2011-11-14 06:27:36 +00:00
David Anderson 56e5a2c089 - scheduler: compute result.report_deadline BEFORE passing it
as an arg to update_wu_on_send()


svn path=/trunk/boinc/; revision=24567
2011-11-09 23:50:09 +00:00
Jeff Cobb 2e526a0956 server: more fixes to DB to handle unsigned result IDs
svn path=/trunk/boinc/; revision=24564
2011-11-09 20:24:48 +00:00
David Anderson 7c201eba3f - DB: use %u when writing result IDs in SQL queries;
this is to support SETI@home, which ran out of result IDs
    and changed the DB field type to int unsigned.
    Note: eventually I'll make this change official
    and change the .h types as well.
- web: put <apps_selected> tags around <app_id> elements
    in project-specific prefs.


svn path=/trunk/boinc/; revision=24555
2011-11-09 07:41:49 +00:00
David Anderson 6d906cf523 - scheduler: fix bug in HR code (from Kevin)
svn path=/trunk/boinc/; revision=24534
2011-11-06 04:53:03 +00:00
David Anderson d53b89fe6f - feeder: fix logic error in the way app_version.pfc_scale is updated
(from Kevin Reed)


svn path=/trunk/boinc/; revision=24514
2011-11-03 07:08:52 +00:00
David Anderson 497c08b5c2 - scheduler: in update_wu_on_send(), always try to update
the hr_class and app_version_id fields,
    with the where clause that they be either zero or the target value.
    This handles the cases where
    1) because of the failure of a results, the transitioner set
        the field back to zero;
    2) another scheduler set the field to the target value


svn path=/trunk/boinc/; revision=24513
2011-11-03 06:46:05 +00:00
David Anderson 690e18bbe3 - server: plan class names containing 'nvidia' or 'cuda'
are assumed to be for NVIDIA GPU apps;
    plan class names containing 'ati' are assumed to be for AMD GPU apps.
    Clauses for 'nvidia' were missing in a couple of places.


svn path=/trunk/boinc/; revision=24512
2011-11-03 05:26:19 +00:00
David Anderson 743d687c05 - scheduler: bug fix from Kevin
svn path=/trunk/boinc/; revision=24503
2011-10-27 03:55:18 +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 2371bd641a - scheduler: typo in a SQL query
svn path=/trunk/boinc/; revision=24498
2011-10-26 22:05:50 +00:00
David Anderson 5d76e13277 - scheduler: tweaks to last night's checkin.
In the inner loop of scan_work_array() there are two WORKUNITs:
    - the one that's part of wu_result (in the shared-mem array)
    - a temp copy.
        quick_check() may modify this in host-specific ways
        (e.g., adjusting rsc_fpops_est or delay_bound).
        This is the one we pass to add_result_to_reply().
    When we reread hr_class and app_version_id from the DB,
    update both structs.


svn path=/trunk/boinc/; revision=24493
2011-10-26 16:51:10 +00:00
David Anderson 4b826b52a0 - scheduler: fix bug in the "homogeneous app version" (HAV) feature
(reported by Kevin Reed).
    The problem: cache inconsistency.
    If there are 2 results for the same WU in shared mem,
    and 2 scheduler instances get them around the same time,
    they can send them with different app versions.
    We already fixed this problem for HR by
    1) rereading the relevant WU fields while deciding
        whether to send the result
    2) doing a "careful update" of the WU field using a where clause
        to make sure it wasn't modified in the (short) interval
        since rereading it.
    I fixed the HAV problem in the same way,
    and merged the two mechanisms to combine the DB queries.

    Also:
    - The rereads are done in slow_check() (see below).
    - The careful updates are done in update_wu_on_send(),
        and this is called *before* doing careful updates on result fields.
        That way, if the WU updates fail, we don't have orphaned results.
    - already_sent_to_different_platform_careful() (sic)
        no longer does DB stuff, so it's merged with
        already_send_to_different_hr_class() (better name)

    NOTE: slow_check() is used in array scheduling only.
        Score-based scheduling uses other code,
        in which this bug is not yet fixed.
        Locality scheduling doesn't support HR or HAV at all.
        This should be unified.


svn path=/trunk/boinc/; revision=24484
2011-10-26 07:15:22 +00:00
David Anderson 836e8aacf7 - scheduler: in cuda_check(), ati_check() and opencl_check()
(in sched_customize.cpp)
    the flops_scale argument is intended to express the
    GPU efficiency (actual/peak).
    Pass appropriate values.


svn path=/trunk/boinc/; revision=24405
2011-10-16 06:04:13 +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 b1456cfc0b - scheduler: fix a bug that would choose app versions erroneously.
The problem: the choice of app version was based on
    the "projected FLOPS" return by estimate_flops(av).
    If usage stats exist for the host / app version,
    this returns a number X such that
    WU.rsc_fpops_est/X approximates the runtime of a job
    using the given app version..
    (If WU.rsc_fpops_est is way off, this will be correspondingly way off
    from the actual FLOPS the app version will get.)
    However, if there are no usage stats,
    it return an estimate based on host hardware speed,
    which might be 100X less.
    Hence, in some cases a new app version would never get used.

    Solution: choose app versions based on the values
    returned by the app plan functions.
    Use estimate_flops() AFTER choosing the version.
- scheduler: improve the accuracy of FLOPS estimation for GPU apps.
    The "flops_scale" argument to coproc_perf
    (which expresses the difference between peak GPU FLOPS
    and actual FLOPS) should be used to scale GPU FLOPS
    prior to calling coproc_perf(),
    rather than scaling the estimate returned by coproc_perf().
- show_shmem: show have_X_apps flags


svn path=/trunk/boinc/; revision=24385
2011-10-12 23:59:38 +00:00
David Anderson cb3cdae1a5 - client/server: add a new result state RESULT_UPLOAD_FAILED
for when the job completed successfully but
    one or more output files had permanent upload failures.
    Show this state in web interfaces.
- sample_work_generator: check return value of count_unsent_results(),
    so that we don't generate infinite work if there's a DB problem
- web: RSS feed shows news items from last 90 days, rather than 14


svn path=/trunk/boinc/; revision=24377
2011-10-11 17:41:10 +00:00
David Anderson e00b080b5e - scheduler: fix crashing bug when using HR. From Kevin Reed.
svn path=/trunk/boinc/; revision=24355
2011-10-08 08:16:24 +00:00
David Anderson dd3b628748 - client: compare OpenCL-only devices the same as other devices
- code cleanup


svn path=/trunk/boinc/; revision=24354
2011-10-08 06:33:39 +00:00
David Anderson 279c3a2b37 - scheduler: problem: in the daily quota mechanism,
the boundary between days is 00:00 in server local time.
    This creates a spike of jobs being dispatched
    (and files being downloaded) after that time.

    Solution: distribute the boundary uniformly,
    using a random number determined by the host ID.
    (Make sure to save/restore the seed around this,
    so we don't destroy the randomness of other things)


svn path=/trunk/boinc/; revision=24353
2011-10-08 05:17:44 +00:00
David Anderson 6da80764fc - scheduler add app_plan() support for plan classes
opencl_nvidia_101 and opencl_ati_101


svn path=/trunk/boinc/; revision=24345
2011-10-07 19:23:37 +00:00
David Anderson 3acc4fa77d - client/server: change field names in OPENCL_DEVICE_PROP
to match those in the clGetDeviceInfo() calls.
    Principles:
    - if there's already a name for something, use it.
    - follow case conventions


svn path=/trunk/boinc/; revision=24344
2011-10-07 18:11:52 +00:00
David Anderson ae3d5a85dd - scheduler: fix bug that caused scheduler to not send GPU jobs
svn path=/trunk/boinc/; revision=24338
2011-10-06 02:56:30 +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 c84ede6156 - scheduler: record VirtualBox version # in the host table
svn path=/trunk/boinc/; revision=24327
2011-10-04 03:33:04 +00:00
David Anderson c2cdaacf89 - scheduler: fix bugs that broke work fetch for anonymous platform;
don't send irrelevant messages to anon platform clients


svn path=/trunk/boinc/; revision=24326
2011-10-03 23:43:53 +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 61dc940872 - validator: add runtime_outlier message
svn path=/trunk/boinc/; revision=24229
2011-09-16 21:30:21 +00:00
David Anderson d8f20bceea - vboxwrapper: report network usage to the client
- client: include the above in enforcing network quota preferences


svn path=/trunk/boinc/; revision=24227
2011-09-16 19:16:12 +00:00
David Anderson e49f945908 - Validator: allow project-specific code to mark a result
is a "runtime outlier", i.e. its runtime does
    not correspond to the job's rsc_fpops_est.
    Runtime outliers are not counted in the statistics for
    elapsed time, turnaround time, and peak FLOPs count.

    The is intended for applications like SETI@home,
    some of whose jobs finish more or less instantly
    (this happens if the data contains a lot of interference).
    If a host happens to get a bunch of these short jobs,
    its statistics will get skewed: in essence, the server
    will think that the host is extremely fast,
    and will send it too many jobs.


svn path=/trunk/boinc/; revision=24225
2011-09-16 16:43:15 +00:00
David Anderson a4cccec2cc - scheduler: revise [21428] to include non-anonymous-platform,
and change the ratio limit from 2 to 10.


svn path=/trunk/boinc/; revision=24217
2011-09-15 06:53:01 +00:00
David Anderson 49a7287949 - scheduler: in app_plan functions for GPUs,
use available RAM if reported by client;
    otherwise use physical RAM.


svn path=/trunk/boinc/; revision=24216
2011-09-15 04:28:21 +00:00
David Anderson 7411dd60aa - client: change in the use of GPU available RAM:
- measure the available RAM of each GPU when BOINC starts up.
        If this fails, set available = physical.
        Show available RAM in startup messages.
    - use available RAM rather than physical RAM in selecting
        the "best" GPU instance
    - report available RAM to the scheduler
TODO: change the scheduler to use available rather than physical
    if it's reported


svn path=/trunk/boinc/; revision=24210
2011-09-14 22:45:26 +00:00
David Anderson 176b0a4327 - validator: add a --credit_from_runtime option.
This assigns credit proportional to runtime*p_fpops.
    To prevent cheating, p_fpops is capped at the 95th percentile value
    among active hosts,
    and runtime is capped at a specified limit.
    This option supports apps, like LHC's CERNvm app,
    that run for a certain amount of time and then exit.
    The CreditNew system doesn't work for such apps.
- trickle_credit:
    To prevent cheating,
    cap p_fpops at the 95th percentile value among active hosts,
    and require a limit on runtime.
- require that trickle handlers supply an initialization function


svn path=/trunk/boinc/; revision=24182
2011-09-13 21:01:42 +00:00
David Anderson 048c6a48a4 - validator: add --no_credit option;
maintains stats but doesn't grant credit


svn path=/trunk/boinc/; revision=24175
2011-09-13 05:23:10 +00:00
David Anderson 826cd355e5 - validator: old scheduler bugs may cause result.flops_estimate
to be negative in some cases.
    Detect this, and use 1e10 instead


svn path=/trunk/boinc/; revision=24146
2011-09-08 19:36:14 +00:00
David Anderson 760c16eb03 - scheduler: in work_needed(), ignore requests for resource
types for which we have no app versions
- client: if too many <coproc> elements in cc_config.xml,
    detect it and inform user


svn path=/trunk/boinc/; revision=24144
2011-09-08 18:55:55 +00:00
David Anderson 249435f0d8 - scheduler: fix crashing bug
svn path=/trunk/boinc/; revision=24139
2011-09-07 17:37:50 +00:00
David Anderson 8870839583 - scheduler: use new XML parser for most request elements
- scheduler: parse NVIDIA as well as CUDA in app version descriptions
    (workaround for recent clients)


svn path=/trunk/boinc/; revision=24136
2011-09-06 22:53:48 +00:00
David Anderson 248282685e - scheduler: add a debug message
svn path=/trunk/boinc/; revision=24134
2011-09-06 19:34:15 +00:00
David Anderson 7c81d72378 - web: fix warnings in forum pages
- scheduler: when using elapsed time stats to predict runtime,
    cap the estimated FLOPS at twice the peak FLOPS;
    otherwise, if a host has received a lot of very short jobs
    recently, it will get a too-high FLOPS estimate and
    will exceed the rsc_fpops_bound limit.


svn path=/trunk/boinc/; revision=24128
2011-09-05 17:29:53 +00:00
David Anderson c529c3c50d - server: rename process_wu_template() to process_input_template(),
and move it to its own file


svn path=/trunk/boinc/; revision=24107
2011-09-01 19:58:27 +00:00
David Anderson a427bc43a6 - scheduler: make sure there's a \n after </workunit> and </result>.
Otherwise older clients won't be able to parse.


svn path=/trunk/boinc/; revision=24098
2011-08-31 18:52:57 +00:00
David Anderson 9b89168c49 - validator: in "credit_from_wu" case, record what the new credit
system would have assigned in result.claimed_credit.

svn path=/trunk/boinc/; revision=24088
2011-08-30 22:28:52 +00:00
David Anderson 1bf54d11ff - client: send all running jobs a "reread app info" message
when global prefs change
    (they might have to suspend or resume network activity)


svn path=/trunk/boinc/; revision=24084
2011-08-30 21:34:27 +00:00
David Anderson 0059d6bf78 - scheduler: don't send user a message when there is no
app version for their platform for a particular app.
    The may be versions for other apps which don't have jobs right now.
    TODO: send a message if there are no versions of ANY app
    for any platform.
- fix makefile indentation, caused manager to not be built


svn path=/trunk/boinc/; revision=24052
2011-08-27 02:54:39 +00:00
David Anderson 4d45dda3d9 - validator: update credit statistics even if credit_from_wu
is being used.
- web: make almost everything translatable.  From Christian Beer.


svn path=/trunk/boinc/; revision=24048
2011-08-25 22:12:48 +00:00
David Anderson 289bd16269 - client emulator fixes
svn path=/trunk/boinc/; revision=24024
2011-08-22 15:07:59 +00:00
David Anderson c3649f289b - add script to purge trickle message records from DB
- fix spelling errors in db_purge


svn path=/trunk/boinc/; revision=24019
2011-08-21 13:26:46 +00:00
David Anderson 3dc556680a - credit trickle handler: write log messages if sanity checks fail
svn path=/trunk/boinc/; revision=24018
2011-08-21 11:57:00 +00:00
David Anderson 8fda6c0497 - Vbox wrapper: add --trickle x option; sends a trickle-up message
reporting incremental runtime exery x seconds of runtime.
- client: more XML parsing cleanup
- credit trickle handler: do sanity checks on CPU speed


svn path=/trunk/boinc/; revision=24017
2011-08-21 11:18:08 +00:00
David Anderson fe25a92739 svn path=/trunk/boinc/; revision=24016 2011-08-19 16:19:52 +00:00
David Anderson d379f8e471 - scheduler: update XML parsing
svn path=/trunk/boinc/; revision=23994
2011-08-11 21:15:42 +00:00
David Anderson c5c5975b44 - Improve interface of XML_PARSER.
Add parsed_tag and is_tag to the class,
    so that parsing functions don't need to declare them
    and pass them around.
- Complete the task of using XML_PARSER as the argument
    to all parsing functions.
    (Internally, many of these functions still use the old XML parser;
    that's the next step.)


svn path=/trunk/boinc/; revision=23978
2011-08-10 17:11:08 +00:00
David Anderson 578d5f924f - scheduler: fix nasty bug where SCHED_DB_RESULT::parse()
was doing memset(this, 0, sizeof(RESULT)),
    i.e. it wasn't zeroing out the whole structure.
    The elapsed_time field (which isn't reported by old clients),
    is near the end of the struct,
    and it was getting garbage, e.g. 1e-304, in some cases,
    which led to zero credit (and maybe other problems)
- validator: treat 1e-304 like zero in case of other problems
    like the above.
- remote job submission: tweaks


svn path=/trunk/boinc/; revision=23947
2011-08-08 04:37:53 +00:00
David Anderson 533b4b88e1 - scheduler: turns out we need separate vbox32 and vbox64
plan classes after all.
    Otherwise (since app_plan() is not passed an app version)
    there's no way to enforce that 64 bit hosts are sent
    only the 64 bit version (which is necessary because
    of the split-registry scheme).


svn path=/trunk/boinc/; revision=23935
2011-08-04 18:06:14 +00:00
David Anderson f3b9286d78 - client: fix bug in get_descendants(),
which prevented the client from cleaning up
    subprocesses of misbehaving multiprocess apps.
- remote job submission system:
    assign physical names to input files (based on their MD5)
    rather than having the user provide physical names
- VM apps: eliminate vbox64 plan class.  Only vbox.


svn path=/trunk/boinc/; revision=23923
2011-08-03 16:45:00 +00:00
David Anderson 8837274aae - scheduler: check for negative elapsed time in results
reported by client, set to zero


svn path=/trunk/boinc/; revision=23909
2011-07-31 17:31:12 +00:00
David Anderson 3c70004c5c - server: debug distributed storage functions
- generate upload signatures if needed
    - assign deadlines to file xfer jobs (default 1 week)
    - scheduler: ack completed file xfer results


svn path=/trunk/boinc/; revision=23866
2011-07-20 22:27:01 +00:00
David Anderson e64fd15e05 - server: debug the above
svn path=/trunk/boinc/; revision=23864
2011-07-20 20:48:25 +00:00
David Anderson 9a4140ae30 - client/server: change the implementation of upload signatures
as described here: http://boinc.berkeley.edu/trac/wiki/ClientDataModel
    Compatibility: if your project is using upload signatures:
        - set ignore_upload_certificates
        - disable job creation
        - let your job queue drain
        - upgrade to new server software
        - clear ignore_upload_certificates
        - enable job creation


svn path=/trunk/boinc/; revision=23863
2011-07-20 20:08:05 +00:00
David Anderson 27e05a3da9 - server: some stuff to prepare for distributed storage
- don't create result records for uploads and downloads.
        Just create a msg_to_client record.
    - the scheduler handles file-transfer results specially;
        it makes a vector of them, then calls a project-supplied function
        handle_file_xfer_results()
    - change the interface and implementation of put_file and get_file
- client write project sched priority in GUI RPC replies,
    but not to the state file


svn path=/trunk/boinc/; revision=23857
2011-07-19 20:52:41 +00:00
David Anderson d1be15b9fb - validator: remove spurious messages
svn path=/trunk/boinc/; revision=23855
2011-07-19 18:48:03 +00:00
David Anderson 8ca24cbbab - client, work fetch policy:
adjust project REC by the amount of work queued, to increase variety
    NOTE: at some point I think I had a reason to not do this,
    but I can't remember what it is.
- client, job scheduling policy: fix how project REC is adjusted


svn path=/trunk/boinc/; revision=23838
2011-07-13 19:46:03 +00:00
David Anderson f44c9910e7 - validator: if job FLOPs estimates are accurate,
PFC values should be around 1.
    If they differ from 1 by a factor of > 1e4, ignore them,
    and put an error message into the validator log
- validator: if get_pfc() fails because an app version is
    missing from the DB (i.e. the project deleted it)
    keep going so we don't reprocess the WU forever


svn path=/trunk/boinc/; revision=23837
2011-07-12 20:44:28 +00:00
David Anderson 62074bd4fa - client emulator web interface: make cc_config.xml an attribute
of the simulation, not the scenario.
    If you want to run a simulation w/ different log flags,
    you shouldn't have to create a new scenario.
- client emulator: add --config_prefix cmdline arg
- validator: prevent infinite loop when app_version.pfc_avg
    is wonky (like 1e-300).
    Next step: figure out how it got that way.


svn path=/trunk/boinc/; revision=23828
2011-07-10 07:05:07 +00:00
David Anderson 3b73c8dc0a - db_purge: make zip compression work (from Teemu Mannermaa)
- get rid of a few compile warnings


svn path=/trunk/boinc/; revision=23789
2011-07-01 02:12:11 +00:00
David Anderson 94e8c48220 - client: change --detach_phase_two (??) to --detach_console
- eliminate compiler warnings (e.g. shadowed vars)
    in various places, mostly in client


svn path=/trunk/boinc/; revision=23710
2011-06-12 20:58:43 +00:00
David Anderson 9cfb88c3ea - scheduler: when creating HOST_APP_VERSION records,
initialize the n_jobs_today field correctly


svn path=/trunk/boinc/; revision=23637
2011-06-06 04:10:59 +00:00
David Anderson 436415cfe1 - scheduler, back end: add "homogeneous app version" feature.
Lets you specify, on a per-app basis,
    that all instances should be done using the same app version.
    This is for validation in the presence of GPUs.
- scheduler: code cleanup
    - Instead of adding a bunch of non-DB fields to RESULT,
        used a derived class SCHED_DB_RESULT.
    - Instead of storing a pointer to BEST_APP_VERSION in RESULT,
        store the structure itself.
        This simplifies the memory allocation situation.
- client: condition "Got server request to delete file" messages
    on <file_xfer_debug>


svn path=/trunk/boinc/; revision=23636
2011-06-06 03:40:42 +00:00
David Anderson 86205059cd - scheduler: app version FLOPS estimates were wrong
in the case where we don't have enough elapsed-time stats
    for the host/app_version.
    The right formula is (peak FLOPS)/app_version.avg_pfc


svn path=/trunk/boinc/; revision=23634
2011-06-03 19:53:52 +00:00
David Anderson 1afde126cb - client: escape only non-ASCII chars in stderr out, not control chars
svn path=/trunk/boinc/; revision=23601
2011-05-25 16:40:19 +00:00
Rom Walton 5c2367caf2 - scheduler: unescape the stderr_out field after parsing so we do not break
other applications parsing the data.
        
    sched/
        sched_types.cpp

svn path=/trunk/boinc/; revision=23600
2011-05-25 15:39:35 +00:00
David Anderson 6d1133fb1d - scheduler: add <user_filter> config option.
If set, and a WU has nonzero batch,
    it is interpreted as a user ID,
    and the job will be sent only to hosts with that user ID.

    Note: the use of workunit.batch is arbitrary;
    we could also use workunit.opaque or other deprecated field.


svn path=/trunk/boinc/; revision=23556
2011-05-17 21:11:39 +00:00
David Anderson 8a4c3dccf3 - scheduler: if an in-progress limit is given in config_aux.xml,
and <per_proc> is not specified, default it to false.
- scheduler: add some log messages


svn path=/trunk/boinc/; revision=23555
2011-05-17 19:11:44 +00:00
David Anderson a2fc8edcae - scheduler: per-processor limits should be based on
"effective" # of processors (taking prefs into account)
    rather than the physical number


svn path=/trunk/boinc/; revision=23547
2011-05-13 22:04:10 +00:00