Commit Graph

174 Commits

Author SHA1 Message Date
David Anderson 9ccb8fa38d - scheduler: add support for limited locality scheduling
- API: remove support for PPM files


svn path=/trunk/boinc/; revision=26062
2012-08-27 17:00:43 +00:00
David Anderson 32da1a7e37 - server: add support for having a mixture of CPU-intensive
and non-CPU-intensive applications.
    An app can be specified as non-CPU-intensive in project.xml,
    and this attribute can be set or cleared using the admin web interface.
    Note: support for this was added to the client in 2011,
    but we didn't add server-side support at that time.
    This change is in 6.12 and later clients.


svn path=/trunk/boinc/; revision=26060
2012-08-25 04:09:24 +00:00
David Anderson 158aab8d5c - DB: add project_state and description fields to batch table.
Both are for use by project.
- job submission file sandbox: don't delete physical file
    when delete sandbox entry.
    We'll have to figure out how to garbage-collect physical files.
- LAMMPS job submission:
    use the 50th-percentile host,not 0th


svn path=/trunk/boinc/; revision=25734
2012-06-05 05:57:55 +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 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 75c6032043 - fix typo in DB schema
- msg tweaks in make_project


svn path=/trunk/boinc/; revision=24253
2011-09-22 03:15:21 +00:00
David Anderson 9d2ba11e09 - back end: extend the access control system for remote job submission
and other operations.
    You can now designate a user as "manager" for a particular app.
    They can then:
    - control job-submit permissions for that app
    - deprecate/undeprecate versions of the app.
    - abort jobs for that app

    You can also designate a user a manage for the project.
    They can then edit permissions and quotas,
    as well as performing the app-specific functions for all apps.

    This is described here:
    http://boinc.berkeley.edu/trac/wiki/MultiUser#Accesscontrol

    This required some changes to the DB schema.


svn path=/trunk/boinc/; revision=24250
2011-09-21 21:26:00 +00:00
David Anderson 8c49c174c3 - preliminary stuff for mechanism where privileged users
can create apps and app versions
- crontab commands should be preceded by cd to project root


svn path=/trunk/boinc/; revision=24137
2011-09-07 06:54:44 +00:00
David Anderson 6e5acbbe60 - web: remote job submission:
- add fields to batch table, extend APIs accordingly
    - require that example web interface run on BOINC server
        (this makes many things easier;
        an actual remote interface would require a bit more work)


svn path=/trunk/boinc/; revision=23881
2011-07-27 06:20:48 +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 61cbe110ef - web: when creating an item in News forum,
show "Export as Notice?" checkbox, and default to off.


svn path=/trunk/boinc/; revision=23721
2011-06-14 05:42:52 +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 0bc1a36451 - user web: add a feature allowing project admins to control
whether news items are exported as notices.
    The creator of a news item is shown a "Don't export" or "Export"
    button on the thread page.
    By default, news items are exported.


svn path=/trunk/boinc/; revision=23119
2011-02-28 19:02:59 +00:00
David Anderson c0612ab77f - make_project: with --test_app, copy all the executables
(for many platforms) from samples/example_app/bin
- make_project: change name of example app from uppercase to example_app.
- update_versions: allow version numbers to not have decimal points
- sample work generator: make app name and template files
    command-line options;
    default to "example_app", "example_app_in.xml", "example_app_out.xml"

svn path=/trunk/boinc/; revision=22667
2010-11-10 00:10:32 +00:00
David Anderson e260b47bd5 - database: app.min_avg_pfc should default to 1, not 0
svn path=/trunk/boinc/; revision=21763
2010-06-17 16:44:33 +00:00
David Anderson 4147249de2 - server: delete old credit stuff
- user web: show host link in user result list.  Fixes #999


svn path=/trunk/boinc/; revision=21735
2010-06-12 22:08:15 +00:00
David Anderson 8b836a391b - database: remove unused fields from app table
svn path=/trunk/boinc/; revision=21728
2010-06-11 03:50:47 +00:00
David Anderson 5035007b90 - back end: new way of deciding:
- whether host is "reliable" for an app version
    - whether host is eligible for single replication for an app version
    - whether to use host scaling
    In each case, the answer is yes if the number of
    consecutive valid results is above a threshold.
    This replaces existing "error rate" and "scale probation" mechanisms.

    TODO: the # of consecutive valid results should also determine
        a limit on jobs in progress for an app version.
        Namely, if N is the threshold for host scaling, the limit should be
            ndevices*(max(1, consecutive_valid - N))
        The client currently doesn't supply enough
        app version info to do this.
        It could be approximated; that would give some protection
        against cherry-picking.
