Changes between Version 9 and Version 10 of OptionsApi
- Timestamp:
- Jul 4, 2014, 10:49:56 AM (10 years ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
OptionsApi
v9 v10 2 2 3 3 You can customize the behavior of the BOINC runtime system 4 by using '''boinc_init_options()''' instead of '''boinc_init()''': 4 by using '''boinc_init_options()''' instead of '''boinc_init()'''. 5 For example: 5 6 6 7 {{{ … … 23 24 int main_program; 24 25 int check_heartbeat; 25 int handle_trickle_ups;26 int handle_trickle_downs;27 26 int handle_process_control; 28 27 int handle send_status_msgs; … … 35 34 The options are: 36 35 '''normal_thread_priority''':: 37 If set, the application will run at normal thread priority (Windows). This is recommended for CUDA applications, so that the GPU will run at full speed even if the CPUs are loaded. Default is false. 36 If set, the application will run at normal thread priority (Windows). 37 This is recommended for CUDA applications, so that the GPU will run at full speed even if the CPUs are loaded. 38 Default is false. 39 '''multi_thread''':: Set this if your application uses multiple threads (e.g., OpenMP or pthreads). 40 '''multi_process''':: Set this if your application creates sub-processes (e.g., MPI). 38 41 39 42 The remaining options determine what runtime system functions will be performed by this program. 40 43 This is primarily for the use of [CompoundApps compound applications]. 41 In developing a compound application you must decide whether these functions are to be performed by the main or worker program. 44 In developing a compound application you must decide whether these functions 45 are to be performed by the main or worker program. 42 46 Each flag must be set in either the main or worker programs, but not both. 43 47 44 48 '''main_program''':: 45 49 Set this in the main program. 46 50 '''check_heartbeat''':: 47 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). 48 '''handle_trickle_ups''':: 49 If set, the program can send trickle-up messages. 50 '''handle_trickle_downs''':: 51 If set, the program can receive trickle-down messages. 51 If set, the program monitors 'heartbeat' messages from the core client. 52 If the heartbeat stops, the result depends on the direct_process_action flag (see below). 52 53 '''handle_process_control''':: 53 If set, the program will handle 'suspend', 'resume', and 'quit' messages from the core client. The action depends on the direct_process_action flag. 54 If set, the program will handle 'suspend', 'resume', and 'quit' messages from the client. 55 The action depends on the direct_process_action flag. 54 56 '''send_status_msgs''':: 55 If set, the program will report its CPU time and fraction done to the core client. Set in worker programs. 57 If set, the program will report its CPU time and fraction done to the client. 58 Set in worker programs. 56 59 '''direct_process_action''':: 57 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(). 58 '''multi_thread''':: Set this if your application uses multiple threads (e.g., OpenMP or pthreads). 59 '''multi_process''':: Set this if your application crease sub-processes (e.g., MPI). 60 If set, the program will respond to quit messages and heartbeat failures by exiting, 61 and will respond to suspend and resume messages by suspending and resuming. 62 Otherwise, these events will result in changes to the BOINC_STATUS structure, 63 which can be polled using boinc_get_status().