Changes between Version 10 and Version 11 of MakeProject
- Timestamp:
- Jul 12, 2007, 11:18:27 AM (17 years ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
MakeProject
v10 v11 67 67 Assuming you have a legacy application (i. e., an executable not using the Boinc API), you can make it run under Boinc through the use of the wrapper application. In case you don't already have that application, you can download it, along with some other samples, doing 'svn co http://boinc.berkeley.edu/svn/trunk/boinc_samples'. 68 68 Let's say that your application is located at /home/ABC/ and the name of the executable is abc. Assume that the command needed to run it is: 69 69 {{{ 70 70 > abc -i input.in -p parameters.in -o output.out 71 71 }}} 72 72 Now, do the following (the paths I use are those corresponding to the Debian virtual machine; adjust accordingly to your installation): 73 73 {{{ 74 74 > cd /home/boincadm/boinc_samples/wrapper 75 76 > ln -s 'g++ -print-file-name=libstdc++.a' 77 75 > ln -s `g++ -print-file-name=libstdc++.a` 76 }}} 78 77 Edit the Makefile for wrapper and change the BOINC_DIR variable according to your installation (in the Debian virtual machine this would be BOINC_DIR=/home/boincadm/boinc_trunk). 79 78 {{{ 80 79 > make 80 }}} 81 81 So far, you have created the wrapper executable. 82 82 {{{ 83 83 > cd /home/boincadm/boinc_trunk/tools 84 85 84 > ./make_project abc (or any other name you want to use) 86 87 85 > su 88 89 86 > cat /home/boincadm/projects/abc/abc.httpd.conf >> /etc/apache2/httpd.conf 90 91 87 > apache2ctl restart 92 93 88 > exit 94 89 }}} 95 90 Now, you have created the directory structure for your project, named abc, with some project's control files. Also, you have modified the Apache configuration to make it serve your project. 96 91 {{{ 97 92 > cd /home/boincadm/projects/abc 98 99 93 > crontab abc.cronjob 100 101 94 > cd apps; mkdir abc; cd abc 102 103 95 > mkdir wrapper_1.01_i686-pc-linux-gnu (this name has the format wrapper_version_architecture-operating-system) 104 105 96 > cd wrapper_1.01_i686-pc-linux-gnu 106 107 97 > cp /home/ABC/abc abc_1.01_i686-pc-linux-gnu (use same format as with the directory above) 108 109 98 > cp /home/boincadm/boinc_samples/wrapper/wrapper wrapper_1.01_i686-pc-linux-gnu 110 111 99 > vi job.xml=job_1.01.xml 112 113 The contents of this file, for the abc application,are100 }}} 101 The contents of this file, job.xml=job_1.01.xml, for the abc application are 114 102 115 103 {{{ … … 123 111 </job_desc> 124 112 }}} 125 113 {{{ 126 114 > cd /home/boincadm/projects/abc/templates 127 128 115 > vi abc_wu (this is the work-unit template) 129 116 }}} 130 117 Contents of abc_wu: 131 132 118 {{{ 133 119 <file_info> … … 155 141 }}} 156 142 143 {{{ 157 144 > vi abc_result (this is the results template) 158 145 }}} 146 Contents of abc_result: 159 147 {{{ 160 148 <file_info> … … 174 162 }}} 175 163 164 {{{ 176 165 > cd .. 177 178 166 > vi project.xml 179 167 }}} 180 168 and change the application name in the last few lines of the file: 181 169 … … 192 180 193 181 Now, you have all the files in place, so let's tell Boinc to add the project to the database and to copy the files it will need to the download directory. Then, start the project's daemons: 194 182 {{{ 195 183 > bin/xadd 196 197 184 > bin/update_versions 198 199 185 > bin/start 200 186 }}} 201 187 Put your input files (input.in and parameters.in) in /home/boincadm/projects/abc/download/. Then do: 202 203 > cp download/input.in 'bin/dir_hier_path input.in' 204 205 > cp download/parameters.in 'bin/dir_hier_path parameters.in' 206 188 {{{ 189 > cp download/input.in `bin/dir_hier_path input.in` 190 > cp download/parameters.in `bin/dir_hier_path parameters.in` 207 191 > bin/create_work -appname abc -wu_name abc-nodelete01 -wu_template templates/abc_wu -result_template templates/abc_result input.in parameters.in 208 192 }}} 209 193 The last step creates a workunit. This will be sent to a client attached to this project, who will perform the required work and return the results to the upload directory. The project should be functional and accessible now to any Boinc client.