Changes between Version 35 and Version 36 of WorkGeneration
- Timestamp:
- Apr 30, 2014, 12:06:48 PM (11 years ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
WorkGeneration
v35 v36 88 88 Note that you only need one workunit template file and one result template file. 89 89 90 Now suppose you want to run a program against a single input file, but with ten command lines, '-flag 0', '-flag 1', ..., '-flag 9'. You might modify the above program with the following code: 90 Now suppose you want to run a program against a single input file, 91 but with ten command lines, '-flag 0', '-flag 1', ..., '-flag 9'. 92 You might modify the above program with the following code: 91 93 {{{ 92 94 char command_line[256]; … … 123 125 You can easily modify this program to suit your application. 124 126 125 In order to scan a directory for input files and create jobs therefrom, the default sample work generator can be adapted with a patch provided [http://boinc.berkeley.edu/trac/ticket/1202 here]. 127 In order to scan a directory for input files and create jobs therefrom, 128 the default sample work generator can be adapted with a patch provided [http://boinc.berkeley.edu/trac/ticket/1202 here]. 126 129 127 130 === make_work === #examples-makework 128 During the testing phase of a project, you may want to replicate a given workunit as needed to maintain a constant supply of work. The daemon program 131 During the testing phase of a project, 132 you may want to copy a given workunit as needed to maintain a constant supply of work. 133 The daemon program 129 134 {{{ 130 make_work - wu_name name [-wu_name name2 ... ]-cushion N135 make_work --wu_name name [--wu_name name2 ... ] --cushion N 131 136 }}} 132 creates copies of the given workunits (cyclically) as needed to maintain a supply of at least N unsent results. This is useful for testing purposes. 137 does this; 138 it creates copies of the given workunits (cyclically) as needed to maintain a supply of at least N unsent results. 139 Other command-line arguments: 140 '''--max_wus N''':: exit after creating N workunits 141 '''--one_pass''':: check if workunits are needed, if so create them, and exit. 133 142 134 Note: if you run the file_deleter and/or db_purge, the master workunit or its input files may be deleted (which will cause make_work to fail). To avoid this, give the master workunit a name that contains 'nodelete' as a substring. This causes the file_deleter and db_purge to skip over it. 143 Note: if you run the file_deleter and/or db_purge, 144 the master workunit or its input files may be deleted (which will cause make_work to fail). 145 To avoid this, give the master workunit a name that contains 'nodelete' as a substring. 146 This causes the file_deleter and db_purge to skip over it. 135 147 136 It may be convenient to have a script that recreates the master workunit. For example: 148 It may be convenient to have a script that recreates the master workunit. 149 For example: 137 150 {{{ 138 151 cp test_workunits/12ja04aa `bin/dir_hier_path 12ja04aa`