Changes between Version 1 and Version 2 of OptionsApi
- Timestamp:
- Dec 18, 2008, 4:37:13 PM (16 years ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
OptionsApi
v1 v2 3 3 == Setting options == 4 4 5 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 5 The following runtime system options are available: 7 6 8 7 {{{ 9 8 struct BOINC_OPTIONS { 9 int backwards_compatible_graphics; 10 int normal_thread_priority; 10 11 int main_program; 11 12 int check_heartbeat; … … 17 18 }; 18 19 19 int boinc_init_options(BOINC_OPTIONS*); 20 BOINC_OPTIONS options; 21 boinc_options_defaults(options); // set defaults 22 options.main_program = 0; // set values as needed 23 ... 24 int boinc_init_options(&options); 20 25 }}} 21 26 27 The options are: 28 '''backwards_compatible_graphics''':: 29 If set, the application will handle graphics messages from pre-version 6 client, and attempt to handle them by launching a graphics app if present. Default is true. 30 '''normal_thread_priority''':: 31 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. 32 33 The remaining options determine what runtime system functions will be performed by this program. 34 This is primarily for the use of [CompoundApps compound applications]. 35 In developing a compound application you must decide whether these functions are to be performed by the main or worker program. 36 Each flag must be set in either the main or worker programs, but not both. 22 37 23 38 '''main_program''':: … … 35 50 '''direct_process_action''':: 36 51 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.