- credit: more conservative formulas for combining claimed credit
    among replicas.
    If there are normal replicas, we use a "low average"
    that weights each sample by the sum of the other samples.
    Otherwise we use the min (not the average) of the approximate samples.

NOTE: a DB update is required


svn path=/trunk/boinc/; revision=21230
2010-04-21 19:33:20 +00:00
David Anderson fb851311e0 - server: various changes;
see http://boinc.berkeley.edu/trac/wiki/CreditNew

    Projects will need to update DB and recompile all back-end programs.

    Summary:
    - new way of computing credit
    - "reliable host" mechanism is per app version
    - "host punishment" mechanism is per app version
    - adjustment of wu.rsc_fpops_est provides the
        equivalent of per app version DCF
    - max jobs in progress is now per app
    - max jobs per RPC is now per app

    TODO:
    - reliable mechanism:
        - populate and use host_app_version.error_rate
        - populate host_app_version.turnaround
    - host punishment:
        - populate host_app_version.max_jobs_per_day
        - populate host_app_version.n_jobs_today
        - use app.max_jobs_per_day_init
    - job limits:
        - use app.max_jobs_in_progress, max_gpu_jobs_in_progress
        - use app.max_jobs_per_rpc
    - adjust wu.rsc_fpops_est
    - remove old credit stuff
        fpops_cumulative, credit_multiplier
        credit computation in scheduler

- AVERAGE class: use the Knuth algorithm (Wikipedia)


svn path=/trunk/boinc/; revision=21021
2010-03-29 22:28:20 +00:00
David Anderson 836b935234 - fix bugs in strcasestr(), which apparently had never been tested
- fix typo in schema

svn path=/trunk/boinc/; revision=20923
2010-03-16 17:20:14 +00:00
David Anderson 3452bbbc87 - GUI RPC: more replacement of std::string
svn path=/trunk/boinc/; revision=20889
2010-03-13 04:40:37 +00:00
David Anderson 0ad0886df3 - server credit stuff.
New policy: anon platform and old platform jobs
    get average credit, possibly scaled by elapsed time.
    We no longer attempt to guess what app version produced them.

svn path=/trunk/boinc/; revision=20816
2010-03-10 00:33:31 +00:00
David Anderson 8062f21d59 - server credit stuff (partial checkin)
svn path=/trunk/boinc/; revision=20810
2010-03-09 04:15:10 +00:00
David Anderson 295d4b54ea - server: major improvements to locality scheduling from Einstein@home.
Triggering the work generator is now done via the DB
    instead of flat files.

    Since only E@h uses locality scheduling,
    I kept the DB changes in a separate file (db/schema_locality.sql).
    There's a new field in the workunit table,
    and that's a required update (in db_update.php)
- manager: compile fix


svn path=/trunk/boinc/; revision=20807
2010-03-05 22:55:16 +00:00
David Anderson 65b581b28d svn path=/trunk/boinc/; revision=20316 2010-01-29 16:28:46 +00:00
David Anderson c76d166344 - user web: forum_preferences.{low_rating_threshold, high_rating_threshold}
were deprecated, but were still used in deciding whether to show a post.
    This broke the "ignore list" function.

svn path=/trunk/boinc/; revision=19218
2009-09-29 21:58:54 +00:00
David Anderson da7e82fe15 - scheduler and back end: add new fields to result table:
elapsed_time: the elapsed time (runtime) as reported by client
    flops_estimate: the app's estimated FLOPS as reported by app_plan()
    app_version_id: the DB ID of the app_version used
        (or -1 if anonymous platform)
    TODO: show these in the web interfaces,
    and use them where appropriate

svn path=/trunk/boinc/; revision=19002
2009-09-03 20:26:31 +00:00
David Anderson 12d4b978be - scheduler: if client request uses a weak authenticator,
don't modify user preferences or CPID.
- client: fix bug that shows ATI version incorrectly
- database: host.posts has been repurposed as a salt (or seqno)
    for a new type of weak authenticator that won't depend on password
- web code:
    modify forum_preferences.posts instead of host.posts.
    (actually, the former isn't used either, we just do a select count(*);
    should fix this at some point).

svn path=/trunk/boinc/; revision=18865
2009-08-18 20:44:12 +00:00
David Anderson 8dc464f1e4 - fix typo in schema
svn path=/trunk/boinc/; revision=18506
2009-06-27 21:10:40 +00:00
Jeff Cobb 15ccf7b778 Added table state_counts.
svn path=/trunk/boinc/; revision=18490
2009-06-23 21:45:22 +00:00
David Anderson c86419a9ff - DB: for tables w/ fulltext indices, specify engine as MyISAM
from Nicolas; fixes #904

