~ubuntu-branches/ubuntu/lucid/boinc/lucid

« back to all changes in this revision

Viewing changes to doc/wrapper.php

  • Committer: Bazaar Package Importer
  • Author(s): Frank S. Thomas, Frank S. Thomas
  • Date: 2008-05-31 08:02:47 UTC
  • mfrom: (1.1.8 upstream)
  • Revision ID: james.westby@ubuntu.com-20080531080247-4ce890lp2rc768cr
Tags: 6.2.7-1
[ Frank S. Thomas ]
* New upstream release.
  - BOINC Manager: Redraw disk usage charts immediately after connecting to
    a (different) client. (closes: 463823)
* debian/copyright:
  - Added the instructions from debian/README.Debian-source about how
    repackaged BOINC tarballs can be reproduced because DevRef now
    recommends to put this here instead of in the afore-mentioned file.
  - Updated for the new release.
* Removed the obsolete debian/README.Debian-source.
* For consistency upstream renamed the core client and the command tool
  ("boinc_client" to "boinc" and "boinc_cmd" to "boinccmd"). Done the same
  in all packages and created symlinks with the old names for the binaries
  and man pages. Also added an entry in debian/boinc-client.NEWS explaining
  this change.
* debian/rules: Do not list Makefile.ins in the clean target individually,
  just remove all that can be found.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
<?php
2
 
require_once("docutil.php");
3
 
page_head("Legacy applications");
4
 
echo "
5
 
A <b>legacy application</b> is one for which an executable is available,
6
 
but not the source code.
7
 
Therefore it cannot use the BOINC API and runtime system.
8
 
However, such applications can be run using BOINC.
9
 
Here's an example:
10
 
<ul>
11
 
<li>
12
 
Compile the program 'worker' from the
13
 
<a href=example.php>boinc_samples</a> tree,
14
 
producing (say) 'worker_5.10_windows_intelx86.exe'.
15
 
This is the legacy app.
16
 
If reads from stdin and writes to stdout;
17
 
it also opens and reads a file 'in',
18
 
and opens and writes a file 'out'.
19
 
It takes one command-line argument:
20
 
the number of CPU seconds to use.
21
 
 
22
 
<li>
23
 
Compile the program 'wrapper' from the
24
 
<a href=example.php>boinc_samples</a> tree,
25
 
producing (say) 'wrapper_5.10_windows_intelx86.exe'.
26
 
This program executes your legacy application,
27
 
and acts as a proxy for it (to report CPU time etc.).
28
 
 
29
 
<li>
30
 
<a href=app.php>Create an application</a> named 'worker',
31
 
and a corresponding directory 'project/apps/worker'.
32
 
In this directory, create
33
 
a directory 'wrapper_5.10_windows_intelx86.exe'.
34
 
Put the files 'wrapper_5.10_windows_intelx86.exe',
35
 
and 'worker_5.10_windows_intelx86.exe' there.
36
 
 
37
 
<li> In the same directory,
38
 
create a file 'job.xml=job_1.12.xml' (1.12 is a version number) containing
39
 
".html_text("
40
 
<job_desc>
41
 
    <task>
42
 
        <application>worker_5.10_windows_intelx86.exe</application>
43
 
        <stdin_filename>stdin</stdin_filename>
44
 
        <stdout_filename>stdout</stdout_filename>
45
 
        <command_line>10</command_line>
46
 
    </task>
47
 
</job_desc>
48
 
")."
49
 
This file is read by 'wrapper';
50
 
it tells it the name of the legacy program,
51
 
what files to connect to its stdin/stdout, and a command-line argument.
52
 
<li>
53
 
Create a workunit template file
54
 
".html_text("
55
 
<file_info>
56
 
    <number>0</number>
57
 
</file_info>
58
 
<file_info>
59
 
    <number>1</number>
60
 
</file_info>
61
 
<workunit>
62
 
    <file_ref>
63
 
        <file_number>0</file_number>
64
 
        <open_name>in</open_name>
65
 
        <copy_file/>
