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. |
| 7 | When you have built your application and linked it with the BOINC libraries, |
| 8 | you can run it in 'standalone mode' (without a BOINC core client present). |
| 9 | To do this, put instances of all input files in the same directory (with the proper logical, not physical, names). |
| 10 | The application should run and produce output files (also with their logical names). |
| 11 | You can run the program under a debugger. |
| 12 | When you run an application in standalone mode, the BOINC API will recognize this and take it into account. |
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 | |
| 18 | Once your application works in standalone mode, |
| 19 | the next step is to run it under the BOINC client. |
| 20 | This will exercise the various forms of interaction with the client. |
| 21 | If you already have a working project, skip to the next section. |
| 22 | |
| 23 | You can test an application under the BOINC client, |
| 24 | but without a project server, as shown in the following example. |
| 25 | This example assumes that your executable name is '''test.exe''', |
| 26 | and that it has an input file with logical name '''in''' and physical name '''input.txt''', |
| 27 | and 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 | |
| 54 | The client should run your app and then sleep. |
| 55 | Check '''projects/test.test/output.txt''' to verify that it worked. |
| 56 | |
| 57 | You can run the BOINC Manager after running the client, |
| 58 | and verify that its various functions |
| 59 | (fraction done reporting, elapsed time reporting, suspend/resume, etc.) |
| 60 | are working. |
| 61 | |
| 62 | == Testing with a BOINC client and project == |
| 63 | |
| 64 | If you have a working BOINC project, |
| 65 | you can test applications by repeatedly deploying new app versions in the project. |
| 66 | However, this is tedious if you need to make a lot of fixes. |
| 67 | It's easier to use BOINC's [AnonymousPlatform anonymous platform] mechanism. |
| 68 | To do this: |