Last modified 5 days ago Last modified on 04/12/14 13:40:03

Submitting jobs locally

On the command line

create_work is a command-line tool for submitting jobs. Run it from the project root directory.

create_work [ arguments ] infile_1 ... infile_n

Create a job with the given input files (which must already be staged).

Mandatory arguments are:

--appname name
application name

Optional arguments are:

--wu_name name
workunit name (default: appname_PID_TIME)
--wu_template filename
Input template filename relative to project root; usually in templates/. Default: templates/appname_in.
--result_template filename
Output template filename, relative to project root; usually in templates/. Default: templates/appname_out.
--batch n
--priority n
high values are assigned before low values; see --priority_order and --priority_order_create_time options on the feeder
Read stdin, and create one job per line. Each line may specify a command line (with --command_line), a job name (with --wu_name) or input files. This lets you create large batches of jobs efficiently.

The following job parameters may be passed in the input template, or as command-line arguments to create_work; the input template has precedence. If not specified, the given defaults will be used.

--command_line "-flags foo"
--rsc_fpops_est x
FLOPs estimate; default 3600e9
--rsc_fpops_bound x
FPOPs bound; default 86400e9
--rsc_memory_bound x
default 5e8
--rsc_disk_bound x
default 1e9
--rsc_bandwidth_bound x
0 (no bound)
--delay_bound x
default 1 week
--min_quorum x
default 2
--target_nresults x
default 2
--max_error_results x
default 3
--max_total_results x
default 10
--max_success_results x
default 6
--opaque N
--additional_xml 'x'
This can be used to supply, for example, <credit>12.4</credit>.

From a C++ program

BOINC's library provides a function for submitting jobs:

int create_work(
    DB_WORKUNIT& wu,
    const char* wu_template,                  // contents, not path
    const char* result_template_filename,     // relative to project root
    const char* result_template_filepath,     // absolute or relative to current dir
    const char** infiles,                     // array of input file names
    int ninfiles
    const char* command_line = NULL,
    const char* additional_xml = NULL

The name and appid fields of the DB_WORKUNIT structure must always be initialized. Other job parameters may be passed either in the DB_WORKUNIT structure or in the input template file (the latter has priority). On a successful return, contains the database ID of the workunit.