Config XML Syntax

From Legion
Jump to: navigation, search
Language: English  • Español

Contents

Basic mode

Job is pre-existent so we only need to send command lines.

<task>
   <name>{Form:txtName}</name>
   <description>{Form:txtDescription}</description>
   <basic_mode/>
   <works>
     <workunit>cmd wu1</workunit>
     <workunit>cmd wu2</workunit>
     <workunit>cmd wu3</workunit>
     ...
   </works>
   <out_file>
     <type>cat</type>
     <name>output1.txt</name>
   </out_file>
   <out_file>
     <type>cat</type>
     <name>output2.txt</name>
   </out_file>
 </task>

HINT. A way of generating the workunit tags is with the template interpreter and split method. Check Template Interpreter for more details.

 <workunit>{Split:txtTasks:\n}</workunit>

This will generate before task is sent to Legion WS.

 <workunit>line 1</workunit>
 <workunit>line 2</workunit>
 <workunit>line 3</workunit>

And for counting the number of WU's just do the following:

 {SplitCount:txtTasks:\n}

Loop mode

The loop mode allows to iterate over some replacement variables. For more details about the following example check this. Remember that only one exec_file is admitted for the loop mode.

 <task>
   <name>{Form:txtName}</name>
   <desc>{Form:txtDescription}</desc>
   <exec_file>
     <name>integrador</name>
     <cmd>"{Form:txtFx}" {x} {Form:txtStep} {Form:txtPrecision}</cmd>
     <compress>1</compress>
     <extern/>	
     <process>
       <tag>x</tag>
       <start>{Form:txtStart}</start>
       <stop>{Form:txtStop}</stop>
       <step>{Form:txtStep}</step>
     </process>
   </exec_file>
   <out_file>
     <type>cat</type>
     <name>result.txt</name>
   </out_file>
 </task>

The process tag

The process tag is an specification for loop based workunit generator.

 <process>
   <tag>x</tag>
   <start>0</start>
   <stop>200</stop>
   <step>50</step>
 </process>

The above process tag will replace each occurrence of {x} with the generated value. Each replacement will generate a work unit. In this example the {x} tag will take the following values: 0, 50, 100, 150 (a total of 4 values).

It is also possible to have several process tags for a single exec_file.

 <process>
   <tag>x</tag>
   <start>0</start>
   <stop>100</stop>
   <step>50</step>
 </process>
 <process>
   <tag>y</tag>
   <start>0</start>
   <stop>100</stop>
   <step>50</step>
 </process>

The above example will generate for the "{x} {y}" command line.

 0 0, 0 50, 50 0, 50 50 

Extended mode

The extended mode does not allow loops, but a series of exec_files with custom command lines.

Hints

  • Using the <extern/> tag in an exec_file means that the file is sent via the web service, if the tag is not there the file is supposed to be already present in the BOINC files.
  • The <compress>0</compress> or <compress>1</compress> tag inside an <exec_file> tag means that all results files are going to be zipped or not.
  • The <type>cat</type> tag inside an out_file means that all work unit's output of this file is going to be concatenated.
  • If you need input files to be distributed along execution nodes you might require to add an file in the form. Remember that other files present in the project creation precedes the ones which are uploaded in the form. Nevertheless, the internal order must be maintained.
  <task>
   <name>{Form:txtName}</name>
   <desc>{Form:txtDescription}</desc>
   <exec_file>
     <name>upper</name>
     <cmd>{x} {Form:txtWuNumber}</cmd>
     <compress>{Project:compress}</compress>	
     <extern/>
     <process>
       <tag>x</tag>
       <start>1</start>
       <stop>{Math:{Form:txtWuNumber}+1}</stop>
       <step>1</step>
     </process>
   </exec_file>
   <other_file>
     <name>input.txt</name>
   </other_file>
   <out_file>
     <type>cat</type>
     <name>output.txt</name>
   </out_file>
  </task>
Personal tools
Namespaces

Variants
Views
Actions
Navigation
Legion Web Interface
Legion Web Service
Installation guide
Centralized BOINC Server Management
navigation end