Commit Graph

496 Commits

Author SHA1 Message Date
David Anderson 562d7ac2d7 Bolt stuff
svn path=/trunk/boinc/; revision=16370
2008-10-30 22:58:33 +00:00
David Anderson 19dfe0ee71 - Add callback mechanism for exercises and exercise sets
- Default count for exercise sets is N, not 1

svn path=/trunk/boinc/; revision=16305
2008-10-23 20:35:39 +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 59184caaa9 - scheduler: FCGI: use mysql_ping() to check that DB connection
is still alive before handling a request.  If not, try to reconnect.
    This will hopefully make things work better if MySQL goes down and up
    when using FCGI.

svn path=/trunk/boinc/; revision=16112
2008-10-02 19:03:52 +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
David Anderson f17a800807 - API: in boinc_exit(), release the lockfile only if
we're the main program (otherwise we didn't lock it in
    the first place, and a crash results).  From Artyom Sharov.
- scheduler: add support for the GCL simulator,
    which uses special versions of backend programs
    that use virtual time,
    and that wait for signals instead of sleep()ing.

    To compile:
        make clean
        configure CXXFLAGS="-DGCL_SIMULATOR"
        make

svn path=/trunk/boinc/; revision=16038
2008-09-22 20:33:59 +00:00
David Anderson cc7d507789 - DB interface: in update(), check that 1 row was updated
- API: in APP_INIT_DATA, enclose project preferences in tags
    so that it's legal XML
- scheduler: add <multiple_clients_per_host> option.
    Use this if your project runs on Condor or grids
    and (to use multicore machines) you're running
    multiple clients per host.
    This will skip the host lookup based on IP address.


svn path=/trunk/boinc/; revision=15954
2008-09-04 08:33:21 +00:00
David Anderson a5f80bc2e6 - lib: fix typo
svn path=/trunk/boinc/; revision=15903
2008-08-20 16:49:37 +00:00
David Anderson 0e14fa8f9e - Finished implemenation of refresh intervals;
added "count" field to DB table to keep track of how many times
    we've refreshed.
- show refresh schedule on main courses page
- default for random structure is all units, not 1

svn path=/trunk/boinc/; revision=15846
2008-08-14 21:05:02 +00:00
David Anderson c69186ef74 - remove "doc_file" field; use short_name.inc
- fix tabl_exists()
- fix bugs when return to answer page
- create bolt_result records correctly

svn path=/trunk/boinc/; revision=15836
2008-08-14 15:46:30 +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
David Anderson 4f66bb4c95 - added copyright and license info to .C, .cpp, .h files
- scheduler: fix bug in adaptive replication:
    if send an unreplicated job to untrusted host,
    set both wu.target_nresults and wu.min_quorum to app.target_nresults.

svn path=/trunk/boinc/; revision=15762
2008-08-06 18:36:30 +00:00
David Anderson 80bde8a4c6 - ops: add script to fix backslashes in posts etc.
- DB: add db_update.php entry for Eric's new table

svn path=/trunk/boinc/; revision=15700
2008-07-28 22:24:57 +00:00
Eric J. Korpela 8da770569f Typo fix
svn path=/trunk/boinc/; revision=15671
2008-07-25 01:42:23 +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 27dee4e450 - manager: fix typo
svn path=/trunk/boinc/; revision=15640
2008-07-20 21:27:44 +00:00
David Anderson e70273774a - scheduler: in matchmaker scheduler, if find a "locked" array slot,
which whether we're the process that locked it (from Artyom Sharov)

svn path=/trunk/boinc/; revision=15635
2008-07-18 20:59:59 +00:00
David Anderson fa0dbd20c7 - scheduler: with matchmaker scheduling, avoid infinite loop
if result not in DB
    (from Artyom Sharov, DerMeister)

svn path=/trunk/boinc/; revision=15608
2008-07-15 22:44:36 +00:00
David Anderson 8c41a07992 - scheduler: Add a notion of "hard app" for SETI@home.
If an app is hard, the scheduler always does the deadline check,
    even if the client has no other jobs for this project.
    And the estimated wallclock duration is multiplied by 1.3,
    to avoid sending jobs to hosts that will barely make the deadline.

    Hard apps are marked by setting weight = -1.
    This is a total kludge, to avoid adding another field to app.

svn path=/trunk/boinc/; revision=15607
2008-07-15 21:43:45 +00:00
David Anderson 1147e60b1a - web: fix bugs that cause backslashes to be introduced
in global prefs update via account manager RPC

svn path=/trunk/boinc/; revision=15602
2008-07-14 19:13:19 +00:00
David Anderson 08f126f53b svn path=/trunk/boinc/; revision=15600 2008-07-13 04:26:23 +00:00
David Anderson 1bd7742c4a - more gcc fixes
svn path=/trunk/boinc/; revision=15496
2008-06-26 20:53:51 +00:00
David Anderson 4210ccff4c - diagnostics library: in signal handler, use _exit() instead of exit();
an atexit() function might have been what caused the signal

svn path=/trunk/boinc/; revision=15437
2008-06-19 20:56:36 +00:00
David Anderson b16fb12329 - manager: fix some strings ("comm" is not an OK abbrev.)
Also got rid of references to Yahoo.