66
 
    </file_ref>
67
 
    <file_ref>
68
 
        <file_number>1</file_number>
69
 
        <open_name>stdin</open_name>
70
 
    </file_ref>
71
 
    <rsc_fpops_bound>1000000000000</rsc_fpops_bound>
72
 
    <rsc_fpops_est>1000000000000</rsc_fpops_est>
73
 
</workunit>
74
 
")."
75
 
and a result template file
76
 
".html_text("
77
 
<file_info>
78
 
    <name><OUTFILE_0/></name>
79
 
    <generated_locally/>
80
 
    <upload_when_present/>
81
 
    <max_nbytes>5000000</max_nbytes>
82
 
    <url><UPLOAD_URL/></url>
83
 
</file_info>
84
 
<file_info>
85
 
    <name><OUTFILE_1/></name>
86
 
    <generated_locally/>
87
 
    <upload_when_present/>
88
 
    <max_nbytes>5000000</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>out</open_name>
95
 
        <copy_file/>
96
 
    </file_ref>
97
 
    <file_ref>
98
 
        <file_name><OUTFILE_1/></file_name>
99
 
        <open_name>stdout</open_name>
100
 
    </file_ref>
101
 
</result>
102
 
")."
103
 
Note that the files opened directly by the legacy program
104
 
must have the &lt;copy_file&gt; tag.
105
 
<li>
106
 
Run <a href=tool_update_versions.php>update_versions</a>
107
 
to create an app version.
108
 
 
109
 
<li>
110
 
Run a script like
111
 
<pre>
112
 
cp download/input `bin/dir_hier_path input`
113
 
cp download/input2 `bin/dir_hier_path input2`
114
 
 
115
 
bin/create_work -appname worker -wu_name worker_nodelete \
116
 
-wu_template templates/worker_wu \
117
 
-result_template templates/worker_result \
118
 
input input2
119
 
</pre>
120
 
to generate a workunit.
121
 
 
122
 
</ul>
123
 
 
124
 
<p>
125
 
Notes:
126
 
<ul>
127
 
<li> This requires version 5.5 or higher of the BOINC core client.
128
 
<li> Multiple tasks per job is not implemented yet.
129
 
Future versions of wrapper may allow you to
130
 
run multiple applications in sequence
131
 
(as specified in the job.xml file).
132
 
<li> TODO: provide a way for projects to supply an animated GIFF
133
 
which is shown (with user/team credit text) as screensaver graphics.
134
 
</ul>
135
 
 
136
 
To understand how all this works:
137
 
at the beginning of execution, the file layout is:
138
 
";
139
 
list_start();
140
 
list_heading_array(array("Project directory", "slot directory"));
141
 
list_item_array(array(
142
 
    "job_1.12.xml
143
 
    <br>input
144
 
    <br>input2
145
 
    <br>worker_5.10_windows_intelx86.exe
146
 
    <br>wrapper_5.10_windows_intelx86.exe
147
 
    ",
148
 
    "
149
 
    in (copy of project/input)
150
 
    <br>job.xml (link to project/job_1.12.xml)
151
 
    <br>stdin (link to project/input2)
152
 
    <br>stdout (link to project/worker_nodelete_0)
153
 
    <br>worker_5.10_windows_intelx86.exe
154
 
     (link to project/worker_5.10_windows_intelx86.exe)
155
 
    <br>wrapper_5.10_windows_intelx86.exe
156
 
     (link to project/wrapper_5.10_windows_intelx86.exe)
157
 
    "
158
 
));
159
 
list_end();
160
 
 
161
 
echo "
162
 
The wrapper program executes the worker,
163
 
connecting its stdin to project/input2
164
 
and its stdout to project/worker_nodelete_0.
165
 
The worker program opens 'in' for reading and 'out' for writing.
166
 
<p>
167
 
When the worker program finishes, the wrapper sees this and exits.
168
 
Then the the BOINC core client copies
169
 
slot/out to project/worker_nodelete_1.
170
 
";
171
 
 
172
 
page_tail();
173
 
?>