mirror of https://github.com/BOINC/boinc.git
78 lines
2.0 KiB
HTML
78 lines
2.0 KiB
HTML
<title>Operational tools: work and results</title>
|
|
<body bgcolor=ffffff>
|
|
<h2>Operational tools: work and results</h2>
|
|
<p>
|
|
Workunits and results can be created using either a utility program
|
|
or a C++ function.
|
|
<p>
|
|
The program
|
|
<pre>
|
|
create_work
|
|
-appname name
|
|
-wu_name name
|
|
-wu_template file
|
|
-result_template file
|
|
-nresults n
|
|
infile_1 ... infile_m
|
|
</pre>
|
|
<p> <b>-appname</b> specifies the name of the application
|
|
<p> <b>-wu_name</b> gives the name of the workunit.
|
|
<p>
|
|
<b>-wu_template</b> gives the filename of a template for the
|
|
workunit XML document.
|
|
This template is macro-substituted as follows:
|
|
<ul>
|
|
<li>
|
|
<INFILE_n/> is replaced with the name of the nth input
|
|
file.
|
|
<li>
|
|
<MD5_n/> is replaced with the MD5 checksum of the nth
|
|
input file.
|
|
<li>
|
|
<WU_NAME/> is replaced with the workunit name.
|
|
</ul>
|
|
<p>
|
|
<b>-result_template</b> gives the filename of a template for the
|
|
result XML document.
|
|
This template is macro-substituted as follows:
|
|
<ul>
|
|
<li>
|
|
<OUTFILE_n> is replaced with a string of the form
|
|
"wuname_resultnum_n" where wuname is the workunit name and resultnum is
|
|
the ordinal number of the result (0, 1, ...).
|
|
<li>
|
|
<WU_NAME> is replaced with the workunit name.
|
|
<li>
|
|
<RESULT_NAME> is replaced with a string of the form
|
|
"wuname_resultnum".
|
|
</ul>
|
|
<p>
|
|
<b>-nresults</b> gives the number of results to be created.
|
|
<p>
|
|
<b>infile_1 ... infile_m</b> are the names of the input files.
|
|
<hr>
|
|
<p>
|
|
The C++ library (backend_lib.C,h) provides the function:
|
|
<pre>
|
|
int create_work(
|
|
int appid,
|
|
char* wu_name,
|
|
char* wu_template,
|
|
char* result_template,
|
|
int nresults,
|
|
char* infile_dir,
|
|
char** infiles,
|
|
int ninfiles
|
|
);
|
|
</pre>
|
|
<p>
|
|
This creates a workunit and one or more results.
|
|
The arguments are
|
|
the same as for the utility program, except that the application is
|
|
identified by its database ID.
|
|
<p>
|
|
"infile_dir" is the path of the directory containing the input
|
|
files.
|
|
<p>
|
|
"infiles" is an array of names of the input files, of length "ninfiles".
|