Workunits and results are described by template files, with placeholders for their input and output files.
A WU template file has the form
",htmlspecialchars("The components are: "; list_start(); list_item(htmlspecialchars("[ ... ] 0 [, other attributes] "), " [ ... ] [ 0 NAME -flags xyz ] [name=val&name=val ] [x ] [x ] [x ] [ x ] [ x ] [x ] [x ] [x ] [x ]
A result template file has the form
", htmlspecialchars("32768 "), " result.sah
The result file template is macro-substituted as follows:
The utility program is
Command-line interface
create_work
-appname name // application name
-wu_name name // workunit name
-wu_template filename // WU template filename
-result_template filename // result template filename
// The following are normally supplied in config.xml:
[ -db_name x ] // database name
[ -db_passwd x ] // database password
[ -db_host x ] // database host
[ -db_user x ] // database user name
[ -upload_url x ] // URL for output file upload
[ -download_url x ] // base URL for input file download
[ -download_dir x ] // where to move input files
[ -keyfile x ] // path of upload private key
// The following are normally supplied in the WU template:
[ -rsc_fpops_est x ]
[ -rsc_fpops_bound x ]
[ -rsc_memory_bound x ]
[ -rsc_disk_bound x ]
[ -delay_bound x ]
[ -min_quorum x ]
[ -target_nresults x ]
[ -max_error_results x ]
[ -max_total_results x ]
[ -max_success_results x ]
infile_1 ... infile_m // input files
The workunit parameters are documented here.
Defaults for many of the optional arguments
are taken from the config.xml file,
if it's in the current directory.
The C++ library (backend_lib.C,h) provides the functions:
int read_key_file(char* path, R_RSA_PRIVATE_KEY& key); int create_work( WORKUNIT&, char* wu_template, // contents, not path char* result_template_filename, // path int redundancy, char* infile_dir, // where input files are char** infiles, // array of input file names int ninfiles R_RSA_PRIVATE_KEY& key, // upload authentication key char* upload_url, char* download_url );
read_key_file() reads a private key from a file. Use this to read the file upload authentication key.
create_work() creates a workunit and one or more results. The arguments are similar to those of the utility program; some of the information is passed in the WORKUNIT structure, namely the following fields:
name appid batch rsc_fpops rsc_iops rsc_memory rsc_disk delay_boundAll other fields should be zeroed.
The daemon program
make_work -wu_name name -cushion Ncan be used to create an endless supply of work. It will create copies of the given work unit as needed to maintain a supply of at least N unsent results. "; page_tail(); ?>