Changes between Version 2 and Version 3 of CompoundApps


Ignore:
Timestamp:
Dec 18, 2008, 4:13:48 PM (16 years ago)
Author:
davea
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • CompoundApps

    v2 v3  
    33
    44== Compound applications ==
    5 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.   The BOINC API provides a number of functions, and in developing a compound application you must decide whether these functions are to be performed by the main or worker program. The functions are represented by flags in the BOINC_OPTIONS structure. Each flag must be set in either the main or worker programs, but not both.
    6 
    7 
    8 {{{
    9 struct BOINC_OPTIONS {
    10     int main_program;
    11     int check_heartbeat;
    12     int handle_trickle_ups;
    13     int handle_trickle_downs;
    14     int handle_process_control;
    15     int handle send_status_msgs;
    16     int direct_process_action;
    17 };
    18 
    19 int boinc_init_options(BOINC_OPTIONS*);
    20 }}}
    21 
    22 
    23  '''main_program'''::
    24         Set this in the main program.
    25  '''check_heartbeat'''::
    26         If set, the program monitors 'heartbeat' messages from the core client.     If the heartbeat stops, the result depends on the direct_process_action     flag (see below).
    27  '''handle_trickle_ups'''::
    28         If set, the program can send trickle-up messages.
    29  '''handle_trickle_downs'''::
    30         If set, the program can receive trickle-down messages.
    31  '''handle_process_control'''::
    32         If set, the program will handle 'suspend', 'resume', and 'quit'     messages from the core client.     The action depends on the direct_process_action flag.
    33  '''send_status_msgs'''::
    34         If set, the program will report its CPU time and fraction     done to the core client.  Set in worker programs.
    35  '''direct_process_action'''::
    36         If set, the program will respond to quit messages and heartbeat     failures by exiting, and will respond to suspend and resume     messages by suspending and resuming.     Otherwise, these events will result in changes to     the BOINC_STATUS structure,     which can be polled using boinc_get_status().
    37  '''all_threads_cpu_time'''::
    38         If set, the CPU of all threads (not just the worker thread)     will be counted.     For apps that do computation in more than one thread.
    39 
     5A '''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.
    406Typical main program logic is:
    417