85 | | == Physical file management == |
86 | | |
87 | | You can use the wrapper together with [PhysicalFileManagement physical file management], |
88 | | where you directly access files in your project directory. |
89 | | For example, you could create a job whose first task unpacks a zip file |
90 | | into the project directory, |
91 | | and whose subsequent tasks access these files. |
92 | | |
93 | | The support for this is: |
94 | | |
95 | | * If a worker program name begins with "$PROJECT_DIR", that substring is replaced with the project directory, and the name is treated as a physical name. |
96 | | * In task command lines, "$PROJECT_DIR" is replaced with the project directory. |
97 | | |
98 | | == Graphics == |
99 | | |
100 | | You can include a [GraphicsApi graphics app] with a wrapper-based application. |
106 | | with root directory PROJECT/, |
107 | | and that you have an executable program for a particular target platform |
108 | | (say "worker_windows_intelx6_0.exe" for Win32) |
109 | | |
110 | | * Download the wrapper for the target platform (see links above) to your server. |
111 | | * [AppVersion Create an application] named 'worker' and a corresponding directory |
112 | | 'PROJECT/apps/worker'. In this directory, |
113 | | create a directory 'wrapper_windows_intelx86_22420.exe'. |
114 | | Put the files 'wrapper_windows_intelx86_22420.exe', |
115 | | and 'worker_windows_intelx86_0.exe' there. |
116 | | Rename the latter file to 'worker=worker_windows_intelx86_0.exe' |
117 | | (this gives it the logical name 'worker'). |
118 | | * In the same directory, create a file 'job.xml=job_1.12.xml' |
119 | | (1.12 is a version number) containing |
| 93 | with root directory PROJECT/. |
| 94 | Now |
| 95 | * Download the wrapper for Win32 (see links above) to your server |
| 96 | .Assume the filename is '''wrapper_windows_intelx86_22420.exe'''. |
| 97 | * [AppVersion Create an application] named 'worker'. |
| 98 | * Create the directory hierarchy |
| 99 | {{{ |
| 100 | apps/ |
| 101 | worker/ |
| 102 | 1.0/ |
| 103 | windows_intelx86/ |
| 104 | }}} |
| 105 | * Put the files '''wrapper_windows_intelx86_22420.exe''' |
| 106 | and '''worker_windows_intelx86_0.exe''' in the bottom directory. |
| 107 | * In the same directory, create a file '''worker_job_1.0.xml''' |
| 108 | (1.0 is a version number) containing |
130 | | This file (which has logical name 'job.xml' and physical name 'job_1.12.xml') is read by 'wrapper'; it tells it the name of the worker program, what files to connect to its stdin/stdout, and a command line. |
| 119 | * In the same directory, create a file '''version.xml''' containing |
| 120 | {{{ |
| 121 | <version> |
| 122 | <file> |
| 123 | <physical_name>wrapper_windows_intelx86_22420.exe</physical_name> |
| 124 | <main_program/> |
| 125 | </file> |
| 126 | <file> |
| 127 | <physical_name>worker_windows_intelx86_0.exe</physical_name> |
| 128 | <logical_name>worker</logical_name> |
| 129 | </file> |
| 130 | <file> |
| 131 | <physical_name>worker_job_1.0.xml</physical_name> |
| 132 | <logical_name>job.xml</logical_name> |
| 133 | </file> |
| 134 | </version> |
| 135 | }}} |
194 | | to generate a workunit. The input files in the 'create_work' command must be in the same order as in the workunit template file (worker_wu). Otherwise the client will generate errors when processing the workunit. |
195 | | |
196 | | To understand how all this works: at the beginning of execution, the file layout is: |
197 | | |
198 | | ||'''Project directory'''||'''slot directory'''|| |
199 | | ||input||in (copy of project/input)|| |
200 | | ||job_1.12.xml||job.xml (link to project/job_1.12.xml)|| |
201 | | ||input2||stdin (link to project/input2)|| |
202 | | ||worker_nodelete_0||stdout (link to project/worker_nodelete_0)|| |
203 | | ||worker_5.10_windows_intelx86.exe||worker (link to project/worker_5.10_windows_intelx86.exe) |
204 | | ||wrapper_5.10_windows_intelx86.exe||wrapper_5.10_windows_intelx86.exe (link to project/wrapper_5.10_windows_intelx86.exe) || |
205 | | |
206 | | The wrapper program executes the worker, connecting its stdin to project/input2 and its stdout to project/worker_nodelete_0. |
207 | | |
208 | | The worker program opens 'in' for reading and 'out' for writing. |
209 | | |
210 | | When the worker program finishes, the wrapper sees this and exits. |
211 | | Then the BOINC core client copies slot/out to project/worker_nodelete_1. |
| 181 | to generate a workunit. |
| 182 | |
| 183 | == Physical file management == |
| 184 | |
| 185 | You can use the wrapper together with [PhysicalFileManagement physical file management], |
| 186 | where you directly access files in your project directory. |
| 187 | For example, you could create a job whose first task unpacks a zip file |
| 188 | into the project directory, |
| 189 | and whose subsequent tasks access these files. |
| 190 | |
| 191 | The support for this is: |
| 192 | |
| 193 | * If a worker program name begins with "$PROJECT_DIR", that substring is replaced with the project directory, and the name is treated as a physical name. |
| 194 | * In task command lines, "$PROJECT_DIR" is replaced with the project directory. |
| 195 | |
| 196 | == Graphics == |
| 197 | |
| 198 | You can include a [GraphicsApi graphics app] with a wrapper-based application. |