svn path=/trunk/boinc/; revision=18201
2009-05-26 16:56:00 +00:00
David Anderson 3f67133c9b - forgot to add team.joinable to schema.sql
svn path=/trunk/boinc/; revision=16229
2008-10-17 18:08:26 +00:00
David Anderson 33ad1b3d40 - Added the above DB change to schema.sql
- Omit the "after" clause from update.
- Web: add missing arg; fixes #749
- server: more --help additions

svn path=/trunk/boinc/; revision=16136
2008-10-06 00:18:36 +00:00
David Anderson b5b3fd43b7 - scheduler: make credit_multiplier stuff conditional on
<use_credit_multiplier> flag in config.xml

svn path=/trunk/boinc/; revision=15766
2008-08-06 23:30:22 +00:00
Eric J. Korpela a5a6f693cd - Implementation of automatic credit leveling for cpu based projects that
wish to use it.
- The script calculate_credit_multiplier (expected to be run daily as
      a config.xml task) looks at the ratio of granted credit to CPU time 
      for recent results for each app.  Multiplier is calculated to cause 
      median hosts granted credit per cpu second to equal to equal that 
      expected from its benchmarks.  This is 30-day exponentially averaged 
      with the previous value of the multplier and stored in the table 
      credit_multplier.
- When a result is received the server adjusts claimed credit by the
      value the multiplier had when the result was sent.


svn path=/trunk/boinc/; revision=15661
2008-07-22 23:36:55 +00:00
David Anderson 0e03df254b - Back end: add adaptive validation feature
(DB update required)
- Fixed typo in Eric's 5/28 checkin

svn path=/trunk/boinc/; revision=15357
2008-06-04 23:04:12 +00:00
David Anderson 5bb78f7a1c fix typo in schema.sql
svn path=/trunk/boinc/; revision=15356
2008-06-04 22:43:13 +00:00
Eric J. Korpela 70baf36e93 - Added database table credit_multiplier and script to be run daily
(calculate_credit_multiplier) to determine what factor to multiply
   claimed credit by before insertion into the database.  Changes to scheduler
   to implement have not yet been checked in.


svn path=/trunk/boinc/; revision=15309
2008-05-28 17:28:19 +00:00
David Anderson 6af9f66b4e - DB/feeder/scheduler: change app_version.xml_doc from blob to mediumblob,
and change the correspending structure field from 64KB to 256KB
    (could increase this if needed).
    This is needed to handle app versions with lots (> 100) of files
- change LARGE_BLOB_SIZE to BLOB_SIZE a bunch of places
- Change COPROCS from vector<COPROC> to vector<COPROC*>.
    Otherwise the right virtual functions of COPROCs don't get called

svn path=/trunk/boinc/; revision=14986
2008-03-31 16:19:45 +00:00
David Anderson c9b563f066 - DB: workunit.rsc_bandwidth needed to go after mod_time
svn path=/trunk/boinc/; revision=14970
2008-03-27 20:46:31 +00:00
David Anderson 815b8fc043 Various preparation for handling multithreaded apps
and apps that use coprocessors.
There now can be several app_versions for the same
(app, platform, version_num) combination.
This changes a number of things.

- Added app_version.plan_class field to DB
- update_versions now looks for a :plan-class in the
    file or directory name, and puts it in the app_version's DB record
- Change uniqueness constraint to include plan_class
- Feeder: the feeder was putting non-deprecated app_versions
    in shared mem, and leaving it to the scheduler to
    find the latest version for a given platform.
    This is dumb.
    Instead, for each app/platform pair the feeder now
    finds the highest version number of a non-deprecated app version,
    and enumerates all non-deprecated app_versions with that
    app/platform/version
- Scheduler: add a BEST_APP_VERSION data structure that keeps track,
    for each app, what the best app_version is for this host.
    This saves the work of recomputing it for each job.

svn path=/trunk/boinc/; revision=14906
2008-03-13 22:57:24 +00:00
David Anderson 546c0b899a - server: fix botched checkin from 7 March.
The new field (workunit.rsc_bandwidth_bound)
    goes at the END of the record.
    Always do it this way!
- make_work: after creating a batch of new WUs,
    we were waiting 60 sec for the transitioner to
    create the results for them
    (so that our next count of unsent results would be correct).
    This is bogus; if e.g. the transitioner isn't running,
    we'll never get the results, and we'll keep creating WUs forever.

    Instead: explicitly wait for there to be results for
    the last WU from the batch just created.

- scheduler: parse <allow_non_preferred_apps>, <allow_beta_work> correctly.

