Commit Graph

44 Commits

Author SHA1 Message Date
David Anderson 558d76212f server: fix race condition when creating targeted jobs.
We were creating the workunit, then updating its transitioner_flags field.
If the transitioner runs inbetween,
it would (incorrectly) create results for the workunit.
Solution: set transitioner_flags during insert.
2014-06-02 19:01:44 -07:00
David Anderson 46d90b2b60 server: improve support for remote input files
A "remote input file" is located on a data server other than the project server.
Previously these could be specified only in the input template,
which was of limited utility.
Add new ways of specifying remote input files:
1) in the create_work program, a remote input file can be specified
  with command-line args
  --remote_file name URL nbytes MD5
  or by the same syntax in stdin when creating multiple jobs
2) add a variant of create_work() called create_work2(),
  which takes a vector of INFILE_DESC structures that can specify
  either local or remote files
2014-04-20 23:52:51 -07:00
David Anderson fec574f4e8 create_work: increase the efficiency of bulk job creation
The job submission RPC handler (PHP) originally ran the
create_work program once per job.
This took about 1.5 minutes to create 1000 jobs.
Recently I changed this so that create_work only is run once;
it does one SQL insert per job.
Disappointingly, this was only slightly faster: 1 min per 1000 jobs.

This commit changes create_work to create multiple jobs per SQL insert
(as many as will fit in a 1 MB query, which is the default limit).
This speeds things up by a factor of 100: 1000 jobs in 0.5 sec.
2014-04-10 23:53:19 -07:00
David Anderson ef82d5d9fb server: fix compile error on systems that don't define MAXPATHLEN 2013-08-22 17:01:45 -07:00
David Anderson b9f0733c06 server: replace strcpy() with strlcpy() various places 2013-06-03 22:42:53 -07:00
David Anderson 1a1a01c103 - server: initialize result.size_class and workunit.size_class to -1 2013-05-03 15:09:45 -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 48e1de5348 - remote job submission: bug fixes, and avoid divide by zero
in adjust_user_priority.  From Niclas Lockner.
2013-03-05 16:42:44 +01:00
David Anderson 3d60ae2508 - add PHP script for initializing user submit priorities
based on existing batches
2013-03-04 17:39:23 +01:00
David Anderson 6f962d5b61 - file upload handler: in FCGI version, check for trigger file
each time through loop (from Bernd).
- validator: fix bug that zeroed result.random
2013-03-04 17:24:18 +01:00
David Anderson 165e3bb1d5 - adjust_user_priority: scale FLOP count by app's min_avg_pfc
to account for systematic errors in FLOP count
- adjust_user_priority: get total project RAC by summing RAC
    of app versions where RAC has been updated in past week
- feeder: add --priority_asc option
    (for when wu.priority is a logical time)
2013-03-04 15:23:39 +01:00
David Anderson 2ded3ff67d - fix typo in GUI RPC
- check in some code for multi-user job prioritization
2013-03-04 15:23:39 +01:00
David Anderson 7cc750e616 - cancel_jobs tool: add --name option to cancel job by name.
From David Coss.


svn path=/trunk/boinc/; revision=26132
2012-09-20 18:28:29 +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 ce52c9cf3e - storage stuff
svn path=/trunk/boinc/; revision=25341
2012-02-24 22:55:11 +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 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 3410abef6f - backend API: added function cancel_jobs(minid, maxid)
for canceling jobs
- added program cancel_jobs for canceling jobs
- DB interface: it's not an error if update_fields_noid()
    affects != 1 rows


svn path=/trunk/boinc/; revision=24413
2011-10-18 07:15:04 +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 abdb603bc4 - job creation: handling of extra XML in input templates didn't work.
- job creation: fix stripping of <output_template> tags
- client: fix off-by-1 error in buffer overflow logic for scanning keys.


svn path=/trunk/boinc/; revision=24057
2011-08-27 16:52:04 +00:00
David Anderson 49205acfd9 - job submission: fix bug where parameters specified in the
input template (e.g., delay bound) were ignored
- web: fix PHP warning


svn path=/trunk/boinc/; revision=24039
2011-08-25 05:08:47 +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 dec057eaab - update_versions: fix bug where files not listed in version.xml
are not processed correctly
- remote job submission: debug
- create_work: --rsc_fpops_est etc. should override the template file


svn path=/trunk/boinc/; revision=23942
2011-08-07 04:32:02 +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 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 bfc04f03eb - back end: fix bugs in [23648] which caused create_work
to mess up input templates containing
    <copy_file/> or other attribute tags.
    XML_PARSER now contains a member element() for when
    you want to copy an element without knowing its structure.


