Changes between Version 11 and Version 12 of MakeProject


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

Formatting

Legend:

Unmodified
Added
Removed
Modified
  • MakeProject

    v11 v12  
    6161|| -h or --help         || Show options ||
    6262
    63 [[BR]]
    6463
    6564= Example: Legacy application plus Wrapper setup =
    6665
    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'.
     66Assuming 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'.
    6867Let'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:
    6968{{{
    70     > abc -i input.in -p parameters.in -o output.out
     69> abc -i input.in -p parameters.in -o output.out
    7170}}}
    7271Now, do the following (the paths I use are those corresponding to the Debian virtual machine; adjust accordingly to your installation):
    7372{{{
    74     > cd /home/boincadm/boinc_samples/wrapper
    75     > ln -s `g++ -print-file-name=libstdc++.a`
     73> cd /home/boincadm/boinc_samples/wrapper
     74> ln -s `g++ -print-file-name=libstdc++.a`
    7675}}}
    7776Edit 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).
    7877{{{
    79     > make
     78> make
    8079}}}
    8180So far, you have created the wrapper executable.
    8281{{{
    83     > cd /home/boincadm/boinc_trunk/tools
    84     > ./make_project abc (or any other name you want to use)
    85     > su
    86     > cat /home/boincadm/projects/abc/abc.httpd.conf >> /etc/apache2/httpd.conf
    87     > apache2ctl restart
    88     > exit
     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
    8988}}}
    9089Now, 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.
    9190{{{
    92     > cd /home/boincadm/projects/abc
    93     > crontab abc.cronjob
    94     > cd apps; mkdir abc; cd abc
    95     > mkdir wrapper_1.01_i686-pc-linux-gnu (this name has the format wrapper_version_architecture-operating-system)
    96     > cd wrapper_1.01_i686-pc-linux-gnu
    97     > cp /home/ABC/abc abc_1.01_i686-pc-linux-gnu (use same format as with the directory above)
    98     > cp /home/boincadm/boinc_samples/wrapper/wrapper wrapper_1.01_i686-pc-linux-gnu
    99     > vi job.xml=job_1.01.xml
     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
    10099}}}
    101 The contents of this file, job.xml=job_1.01.xml, for the abc application are
     100The contents of this file, `job.xml=job_1.01.xml`, for the abc application are
    102101
    103102{{{
     
    112111}}}
    113112{{{
    114     > cd /home/boincadm/projects/abc/templates
    115     > vi abc_wu (this is the work-unit template)
     113> cd /home/boincadm/projects/abc/templates
     114> vi abc_wu (this is the work-unit template)
    116115}}}
    117116Contents of abc_wu:
     
    142141
    143142{{{
    144     > vi abc_result (this is the results template)
     143> vi abc_result (this is the results template)
    145144}}}
    146 Contents of abc_result:
     145Contents of `abc_result`:
    147146{{{
    148147<file_info>
     
    163162
    164163{{{
    165     > cd ..
    166     > vi project.xml
     164> cd ..
     165> vi project.xml
    167166}}}
    168167and change the application name in the last few lines of the file:
     
    177176}}}
    178177
    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.
     178Check 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.
    180179
    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:
     180Now, 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:
    182181{{{
    183     > bin/xadd
    184     > bin/update_versions
    185     > bin/start
     182> bin/xadd
     183> bin/update_versions
     184> bin/start
    186185}}}
    187186Put your input files (input.in and parameters.in) in /home/boincadm/projects/abc/download/. Then do:
    188187{{{
    189     > cp download/input.in `bin/dir_hier_path input.in`
    190     > cp download/parameters.in `bin/dir_hier_path parameters.in`
    191     > bin/create_work -appname abc -wu_name abc-nodelete01 -wu_template templates/abc_wu -result_template templates/abc_result input.in parameters.in
     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
    192191}}}
    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.
     192The 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.