svn path=/trunk/boinc/; revision=15406
2008-06-14 20:38:57 +00:00
David Anderson 4387e4491b - Fix emacs mode line in Makefile.am's
svn path=/trunk/boinc/; revision=15375
2008-06-08 22:18:52 +00:00
David Anderson 3054a5f6b3 - validator/assimilator: fix bug in 2 June checkin
(xml_doc_in wasn't included in DB query)

svn path=/trunk/boinc/; revision=15363
2008-06-05 18:36:31 +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
David Anderson c9d38091e7 - validator/assimilator: parse <file_ref>s rather than <file_info>s;
the latter is where the <optional/> flag is.

svn path=/trunk/boinc/; revision=15337
2008-05-30 03:29:31 +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
Eric J. Korpela 1f2d65bccb - Makefiles:
added client/scripts to default client build
    removed sea from the default clientgui build
    added locale/client to the default clientgui build
    moved installed headers from $(includedir) to $(pkgincludedir) which
       is $(includedir)/boinc by default.
    removed redefinitions of $(includedir) from Makefiles.
- configure:
    added locale/client/Makefile to AC_CONFIG_FILES


svn path=/trunk/boinc/; revision=15300
2008-05-28 01:38:39 +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 4554fa5ce3 - server and client:
in server->client reply messages and in the client itself,
    move app-planning info from RESULT to APP_VERSION.
    This was necessary to allow anonymous platform info (app_info.xml)
    to specify avg_ncpus, etc.
    e.g., if someone wants to write a multithread version of SETI@home,
    or a GPU/CUDA version,
    they can run it using the anonymous platform mechanism
    and it will be scheduled correctly.

    If a server sends an existing APP_VERSION but with different
    app-planning info, the client will accept and use the new info.

svn path=/trunk/boinc/; revision=14978
2008-03-28 18:00:27 +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 13400c9516 Changes for multithread app support:
- update_versions: use __ (not :) as separator for plan class
- client: add plan_class to APP_VERSION;
    an app version is now identified by platform/version/plan_class
- client CPU scheduler: don't assume apps use 1 CPU
- client: add avg_ncpus, max_cpus, flops, cmdline to RESULT
- scheduler: implement app planning scheme

Other changes:

- client: if symlink() fails, make a XML soft link instead
    (for Unix running off a FAT32 FS)
- client: don't accept nonpositive resource share from AMS
- daemons and DB: check for error returns from enumerations,
    and exit if so.  Thus, if the MySQL server goes down,
    all the daemons will soon exit.
    The cron script will restart them every 5 min,
    so when the DB server comes back up so will the project.
- web: show empty max CPU % as ---
- API: get rid of all_threads_cpu_time option (always the case now)


svn path=/trunk/boinc/; revision=14966
2008-03-27 18:25:29 +00:00
David Anderson 4e9fbac5e0 - admin web: touch reread_db in manage_app_versions.php
- DB code: remove "is_high_priority" stuff.
- scheduler: merge find_app_version() into get_app_version().
    Have the latter memoize its results (both positive and negative).
    Have it call app_plan() for apps with nonempty plan_class.
- scheduler: first steps towards improved selectability of log messages.
    It will eventually be like the client,
    where you can select among various types of messages.
- feeder: if can't unlink the reread_db trigger file, exit
    (else we'd go into an infinite loop)

svn path=/trunk/boinc/; revision=14940
2008-03-18 21:22:44 +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 1106da6ec6 - transitioner: we're not supposed to ever see "assigned" WUs.
But if we do, set their transitioner time to plus infinity
    so that we don't see them again.
    (otherwise we go into an infinite loop)
- DB code: remove "high_priority" from queries not from scheduler
    (should probably remove them from there too)
- file_deleter: print error msg if apache user doesn't exist

svn path=/trunk/boinc/; revision=14835
2008-03-03 19:33:32 +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 02adbc4d49 - web: remove all references to the PHP "session" mechanism,
which added only confusion.
    Implement login directly, using cookies.
- All cookie setting/clearing now goes through two functions,
    send_cookie() and clear_cookie().
    These deal with path and expiry
    (e.g. if you want to have different language or forum settings
    on two projects on the same server, that now works).

svn path=/trunk/boinc/; revision=14735
2008-02-13 19:02:44 +00:00
David Anderson 35dab13859 - client code: my next-to-last checkin was flawed
svn path=/trunk/boinc/; revision=14725
2008-02-12 20:33:05 +00:00
David Anderson 51286a03dc - Initial checkin of Bossa code
svn path=/trunk/boinc/; revision=14716
2008-02-11 23:38:31 +00:00
David Anderson f77420c2c0 - scheduler: do "careful update" of workunit.hr_class
in case someone else changed since we read it.
    Hopefully this will fix a race condition
    where WU results get sent to different HR classes.
    (Alternatively we could use transactions,
    or acquire the semaphore during read/update,
    but this could impact performance).

svn path=/trunk/boinc/; revision=14710
2008-02-08 17:20:09 +00:00
David Anderson e56ed1430f - DB code: safe_atof() was returning a float,
causing a potential loss of precision.
    Change it to double (same as atof())
- When moderator locks a thread, let them specify reason

svn path=/trunk/boinc/; revision=14662
2008-02-02 17:01:57 +00:00
David Anderson 904cbe5a4f - Add Bolt admin page
- added "hidden" flag to courses


svn path=/trunk/boinc/; revision=14660
2008-02-01 23:11:09 +00:00
David Anderson d2a0353a00 - manager: fix unix build (new file)
svn path=/trunk/boinc/; revision=14658
2008-01-31 23:43:37 +00:00
David Anderson 4cfba489df - implement the review mechanism
svn path=/trunk/boinc/; revision=14653
2008-01-30 19:29:51 +00:00