Changes between Version 11 and Version 12 of AssignedWork
- Timestamp:
- Jan 31, 2012, 11:32:01 AM (13 years ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
AssignedWork
v11 v12 1 = Assigned work=1 = Broadcast and targeted jobs = 2 2 3 This mechanism lets you assign a job to: 3 BOINC has two mechanisms that let you control what hosts a job runs on: 4 '''Broadcast jobs''' and '''Targeted jobs'''. 4 5 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 == 9 7 10 A host with assigned jobs won't get any other jobs until the assigned ones are finished and reported. 8 This 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). 11 10 12 Assigned jobs are not validated or assimilated. 13 You must develop your own scripts or programs to process and clean up finished jobs.11 This could be used to run application-specific benchmarks, 12 or to test for hardware or software features. 14 13 15 To enable this feature you must add 14 Broadcast jobs are executed exactly once on a given host. 15 It the job fails for any reason, it is not retried. 16 Broadcast jobs are not handled by a [ValidateIntro validator[ 17 or [AssimilateIntro assimilator]. 18 You must develop your own daemon that processes completed broadcast jobs. 19 20 To enable broadcast jobs you must add 16 21 {{{ 17 <enable_assignment >1</enable_assignment>22 <enable_assignment_multi>1</enable_assignment_multi> 18 23 }}} 19 24 to your config.xml file. 20 25 21 == Creating assigned work == 26 To create a broadcast job, run 27 the [WorkGeneration create_work script] 28 with one of following optional arguments: 22 29 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 25 36 26 --assign_all:: 27 assign the job to all hosts 37 After 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 42 The '''assign.php''' script (in ops/) lets you manage broadcast jobs. 43 It shows a list of broadcast jobs and their status, 44 and lets you remove broadcast jobs. 45 46 == Targeted jobs == 47 48 Targeted 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 54 For example, suppose your project has a group of dedicated hosts 55 such as a cluster or a set of cloud nodes. 56 You can run the BOINC client on those hosts, 57 attached to a particular user account. 58 Then, if you target a job at that user, it will run only on the dedicated hosts. 59 60 Targeted jobs are validated and assimilated like other jobs. 61 They are not replicated; if the job fails on one host in the set, 62 it will be retried on another host in the set, and so on until it completes. 63 64 There are two ways to create targeted jobs. 65 The first is create a job that is targeted from the beginning. 66 To do this, run the [WorkGeneration create_work script] 67 with one of following optional arguments: 68 28 69 --assign_host ID:: 29 70 assign the job to the given host 30 --assign_user _oneID::71 --assign_user ID:: 31 72 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:: 35 74 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 team38 75 39 The names of work units for assigned jobs must include the string '''asgn''' 40 (this prevents them from being validated or assimilated). 76 The second way is to transform an existing job into a targeted job. 77 This might be done, for example, as part of a system that accelerates 78 the completion of batches of jobs by sending the "stragglers" to dedicated hosts. 41 79 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. 80 Currently the only way to do this is via a C++ API call, 81 and you can only target the job to a user. 82 The call is: 83 {{{ 84 int restrict_wu_to_user(DB_WORKUNIT& wu, int userid); 85 }}}