Changes between Initial Version and Version 1 of WrapperApp


Ignore:
Timestamp:
Apr 24, 2007, 7:02:14 PM (17 years ago)
Author:
Nicolas
Comment:

Converted by an automated script - manual changes will follow.

Legend:

Unmodified
Added
Removed
Modified
  • WrapperApp

    v1 v1  
     1= Legacy applications =
     2
     3      A '''legacy application''' is one for which an executable is available, but not the source code. Therefore it cannot use the BOINC API and runtime system. However, such applications can be run using BOINC. Here's an example:
     4 * Compile the program 'worker' from the [http://boinc.berkeley.edu/example.php boinc_samples] tree, producing (say) 'worker_5.10_windows_intelx86.exe'. This is the legacy app. If reads from stdin and writes to stdout; it also opens and reads a file 'in', and opens and writes a file 'out'. It takes one command-line argument: the number of CPU seconds to use.
     5 * Compile the program 'wrapper' from the [http://boinc.berkeley.edu/example.php boinc_samples] tree, producing (say) 'wrapper_5.10_windows_intelx86.exe'. This program executes your legacy application, and acts as a proxy for it (to report CPU time etc.).
     6 * [http://boinc.berkeley.edu/app.php Create an application] named 'worker', and a corresponding directory 'project/apps/worker'. In this directory, create a directory 'wrapper_5.10_windows_intelx86.exe'. Put the files 'wrapper_5.10_windows_intelx86.exe', and 'worker_5.10_windows_intelx86.exe' there.
     7 * In the same directory, create a file 'job.xml=job_1.12.xml' (1.12 is a version number) containing
     8{{{
     9<job_desc>
     10    <task>
     11        <application>worker_5.10_windows_intelx86.exe</application>
     12        <stdin_filename>stdin</stdin_filename>
     13        <stdout_filename>stdout</stdout_filename>
     14        <command_line>10</command_line>
     15    </task>
     16</job_desc>
     17}}}
     18      This file is read by 'wrapper'; it tells it the name of the legacy program, what files to connect to its stdin/stdout, and a command-line argument.
     19 * Create a workunit template file
     20{{{
     21<file_info>
     22    <number>0</number>
     23</file_info>
     24<file_info>
     25    <number>1</number>
     26</file_info>
     27<workunit>
     28    <file_ref>
     29        <file_number>0</file_number>
     30        <open_name>in</open_name>
     31        <copy_file/>
     32    </file_ref>
     33    <file_ref>
     34        <file_number>1</file_number>
     35        <open_name>stdin</open_name>
     36    </file_ref>
     37    <rsc_fpops_bound>1000000000000</rsc_fpops_bound>
     38    <rsc_fpops_est>1000000000000</rsc_fpops_est>
     39</workunit>
     40}}}
     41      and a result template file
     42{{{
     43<file_info>
     44    <name><OUTFILE_0/></name>
     45    <generated_locally/>
     46    <upload_when_present/>
     47    <max_nbytes>5000000</max_nbytes>
     48    <url><UPLOAD_URL/></url>
     49</file_info>
     50<file_info>
     51    <name><OUTFILE_1/></name>
     52    <generated_locally/>
     53    <upload_when_present/>
     54    <max_nbytes>5000000</max_nbytes>
     55    <url><UPLOAD_URL/></url>
     56</file_info>
     57<result>
     58    <file_ref>
     59        <file_name><OUTFILE_0/></file_name>
     60        <open_name>out</open_name>
     61        <copy_file/>
     62    </file_ref>
     63    <file_ref>
     64        <file_name><OUTFILE_1/></file_name>
     65        <open_name>stdout</open_name>
     66    </file_ref>
     67</result>
     68}}}
     69      Note that the files opened directly by the legacy program must have the <copy_file> tag.
     70 * Run [http://boinc.berkeley.edu/tool_update_versions.php update_versions] to create an app version.
     71 * Run a script like
     72{{{
     73cp download/input `bin/dir_hier_path input`
     74cp download/input2 `bin/dir_hier_path input2`
     75
     76bin/create_work -appname worker -wu_name worker_nodelete \
     77-wu_template templates/worker_wu \
     78-result_template templates/worker_result \
     79input input2
     80}}}
     81 to generate a workunit.
     82
     83Notes:
     84
     85
     86 * This requires version 5.5 or higher of the BOINC core client.
     87 * Multiple tasks per job is not implemented yet. Future versions of wrapper may allow you to run multiple applications in sequence (as specified in the job.xml file).
     88 * TODO: provide a way for projects to supply an animated GIFF which is shown (with user/team credit text) as screensaver graphics.
     89
     90  To understand how all this works: at the beginning of execution, the file layout is:
     91
     92Project directoryslot directoryjob_1.12.xml     input     input2     worker_5.10_windows_intelx86.exe     wrapper_5.10_windows_intelx86.exe          in (copy of project/input)     job.xml (link to project/job_1.12.xml)     stdin (link to project/input2)     stdout (link to project/worker_nodelete_0)     worker_5.10_windows_intelx86.exe      (link to project/worker_5.10_windows_intelx86.exe)     wrapper_5.10_windows_intelx86.exe      (link to project/wrapper_5.10_windows_intelx86.exe)     The wrapper program executes the worker, connecting its stdin to project/input2 and its stdout to project/worker_nodelete_0. The worker program opens 'in' for reading and 'out' for writing.
     93
     94When the worker program finishes, the wrapper sees this and exits. Then the the BOINC core client copies slot/out to project/worker_nodelete_1.
     95