Changes between Version 10 and Version 11 of OptionsApi
- Timestamp:
- Jan 26, 2015, 1:22:21 PM (10 years ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
OptionsApi
v10 v11 1 = Runtime system options =1 = APIs for wrappers = 2 2 3 You can customize the behavior of the BOINC runtime system 4 by using '''boinc_init_options()''' instead of '''boinc_init()'''. 5 For example: 3 Wrappers (wrapper, vboxwrapper, wrappture) use the following 4 API to control the behavior of the BOINC runtime system. 6 5 7 6 {{{ … … 9 8 10 9 boinc_options_defaults(options); 11 options.multi_thread = true; // include this if your app's main process uses multiple threads 12 options.multi_process = true; // include this if your app uses multiple processes 13 10 options.main_program = true; 11 ... set options 14 12 boinc_init_options(&options); 15 13 }}} 16 17 Do not create any threads or store the current PID18 before calling '''boinc_init_options()'''.19 The following options are available:20 14 21 15 {{{ 22 16 struct BOINC_OPTIONS { 23 17 int normal_thread_priority; 18 int multi_thread; 19 int multi_process; 24 20 int main_program; 25 21 int check_heartbeat; … … 27 23 int handle send_status_msgs; 28 24 int direct_process_action; 29 int multi_thread;30 int multi_process;31 25 }; 32 26 }}} 33 27 34 The options are: 35 '''normal_thread_priority''':: 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). 28 The first three options are described [BasicApi#init here]. 41 29 42 30 The remaining options determine what runtime system functions will be performed by this program. 43 This is primarily for the use of [CompoundApps compound applications]. 44 In developing a compound application you must decide whether these functions 31 In developing a wrapper application you must decide whether these functions 45 32 are to be performed by the main or worker program. 46 33 Each flag must be set in either the main or worker programs, but not both. … … 49 36 Set this in the main program. 50 37 '''check_heartbeat''':: 51 If set, the program monitors 'heartbeat' messages from the c ore client.38 If set, the program monitors 'heartbeat' messages from the client. 52 39 If the heartbeat stops, the result depends on the direct_process_action flag (see below). 53 40 '''handle_process_control'''::