svn path=/trunk/boinc/; revision=23790
2011-07-04 23:51:00 +00:00
David Anderson 93add14614 - backend: use new XML parser for input template files
(so that they don't have to be 1 element/line)
    and also allow optional <input_template> root element
- fix bug in WORKUNIT DB interface


svn path=/trunk/boinc/; revision=23648
2011-06-07 04:12:49 +00:00
David Anderson 51c652640f - create_work: allow multiple URLs for non-local input files
(from Zoltan Farkas)
- scheduler: fix message describing per-app limits


svn path=/trunk/boinc/; revision=23546
2011-05-13 18:40:10 +00:00
David Anderson c70cd934b4 - server: rename send_file to put_file.
Factor out put_file() and get_file() functions
    so they have a C++ API as well as command-line


svn path=/trunk/boinc/; revision=23425
2011-04-24 02:00:27 +00:00
David Anderson 98b4c79e36 - client: if an app version has a missing GPU,
we still need to keep track of the usage
    and write it to the state file.
- get client simulator working again


svn path=/trunk/boinc/; revision=23413
2011-04-20 23:32:14 +00:00
David Anderson ded867aa25 - create_work and possibly other back-end programs:
fix bug that corrupted WU command lines.
    The problem: we were using strcpy(p, p+n) to delete the
    first n characters of p.
    This is incorrect - the behavior of strcpy() is undefined
    if its args overlap.
    On some systems (e.q. AQUA's server) it does wacky things.


svn path=/trunk/boinc/; revision=23007
2011-02-09 00:21:40 +00:00
David Anderson 91c251c103 - user web: add "delete account" feature.
This allows a user to delete all traces of themselves from a project.
    Namely:
    - clear fields of user record: email_addr, authenticator,
        name, country, postal_code
        Note: record is not deleted
    - clear the domain_name and last_ip_addr fields of hosts
        Note: records are not deleted
    - quit team
    - delete private messages sent and received
    - delete forum posts, subscriptions, and forum prefs
    - delete profile and associated images
- server: compile fix


svn path=/trunk/boinc/; revision=23006
2011-02-08 21:38:16 +00:00
David Anderson 8145cb86b0 - create_work: add some debugging printfs for Kamran
svn path=/trunk/boinc/; revision=22993
2011-02-03 23:27:30 +00:00
David Anderson 1e363ba46d - server (job submission): allow input templates to specify the
URL, size, and MD5 of input files.
    This supports "non-local" input files,
    i.e. files not present on the project server.

    NOTE: as implemented,
    this requires a separate input template for each job.
    It would be slightly better to let you specify the
    URL/size/MD5 in the create_work() call.

    From Zoltan Farkas (SZTAKI)
    

svn path=/trunk/boinc/; revision=22320
2010-09-07 20:18:58 +00:00
David Anderson bf56e80bce - tweaks
svn path=/trunk/boinc/; revision=22306
2010-08-29 08:43:40 +00:00
David Anderson 969100a00c - feeder: error out if an ordering option (e.g. --priority)
is used in combination with homogeneous redundancy.
    HR requires a cyclic scan of all sendable results.

svn path=/trunk/boinc/; revision=21973
2010-07-16 18:38:14 +00:00
David Anderson 7e121f35bf - fix gcc 4 compiler warnings
svn path=/trunk/boinc/; revision=21882
2010-07-08 18:02:07 +00:00
Bernd Machenschalk fbf3ca1450 a couple of locality scheduling fixes:
- remove obsolete and buggy code from transitioner (create_result() in backend_lib)
    - account for 'mixed' scheduling in explain_to_user() in sched_send.cpp
    - finish transition to configurable patterns for distinguishing files reported by the client
      in the Einstein@home-specific part of send_work_locality in sched_locality
      (removed previous hardcoded strcmps)

svn path=/trunk/boinc/; revision=20074
2010-01-05 11:03:10 +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 10f9e11ee6 - lib: created a new file for declaring "replacements"
for functions like strlcpy() etc.
    config.h is included here rather than in str_util.h


svn path=/trunk/boinc/; revision=18437
2009-06-16 20:54:44 +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
Eric J. Korpela 4e60ef3003 - STILL WORK TO BE DONE TO GET locale STUFF INSTALLED PROPERLY!!!
- Update to libtool 1.5.24
- build environment:  Major automake changes that I've been warning about
  for some time.
- Now uses libtool to build libraries.
- Builds separate boinc_fcgi and sched_fcgi libraries for use with 
  FCGI server components.
- New macro "BOINC_CHECK_LIB_WITH" that executes a "AC_CHECK_LIB" on
  a library only if --with-libname[=DIR] is specified on the configure
  command line.  This is to allow inclusion of libraries when the 
  ssl, gtk, wxWidgets, or other configuration is incorrect for static
  libraries.
- Added a lot of "--with-*" for some libraries that might be required for
  static builds.
- The sea directory has been moved to packages/generic.  Changes to sea
  and the associated scripts might be required to better make use of the
  staging mechanism and shared libraries.
- Fixed includes of boinc_fcgi.h in many files.
- Fixed places where FCGI_FILE needs to be used implicitly.
- Fixed missing define of _SC_PAGESIZE on hosts that define only
  _SC_PAGE_SIZE.
- Moved build of boinc_cmd (and source file) from lib to client



svn path=/trunk/boinc/; revision=16904
2009-01-13 23:06:02 +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