Changes between Initial Version and Version 1 of JobTemplates


Ignore:
Timestamp:
Feb 15, 2013, 2:23:18 PM (12 years ago)
Author:
davea
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • JobTemplates

    v1 v1  
     1= Input and output templates =
     2
     3== Input template files ==
     4
     5An input template file has the form
     6{{{
     7
     8<input_template>
     9    <file_info>
     10        <number>0</number>
     11        [ <gzip/> ]
     12        [ <sticky/> ]
     13        [ <no_delete/> ]
     14        [ <report_on_rpc/> ]
     15        [ <url>...</url> ]
     16        [ <url>...</url> ]
     17        [ <md5_cksum>...</md5_cksum> ]
     18        [ <nbytes>...</nbytes> ]
     19    </file_info>
     20    [ ... other files  ]
     21    <workunit>
     22        <file_ref>
     23            <file_number>0</file_number>
     24            <open_name>NAME</open_name>
     25            [ <copy_file/> ]
     26        </file_ref>
     27        [ ... other files ]
     28        [ <command_line>-flags xyz</command_line> ]
     29        [ <rsc_fpops_est>x</rsc_fpops_est> ]
     30        [ <rsc_fpops_bound>x</rsc_fpops_bound> ]
     31        [ <rsc_memory_bound>x</rsc_memory_bound> ]
     32        [ <rsc_disk_bound>x</rsc_disk_bound> ]
     33        [ <delay_bound>x</delay_bound> ]
     34        [ <min_quorum>x</min_quorum> ]
     35        [ <target_nresults>x</target_nresults> ]
     36        [ <max_error_results>x</max_error_results> ]
     37        [ <max_total_results>x</max_total_results> ]
     38        [ <max_success_results>x</max_success_results> ]
     39    </workunit>
     40</input_template>
     41}}}
     42Elements and tags must be on separate lines as shown.
     43The components are:
     44
     45 '''<file_info>''':: describes an [BoincFiles#Fileproperties input file].
     46  '''<number>''':: use 0, 1, ...
     47  '''<gzip/>''':: transfer the file in gzipped (compressed) format to reduce network usage.  '''You must stage the file with the --gzip option (see below)'''.  Only 7.0+ clients can handle compressed transfers; older clients will get the file in uncompressed form.
     48  '''<sticky/>''':: if present, the file remains on the client after job is finished.
     49  '''<no_delete/>''':: if present, the file is not deleted from the server after job is completed.  Use this if the file is used as input to more than one job.
     50  '''<report_on_rpc/>''':: if present, report file in each scheduler request (for sticky files)
     51  '''<url>, <md5_cksum>, <nbytes>''':: used only for "non-local" input files (see below)
     52
     53 '''<file_ref>''':: describes [BoincFiles#Filereferences the way the file is referenced].
     54  '''<file_number>''':: 0, 1, etc.
     55  '''<open_name>''':: the logical name of the file
     56  '''<copy_file>''':: if present, the file is copied into the job's slot directory
     57
     58 '''<command_line>''':: The command-line arguments to be passed to the main program.
     59  Note: if you're using the [WrapperApp BOINC wrapper],
     60  use <append_cmdline_args/> in your job.xml file to pass command-line arguments from the wrapper
     61  to the wrapped application.
     62
     63 '''<rsc_fpops_est>''' etc.::
     64   [JobIn Job attributes] such has how much disk space will be used.
     65   BOINC will supply reasonable defaults for these,
     66   but you should supply the correct values;
     67   otherwise, for example, BOINC might try to run the job
     68   on a host with insufficient disk space.
     69
     70Notes:
     71 * The input template is copied into a BLOB column of the workunit table and will substitute filenames,
     72  and have download urls, signatures and other elements inserted into your provided template.
     73  The total expanded BLOB cannot exceed 65,535 bytes.
     74  This is enough for about 200 input files,
     75  fewer if you use long file names are multiple download URLs.
     76  If this isn't enough, you can use [FileCompression BOINC file compression] to zip several files into a single file reference for download,
     77  and expanding them prior to running on the client machine.
     78
     79== Output template files ==
     80
     81An output template file has the form
     82{{{
     83<output_template>
     84    <file_info>
     85        <name><OUTFILE_0/></name>
     86        <generated_locally/>
     87        <upload_when_present/>
     88        <max_nbytes>32768</max_nbytes>
     89        <url><UPLOAD_URL/></url>
     90    </file_info>
     91    <result>
     92        <file_ref>
     93            <file_name><OUTFILE_0/></file_name>
     94            <open_name>result.sah</open_name>
     95            [ <copy_file>0|1</copy_file> ]
     96            [ <optional>0|1</optional> ]
     97            [ <no_validate>0|1</no_validate> ]
     98        </file_ref>
     99        [ <report_immediately/> ]
     100    </result>
     101</output_template>
     102}}}
     103
     104Elements and tags must be on separate lines as shown.
     105The elements include:
     106
     107 '''<file_info>''':: describes an output file.
     108 '''<name>''':: the physical file name.
     109  Typically use <OUTFILE_0>, <OUTFILE_1> etc.;
     110  BOINC will replace this with a generated name based on the job name.
     111
     112 '''<file_ref>''':: describes how an output file will be referenced by the application.
     113 '''<open_name>''':: the "logical name" by which the application will reference the file.
     114 '''<copy_file/>''':: if present, the file will be generated in the slot directory,
     115   and copied to the project directory after the job has finished.
     116   Use this for [WrapperApp legacy applications].
     117 '''<generated_locally/>''':: always include this for output files.
     118 '''<max_nbytes>''':: maximum file size.
     119  If the actual size exceeds this, the file will not be uploaded,
     120  and the job will be marked as an error.
     121 '''<url>''':: the URL of the file upload handler.
     122  You may include this explicitly, or use '''<UPLOAD_URL/>'''
     123  to use the URL in your project's config.xml file.
     124 '''<optional>''':: if 0 or absent, your application must create the file,
     125  otherwise the job will be marked as an error.
     126 '''<no_validate>''':: if true, don't include this file in the result validation process
     127  (relevant only if you are using the sample bitwise validator).
     128 '''<no_delete/>''':: if present, the file will not be deleted on the server
     129  even after the job is finished.
     130
     131 '''<report_immediately/>''':: if present, clients will report this job
     132  immediately after the output files are uploaded.
     133  Otherwise they may wait up to a day.
     134  (Implemented in 6.12.27+ clients only).
     135
     136Note: when a job is created, the name of its output template file is stored in the database.
     137The file is read when instances of the job are created, which may happen days or weeks later.
     138Thus, editing an output template file can affect existing jobs.
     139If this is not desired, you must create a new output template file.
     140
     141You can safely remove an input template file after creating your last job with it.
     142However, output template files must exist until any task that refers to it is completed
     143(i.e. no more replicas will be created).
     144
     145In general, you should not attempt to use more then 50 files in your output template.
     146This is because the provided template will have upload URLs, and file names expanded, and signatures added to it.
     147The total size of the result must remain under 65,535 bytes to fit in the xml_doc_in and xml_doc_out BLOBs in the result table.
     148Your actual limit on number of files will depend upon the length of your job names, and upload URLs.
     149If your expanded output template is approaching the size limit,
     150you can use [FileCompression BOINC file compression] to zip several files
     151into a single file reference for upload, prior to completing each task on the client machine.
     152Once you have run some jobs through your project,
     153you can compare the size of the expanded xml with the 65,535 limit by running the following MySQL statement:[[BR]]
     154{{{select max(length(xml_doc_in)), max(length(xml_doc_out)) from result;}}}[[BR]]
     155Note that here "_in" and "_out" are both references to the output template.
     156"_in" being when the task was created, and "_out" how it looked,
     157with actual file sizes and checksums, at the time the task was returned.
     158So don't confuse these column names with the "input" and "output" templates.