Changes between Version 19 and Version 20 of AppDebug


Ignore:
Timestamp:
Oct 7, 2009, 12:04:33 PM (15 years ago)
Author:
davea
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • AppDebug

    v19 v20  
    33Some suggestions for debugging applications:
    44
    5 == Standalone mode ==
     5== Testing without a BOINC client ==
    66
    7 When you have built your application and linked it with the BOINC libraries, you can run it in 'standalone mode' (without a BOINC core client present). To do this, put instances of all input files in the same directory (with the proper logical, not physical, names). The application should run and produce output files (also with their logical names). You can run the program under a debugger. When you run an application in standalone mode, the BOINC API will recognize this and take it into account. A couple of things to note:
    8  * If your application does graphics, it will open a graphics window. Closing this window will exit your application.
    9  * boinc_time_to_checkpoint() will always return false, so your application will never checkpoint.
     7When you have built your application and linked it with the BOINC libraries,
     8you can run it in 'standalone mode' (without a BOINC core client present).
     9To do this, put instances of all input files in the same directory (with the proper logical, not physical, names).
     10The application should run and produce output files (also with their logical names).
     11You can run the program under a debugger.
     12When you run an application in standalone mode, the BOINC API will recognize this and take it into account.
    1013
    11 == Using the anonymous platform mechanism ==
     14Note: {{{boinc_time_to_checkpoint()}}} will always return false, so your application will never checkpoint.
    1215
    13 Once your application works in standalone mode you'll want to run it from the BOINC core client. This will exercise the various forms of interaction with the core client. To get this process started, create a test project, add an application version and some work, then run the core client. It will download everything and run your application, which will possibly crash.
    14 At this point you'll want to start experimenting with your application. It would be very tedious to create a new application version for each change. It's far easier to use BOINC's [AnonymousPlatform anonymous platform] mechanism. To do this:
     16== Testing with a BOINC client but no project ==
     17
     18Once your application works in standalone mode,
     19the next step is to run it under the BOINC client.
     20This will exercise the various forms of interaction with the client.
     21If you already have a working project, skip to the next section.
     22
     23You can test an application under the BOINC client,
     24but without a project server, as shown in the following example.
     25This example assumes that your executable name is '''test.exe''',
     26and that it has an input file with logical name '''in''' and physical name '''input.txt''',
     27and an output file with logical name '''out''' and physical name '''output.txt'''.
     28
     29 * Make a directory and put the BOINC client there.  Note: you'll need a 6.10.14 or later client.
     30 * Put the file [http://boinc.berkeley.edu/trac/browser/trunk/boinc/samples/client_state_save.xml samples/client_state_save.xml] in it.
     31 * Create a file '''account_test.xml''' containing
     32{{{
     33<account>
     34    <master_url>http://test.test</master_url>
     35    <project_name>test_project</project_name>
     36</account>
     37}}}
     38 * Create a file '''cc_config.xml''' containing
     39{{{
     40<cc_config>
     41    <options>
     42        <skip_cpu_benchmarks/>
     43        <unsigned_apps_ok/>
     44    </options>
     45</cc_config>
     46}}}
     47 * Make a subdirectory '''projects/test.test'''; put '''test.exe''' and '''input.txt''' there.
     48 * To run the BOINC client (and your app) type
     49{{{
     50 cp client_state_save.xml client_state.xml ; boinc
     51}}}
     52 (or do the equivalent on Windows).
     53
     54The client should run your app and then sleep.
     55Check '''projects/test.test/output.txt''' to verify that it worked.
     56
     57You can run the BOINC Manager after running the client,
     58and verify that its various functions
     59(fraction done reporting, elapsed time reporting, suspend/resume, etc.)
     60are working.
     61
     62== Testing with a BOINC client and project ==
     63
     64If you have a working BOINC project,
     65you can test applications by repeatedly deploying new app versions in the project.
     66However, this is tedious if you need to make a lot of fixes.
     67It's easier to use BOINC's [AnonymousPlatform anonymous platform] mechanism.
     68To do this:
    1569 * Following the [AnonymousPlatform directions], create a file 'app_info.xml' in the client's project_* directory, with the appropriate name and version number of your application.
    1670 * Each time you build a new version of your application, copy the executable into the project_* directory, making sure it has the appropriate name. Then restart the core client.