Compound applications

Compound applications are deprecated. Use the wrapper instead.)

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


options.main_program = true;
read main state file
for each remaining worker program:
    APP_INIT_DATA aid;
    aid.fraction_done_start = x
    aid.fraction_done_end = y
    run the app
    wait for the app to finish
    write main state file
    if last app:
    boinc_parse_init_data_file()    // reads CPU time from app_init.xml file

where x and y are the appropriate fraction done range limits. Typical worker program logic is:


options.main_program = false;
options.send_status_msgs = true;
do work, calling boinc_fraction_done() with values from 0 to 1,
and boinc_time_to_checkpoint(), occasionally
boinc_finish();        // this writes final CPU time to app_init.xml file

If the graphics is handled in a program that runs concurrently with the worker programs, it must also call boinc_init_options(), typically with all options false, then boinc_init_graphics(), and eventually boinc_finish().

If the main program is responsible for reporting application status to the core client, it should periodically call

        double cpu_time,                // CPU time since start of WU
        double checkpoint_cpu_time,     // CPU time at last checkpoint
        double fraction_done
Last modified 11 years ago Last modified on Mar 3, 2011, 1:36:56 PM