Changes between Version 11 and Version 12 of MakeProject
- Timestamp:
- Jul 12, 2007, 11:27:43 AM (17 years ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
MakeProject
v11 v12 61 61 || -h or --help || Show options || 62 62 63 [[BR]]64 63 65 64 = Example: Legacy application plus Wrapper setup = 66 65 67 Assuming you have a legacy application (i. e., an executable not using the Boinc API), you can make it run under B oincthrough 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'.66 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 67 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 68 {{{ 70 69 > abc -i input.in -p parameters.in -o output.out 71 70 }}} 72 71 Now, do the following (the paths I use are those corresponding to the Debian virtual machine; adjust accordingly to your installation): 73 72 {{{ 74 75 73 > cd /home/boincadm/boinc_samples/wrapper 74 > ln -s `g++ -print-file-name=libstdc++.a` 76 75 }}} 77 76 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). 78 77 {{{ 79 78 > make 80 79 }}} 81 80 So far, you have created the wrapper executable. 82 81 {{{ 83 84 85 86 87 88 82 > cd /home/boincadm/boinc_trunk/tools 83 > ./make_project abc (or any other name you want to use) 84 > su 85 > cat /home/boincadm/projects/abc/abc.httpd.conf >> /etc/apache2/httpd.conf 86 > apache2ctl restart 87 > exit 89 88 }}} 90 89 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. 91 90 {{{ 92 93 94 95 96 97 98 99 91 > cd /home/boincadm/projects/abc 92 > crontab abc.cronjob 93 > cd apps; mkdir abc; cd abc 94 > mkdir wrapper_1.01_i686-pc-linux-gnu (this name has the format wrapper_version_architecture-operating-system) 95 > cd wrapper_1.01_i686-pc-linux-gnu 96 > cp /home/ABC/abc abc_1.01_i686-pc-linux-gnu (use same format as with the directory above) 97 > cp /home/boincadm/boinc_samples/wrapper/wrapper wrapper_1.01_i686-pc-linux-gnu 98 > vi job.xml=job_1.01.xml 100 99 }}} 101 The contents of this file, job.xml=job_1.01.xml, for the abc application are100 The contents of this file, `job.xml=job_1.01.xml`, for the abc application are 102 101 103 102 {{{ … … 112 111 }}} 113 112 {{{ 114 115 113 > cd /home/boincadm/projects/abc/templates 114 > vi abc_wu (this is the work-unit template) 116 115 }}} 117 116 Contents of abc_wu: … … 142 141 143 142 {{{ 144 143 > vi abc_result (this is the results template) 145 144 }}} 146 Contents of abc_result:145 Contents of `abc_result`: 147 146 {{{ 148 147 <file_info> … … 163 162 164 163 {{{ 165 166 164 > cd .. 165 > vi project.xml 167 166 }}} 168 167 and change the application name in the last few lines of the file: … … 177 176 }}} 178 177 179 Check the file 'config.xml' to see if the ip address there is correct and change the value of <disable_account_creation>from 1 to 0 if you want to enable account creations. Also, at the end of this file is where you can change or add daemons to control your application.178 Check the file 'config.xml' to see if the IP address there is correct and change the value of `<disable_account_creation>` from 1 to 0 if you want to enable account creations. Also, at the end of this file is where you can change or add daemons to control your application. 180 179 181 Now, you have all the files in place, so let's tell B oincto add the project to the database and to copy the files it will need to the download directory. Then, start the project's daemons:180 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: 182 181 {{{ 183 184 185 182 > bin/xadd 183 > bin/update_versions 184 > bin/start 186 185 }}} 187 186 Put your input files (input.in and parameters.in) in /home/boincadm/projects/abc/download/. Then do: 188 187 {{{ 189 190 191 188 > cp download/input.in `bin/dir_hier_path input.in` 189 > cp download/parameters.in `bin/dir_hier_path parameters.in` 190 > bin/create_work -appname abc -wu_name abc-nodelete01 -wu_template templates/abc_wu -result_template templates/abc_result input.in parameters.in 192 191 }}} 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 B oincclient.192 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.