svn path=/trunk/boinc/; revision=14875
2008-03-10 17:03:15 +00:00
David Anderson 95772cba77 - removed boinc_ncpus_available() and boinc_nthreads() calls.
The design has been changed to constant #threads per app version
    Various changes from Kevin Reed/WCG:
    - server: add workunit.rsc_bandwidth_bound: if nonzero,
        send this WU only to hosts with that much download bandwidth
    - assimilators: if a handler returns DEFER_ASSIMILATION,
        the WU remains in INIT state and will be handled when the
        next instance completes.
        Useful if you want the assimilator to see all instances.
    - scheduler: when setting result.outcome = DETACHED,
        set received_time to now
    - scheduler: removed the reliable_time and reliable_min_avg_credit
        options
    - scheduler/web: add optional <allow_non_preferred_projects>
        in project preferences.
        If present, user will accept work from non-selected apps
        if no work is available for selected apps
    - scheduler: improved messages for projects with multiple apps
    - scheduler: added config options
        <granted_credit_weight> and <granted_credit_ramp_up>.
        Used in calculating host.claimed_credit_per_cpu_sec,
        but I'm not sure how.
    - Added two new credit-granting formulas (validate_util.C):
        stddev_credit() and two_credit()
    - server DB: add rollback_transaction() and affected_rows() to DB_CONN

    NOTE: DB update required

svn path=/trunk/boinc/; revision=14870
2008-03-07 21:13:01 +00:00
David Anderson 54519a4ee1 - Server: add "job assignment" feature.
Lets you assign a WU to a particular host,
    to one or all hosts belonging to a user or team, or to all hosts.
    See http://boinc.berkeley.edu/trac/wiki/AssignedWork
    Disabled unless you include <enable_assignment> in config.xml
    Uses a new DB table.
    Tested but only a little.
- Server: code cleanup; moved result-handling to a new file,
    and removed the PLATFORM_LIST arg to everything
    (put it in SCHEDULER_REQUEST instead)

svn path=/trunk/boinc/; revision=14767
2008-02-21 00:47:50 +00:00
David Anderson f183b6f47f - web: add general-purpose notification mechanism.
Users can choose whether to get 1 email per notification,
    a daily "digest" email, or no email.
    (All notifications are shown on the Account page).
    Currently used for:
    - Friend requests and confirmations
    - Posts to subscribed threads
    - Private messages

    NOTE: To implement the "daily digest" feature, projects must add
    a periodic task for html/ops/notify.php to config.xml
- web: have project_footer() generate links for
    Account Page and Message Boards as well as Home
    NOTE: projects that want this change
    will have to modify their own project.inc.

svn path=/trunk/boinc/; revision=14447
2007-12-30 22:02:16 +00:00
David Anderson 11dac5e80c - make_project: add --web_only option.
This lets you create a project for Bossa or Bolt
    without compiling the C++ stuff, which is not used by Bossa or Bolt.
- DB schema: change type= to engine= to avoid MySQL warning messages

svn path=/trunk/boinc/; revision=14437
2007-12-21 23:39:25 +00:00
David Anderson 13baee4302 - user web: add "friend" and "notification" features
- user web: code cleanup in Profile area
- GUI RPC: add missing "/" in auth2 RPC

svn path=/trunk/boinc/; revision=14394
2007-12-18 20:28:08 +00:00
David Anderson 4a81532043 - DB: add fulltext index on team.name
- user web: improve "team search" function,
    and get rid of the superceded "search by name" function
- user web: don't show team founder link to initiate transfer
- user web: show team types
- user web: fix "top teams by type" function
- client: tread NOT_FOUND error on file upload as transient;
    it means the project is missing its file_upload_handler

svn path=/trunk/boinc/; revision=14272
2007-11-20 22:58:14 +00:00
David Anderson dddc2ec6d2 - user web: clean up funky search result formatting.
For thread titles, show links to forum/category also
    For posts, show complete post, with search terms highlighted.
- user web: in display of posts for a user,
    show links to thread and forum also
- user web: posts/threads can become "orphaned" if their forum
    disappears, e.g. team message board is deleted.
    Handle this gracefully in search results and user post list
- user web: where HTML tags are allowed, say so
- user web: fix bug where wrap_postcounts weren't being shown in form
- DB: use "tinyint" instead of "tinyint(1) unsigned" etc.

svn path=/trunk/boinc/; revision=14267
2007-11-20 19:23:26 +00:00
David Anderson 615d4dcf22 - user web: the "private-message notification by email" flag
should default to off.
    Note: it's necessary to clear everyone's flag.
    Projects will need to notify users (e.g. via a news item)
    that they need to explicitly set this pref if they want email
    notification of PMs

svn path=/trunk/boinc/; revision=14255
2007-11-19 02:17:57 +00:00