Commit Graph

23 Commits

Author SHA1 Message Date
David Anderson ef82d5d9fb server: fix compile error on systems that don't define MAXPATHLEN 2013-08-22 17:01:45 -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 b9f0733c06 server: replace strcpy() with strlcpy() various places 2013-06-03 22:42:53 -07:00
David Anderson 0c430ce1fa Add support for multi-size apps
See http://boinc.berkeley.edu/trac/wiki/MultiSize
The components of this include:
- DB changes:
    add size_class to workunit and result
    n_size_classes to app; >1 means multi-size
- size_regulator daemon program: change results states
    from INACTIVE to UNSENT carefully
- size_census program; writes quantile info in flat files
- transitioner: when creating results for multi-size apps,
    set server state to INACTIVE
- sched shmem (feeder): read quantile info from flat files,
    store in shared memory
- scheduler (score-based scheduling): for multi-size apps,
    add component to score function for size class.
- show_shmem: show result size class
- make_work (and other callers of count_unsent_results()):
    count both INACTIVE and UNSENT
- create_work: add --size_class cmdline option

Also:
- if get MySQL errors in upgrade, don't rewrite db_version
2013-04-25 00:27:35 -07:00
David Anderson 8b25f8ccdc - job submission: show batch priority in web page;
add priority stuff to example job submission script
2013-03-04 17:44:39 +01:00
David Anderson 19458ba4de - Compile fixes for Fedora core 17. From Christian B. Fixes #1194.
- Fix various #include issues.

CODING STYLE LAW (minimal inclusion principle):
    If foo.cpp requires <blah.h>,
    #include <blah.h> in foo.cpp, NOT foo.h


svn path=/trunk/boinc/; revision=25837
2012-07-02 18:51:02 +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 f12e82917f - back end: print error messages instead of numbers in several places
svn path=/trunk/boinc/; revision=25584
2012-04-20 17:23:07 +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 004c5692e3 - create_work tool: change option names for assigned jobs
- admin web: show actual platform name in result summary page


svn path=/trunk/boinc/; revision=25175
2012-01-31 20:25:26 +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
David Anderson bba4ce24ce - client: compute projects' disk share (based on resource share).
Report it (along with disk usage) in scheduler request messages.
    This will allow the scheduler to send file-delete commands
    if the project is using more than its share.
- client: add <disk_usage_debug> log flag
- create_work: add --help, show --command_line option


svn path=/trunk/boinc/; revision=24968
2012-01-02 05:53:42 +00:00
David Anderson 5ad821df21 - server: some remote job submission code. Not finished.
svn path=/trunk/boinc/; revision=23868
2011-07-22 22:47:41 +00:00
David Anderson 8a9605e48c - web: add a web-service interface for remotely submitting, querying
and controlling batches of jobs
- web: add an administrative interface for controlling
    user permissions for submitting jobs
- web: add an interface where users can view and control
    their submitted jobs
See: http://boinc.berkeley.edu/trac/wiki/RemoteJobs
This is at a functional but rough stage.


svn path=/trunk/boinc/; revision=23762
2011-06-21 22:56:15 +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 8c3ce79b2a - create_work: add -d option
svn path=/trunk/boinc/; revision=22979
2011-02-02 00:42:46 +00:00
David Anderson 7baddb24e3 - Fix bugs in Rappture wrapper
- Add README file and templates for Rappture wrapper
- create_work: create defaults for --wu_name, --wu_template, --result_template
- user web: fix typo on workunit.php

svn path=/trunk/boinc/; revision=22826
2010-12-07 19:28:08 +00:00
David Anderson 7ac7bdcb04 - scheduler: message tweak
svn path=/trunk/boinc/; revision=22384
2010-09-17 22:01:42 +00:00
David Anderson 7c51512cbf - transitioner: the format string for a DB query had %.15d instead of %.15e.
That produced a messed-up query that assigned garbage values to:
        host_app_version.turnaround_var
        host_app_version.turnaround_q
        host_app_version.max_jobs_per_day
        host_app_version.consecutive_valid
    To repair these:
        - set turnaround_var and turnaround_q to zero
        - if max_jobs_per_day is outside of
            (0..config.daily_result_quota)
            set it to config.daily_result_quota
        - if consecutive_valid is outside (0..1000), set it to zero
    I added a script, html/ops/repair_21812.php, that does this;
    if you ran server code between [21181] and [21812], run this script.
- scheduler/transitioner: add <debug_quota> log flag
- changed the build system to always use -Wall
    (if we'd done this before, this bug wouldn't have happened)
- fixed a bunch of other compile warnings


svn path=/trunk/boinc/; revision=21812
2010-06-25 18:54:37 +00:00
David Anderson 381a15c724 - create_work function and script:
check for valid ordering among max_success_results,
    max_total_results, max_error_results, and target_nresults

svn path=/trunk/boinc/; revision=19054
2009-09-16 03:10:22 +00:00
David Anderson 12eb6057e5 - client, Mac: don't do res_init(). It causes a crash.
- client (Unix): if client crashes while benchmark processes are going,
    make sure they detect this and exit.
- back-end programs: remove hardwired assumptions about
    what directory they run in, and hence where config.xml is.
    E.g., daemons look for it in "..", others expect it in current dir.
    New approach: all the programs look for the project dir as follows:
    1) the environment var BOINC_PROJECT_DIR, if defined
    2) the current dir, if config.xml is there.
    3) else ".."
    This means you can run programs in either proj/bin/ or proj/,
    or (using BOINC_PROJECT_DIR) you can keep executables
    outside of the project dir.


svn path=/trunk/boinc/; revision=18042
2009-05-07 13:54:51 +00:00
David Anderson f90871a141 - boinc_submit (single-job submission):
set the job params to reasonable values (see below),
    and make it easy to change these values in the script
- create_work (function and script): change default job params:
    FLOPs est: 1e9 => 3600e9
    FLOPs bound: 1e10 => 86400e9
    mem bound 100MB => 500MB,
    disk bound 100MB => 1GB
    delay bound: 100000s => 1 week

svn path=/trunk/boinc/; revision=17703
2009-03-30 18:38:11 +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