Changes between Version 6 and Version 7 of WorkGeneration


Ignore:
Timestamp:
Apr 18, 2007, 4:48:37 PM (17 years ago)
Author:
davea
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • WorkGeneration

    v6 v7  
    55
    66    * Write XML 'template files' that describe the job's input and outputs (typically the same template files can be used for many jobs).
    7     * Create the job's input file(s), and put them in the right places in the [http://boinc.berkeley.edu/hier_dir.php download directory hierarchy].
     7    * Create the job's input file(s), and put them in the right places (as determined by the file names) in the [http://boinc.berkeley.edu/hier_dir.php download directory hierarchy].
    88    * Invoke a BOINC function or script that submits the job.
    99
     
    8181dir_hier_path filename
    8282}}}
    83 This prints the full pathname and creates the directory if needed. Run this in the project's root directory. For example:
     83which prints the full pathname and creates the directory if needed (run this in the project's root directory). For example:
    8484{{{
    8585cp test_files/12ja04aa `bin/dir_hier_path 12ja04aa`
     
    8787copies an input file from the test_files directory to the download directory hierarchy.
    8888
    89 To submit a job, run the program
     89To submit a job, run bin/create_work from the project root directory:
    9090{{{
    9191create_work [ arguments] infile_1 ... infile_n
    9292}}}
    93 Mandatory argumens are:
     93Mandatory arguments are:
    9494    -appname name::
    9595  application name
     
    104104    -priority n::
    105105
    106 The following may be passed in the WU template,
     106The following [http://boinc.berkeley.edu/work.php job parameters] may be passed in the input template,
    107107or as command-line arguments to create_work,
    108108or not passed at all (defaults will be used)
     
    120120    -max_success_results x::
    121121    -additional_xml 'x'::
    122 
    123 The program must be run in the project root directory. The workunit parameters are documented [http://boinc.berkeley.edu/work.php here]. The -additional_xml argument can be used to supply, for example, <credit>12.4</credit>.
    124 
    125 You must put each input file in the appropriate directory; the directory is determined by the file's name. To find this directory, call the C++ function
    126 {{{
    127 dir_hier_path(
     122  This can be used to supply, for example, <credit>12.4</credit>.
     123
     124== Submitting jobs from a C++ program ==
     125
     126BOINC's library provides the functions:
     127{{{
     128// convert filename to path in download hierarchy
     129//
     130SCHED_CONFIG::download_path(
    128131    const char* filename,
    129     const char* root,       // root of download directory
    130     int fanout,             // from config.xml
    131     char* result,           // path of file in hierarchy
    132     bool create_dir=false   // create dir if it's not there
     132    char* path,
    133133);
    134 }}}
    135 
    136 
    137 
    138 == Submitting jobs from a C++ program ==
    139 
    140 BOINC's library (backend_lib.C,h) provides the functions:
    141 {{{
     134
     135// submit a job
     136//
    142137int create_work(
    143138    DB_WORKUNIT&,
     
    152147);
    153148}}}
    154 create_work() submits a job. The ''name'' and ''appid'' fields of the DB_WORKUNIT structure must always be initialized.
     149The ''name'' and ''appid'' fields of the DB_WORKUNIT structure must always be initialized.
    155150Other job parameters may be passed either in the DB_WORKUNIT structure or in the input template file (the latter has priority).
    156151