Changes between Version 10 and Version 11 of MakeProject


Ignore:
Timestamp:
Jul 12, 2007, 11:18:27 AM (17 years ago)
Author:
ijgeneral
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • MakeProject

    v10 v11  
    6767Assuming 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'.
    6868Let'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{{{
    7070    > abc -i input.in -p parameters.in -o output.out
    71 
     71}}}
    7272Now, do the following (the paths I use are those corresponding to the Debian virtual machine; adjust accordingly to your installation):
    73 
     73{{{
    7474    > 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}}}
    7877Edit 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{{{
    8079    > make
     80}}}
    8181So far, you have created the wrapper executable.
    82 
     82{{{
    8383    > cd /home/boincadm/boinc_trunk/tools
    84 
    8584    > ./make_project abc (or any other name you want to use)
    86 
    8785    > su
    88 
    8986    > cat /home/boincadm/projects/abc/abc.httpd.conf >> /etc/apache2/httpd.conf
    90 
    9187    > apache2ctl restart
    92 
    9388    > exit
    94 
     89}}}
    9590Now, 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{{{
    9792    > cd /home/boincadm/projects/abc
    98 
    9993    > crontab abc.cronjob
    100 
    10194    > cd apps; mkdir abc; cd abc
    102 
    10395    > mkdir wrapper_1.01_i686-pc-linux-gnu (this name has the format wrapper_version_architecture-operating-system)
    104 
    10596    > cd wrapper_1.01_i686-pc-linux-gnu
    106 
    10797    > cp /home/ABC/abc abc_1.01_i686-pc-linux-gnu (use same format as with the directory above)
    108 
    10998    > cp /home/boincadm/boinc_samples/wrapper/wrapper wrapper_1.01_i686-pc-linux-gnu
    110 
    11199    > vi job.xml=job_1.01.xml
    112 
    113 The contents of this file, for the abc application, are
     100}}}
     101The contents of this file, job.xml=job_1.01.xml, for the abc application are
    114102
    115103{{{
     
    123111</job_desc>
    124112}}}
    125 
     113{{{
    126114    > cd /home/boincadm/projects/abc/templates
    127 
    128115    > vi abc_wu (this is the work-unit template)
    129 
     116}}}
    130117Contents of abc_wu:
    131 
    132118{{{
    133119<file_info>
     
    155141}}}
    156142
     143{{{
    157144    > vi abc_result (this is the results template)
    158 
     145}}}
     146Contents of abc_result:
    159147{{{
    160148<file_info>
     
    174162}}}
    175163
     164{{{
    176165    > cd ..
    177 
    178166    > vi project.xml
    179 
     167}}}
    180168and change the application name in the last few lines of the file:
    181169
     
    192180
    193181Now, 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{{{
    195183    > bin/xadd
    196 
    197184    > bin/update_versions
    198 
    199185    > bin/start
    200 
     186}}}
    201187Put 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`
    207191    > 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}}}
    209193The 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.