Compound applications A compound application consists of a main program and one or more worker programs. The main program executes the worker programs in sequence. It maintains a state file that records which subsidiary programs have already completed. It assigns to each worker application a subrange of the overall 'fraction done' range of 0..1. For example, if there are two subsidiary applications with equal runtime, the first would have range 0 to 0.5 and the second would have range 0.5 to 1.

The BOINC API provides a number of functions, and in developing a compound application you must decide whether these how these functions are to be divided between the main and worker programs.

struct BOINC_OPTIONS {
};

The main program logic is as follows:

boinc_init_options(...)
read state file
for each remaining subsidiary application:
    boinc_parse_init_data_file()
    aid.fraction_done_start = x
    aid.fraction_done_end = y
    boinc_write_init_data_file()
    run the app
    write state file
exit(0)
where x and y are the appropriate fraction done range limits.

Each subsidiary program should use the normal BOINC API, including calls to boinc_fraction_done() with values ranging from 0 to 1.

If the graphics is handled in a program that runs concurrently with the subsidiary applications, it can call boinc_init(false) to designate it as a non-worker thread. This program can then use the BOINC graphics API, but not the API calls that handle checkpointing and status updates to BOINC. It must call boinc_finish(false) to terminate. "; page_tail(); ?>