Changes between Version 11 and Version 12 of AssignedWork


Ignore:
Timestamp:
Jan 31, 2012, 11:32:01 AM (12 years ago)
Author:
davea
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • AssignedWork

    v11 v12  
    1 = Assigned work =
     1= Broadcast and targeted jobs =
    22
    3 This mechanism lets you assign a job to:
     3BOINC has two mechanisms that let you control what hosts a job runs on:
     4'''Broadcast jobs''' and '''Targeted jobs'''.
    45
    5  * a particular host.
    6  * one or all of the hosts belonging to a user.
    7  * one or all of the hosts belonging to a team.
    8  * all hosts (this could be used to run application-specific benchmarks, test for hardware or software features, or test CPUs).
     6==  Broadcast jobs ==
    97
    10 A host with assigned jobs won't get any other jobs until the assigned ones are finished and reported.
     8This mechanism lets you assign a job to ''all'' hosts, both current and future
     9(or to all hosts belonging to a particular user or a particular team).
    1110
    12 Assigned jobs are not validated or assimilated.
    13 You must develop your own scripts or programs to process and clean up finished jobs.
     11This could be used to run application-specific benchmarks,
     12or to test for hardware or software features.
    1413
    15 To enable this feature you must add
     14Broadcast jobs are executed exactly once on a given host.
     15It the job fails for any reason, it is not retried.
     16Broadcast jobs are not handled by a [ValidateIntro validator[
     17or [AssimilateIntro assimilator].
     18You must develop your own daemon that processes completed broadcast jobs.
     19
     20To enable broadcast jobs you must add
    1621{{{
    17 <enable_assignment>1</enable_assignment>
     22<enable_assignment_multi>1</enable_assignment_multi>
    1823}}}
    1924to your config.xml file.
    2025
    21 == Creating assigned work ==
     26To create a broadcast job, run
     27the [WorkGeneration create_work script]
     28with one of following optional arguments:
    2229
    23 The [WorkGeneration create_work script]
    24 take the following optional arguments:
     30 --assign_multi::
     31  assign the job to all hosts
     32 --assign_user_multi ID::
     33  assign the job to all hosts of the given user
     34 --assign_team_multi ID::
     35  assign the job to all hosts of the given team
    2536
    26  --assign_all::
    27   assign the job to all hosts
     37After creating a broadcast job, you must either
     38
     39 * stop and start the project, or
     40 * touch the file ''reread_db'' in the project directory
     41
     42The '''assign.php''' script (in ops/) lets you manage broadcast jobs.
     43It shows a list of broadcast jobs and their status,
     44and lets you remove broadcast jobs.
     45
     46== Targeted jobs ==
     47
     48Targeted jobs are like regular jobs except that they are restricted to run on either
     49
     50 * a particular host
     51 * hosts belonging to a particular user
     52 * hosts belonging to a particular team
     53
     54For example, suppose your project has a group of dedicated hosts
     55such as a cluster or a set of cloud nodes.
     56You can run the BOINC client on those hosts,
     57attached to a particular user account.
     58Then, if you target a job at that user, it will run only on the dedicated hosts.
     59
     60Targeted jobs are validated and assimilated like other jobs.
     61They are not replicated; if the job fails on one host in the set,
     62it will be retried on another host in the set, and so on until it completes.
     63
     64There are two ways to create targeted jobs.
     65The first is create a job that is targeted from the beginning.
     66To do this, run the [WorkGeneration create_work script]
     67with one of following optional arguments:
     68
    2869 --assign_host ID::
    2970  assign the job to the given host
    30  --assign_user_one ID::
     71 --assign_user ID::
    3172  assign the job to one host of the given user
    32  --assign_user_all ID::
    33   assign the job to all hosts of the given user
    34  --assign_team_one ID::
     73 --assign_team ID::
    3574  assign the job to one host of the given team
    36  --assign_team_all ID::
    37   assign the job to all hosts of the given team
    3875
    39 The names of work units for assigned jobs must include the string '''asgn'''
    40 (this prevents them from being validated or assimilated).
     76The second way is to transform an existing job into a targeted job.
     77This might be done, for example, as part of a system that accelerates
     78the completion of batches of jobs by sending the "stragglers" to dedicated hosts.
    4179
    42 After creating an assigned job, you must let the feeder know.
    43 You can do this by doing either of:
    44 
    45  * stop and start the project
    46  * touch the file ''reread_db'' in the project directory
    47 
    48 == Management tools ==
    49 
    50 The '''assign.php''' script (in ops/) manages assigned work.
    51 It shows a list of assignments and their status,
    52 and lets you remove assignments (the WU and result records remain in the database).
    53 
    54 == Implementation ==
    55 
    56 Results for assigned work units are created on demand (in the scheduler) rather than by the transitioner.
    57 
    58 Assignments are stored in an '''assignments''' table.
    59 
    60 If <enable_assignment> is set in the config file,
    61 the scheduler checks for assignments for the given host.
    62 If it finds any for which the result has not already been reported
    63 and the job is not in progress, it creates a result record and sends it to the host.
     80Currently the only way to do this is via a C++ API call,
     81and you can only target the job to a user.
     82The call is:
     83{{{
     84int restrict_wu_to_user(DB_WORKUNIT& wu, int userid);
     85}}}