Rosetta  2020.46
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
Public Member Functions | Static Public Member Functions | Private Member Functions | Static Private Attributes | List of all members
protocols::boinc::Boinc Class Reference

#include <boinc.hh>

Public Member Functions

void initialize_worker (void)
 Initialize BOINC. Sets up diagnostics, calls boinc_init(), etc. Should be used at the start of main in worker app. More...
 

Static Public Member Functions

static Boincinstance (void)
 Access to singleton Boinc class. More...
 
static core::Real get_project_pref_max_gfx_fps (void)
 Get maximum graphics frames per second user preference. More...
 
static core::Real get_project_pref_max_gfx_cpu (void)
 Get maximum percent cpu for graphics user preference. More...
 
static int get_project_pref_max_cpu_run_time (void)
 Get maximum target cpu run time user preference. More...
 
static background_type get_project_pref_bg (void)
 Get graphics background type user preference. More...
 
static void set_project_pref_max_gfx_fps (core::Real project_pref_max_gfx_fps)
 Set maximum graphics frames per second. Standalone mode only. More...
 
static void set_project_pref_max_gfx_cpu (core::Real project_pref_max_gfx_cpu)
 Set maximum percent cpu for graphics. Standalone mode only. More...
 
static void set_project_pref_max_cpu_run_time (int project_pref_max_cpu_run_time)
 Set maximum target cpu run time. Standalone mode only. More...
 
static void set_working_set_size (core::Real working_set_size)
 Set working set size to keep track of memory usage. More...
 
static void read_and_set_project_prefs (void)
 Rereads project prefs and stores info. More...
 
static core::Real get_remaining_cpu_time (void)
 Gets the remaining cpu time which depends on the user run time preference. More...
 
static void update_pct_complete (void)
 Determines the fraction complete based on the max_cpu_run_time preference and the total wu_cpu_run_time. Calls BOINC API boinc_fraction_done(). More...
 
static core::Real get_boinc_wu_cpu_time ()
 gets the current runtime for the boinc wu More...
 
static bool worker_is_finished (const int &total_nstruct)
 Is the task finished? More...
 
static void worker_startup (void)
 Start BOINC. More...
 
static void worker_shutdown (void)
 Stop BOINC. Does not return. Uses BOINC API boinc_finish(0). More...
 
static void worker_finish_summary (const int &num_decoys, const int &attempted_decoys, const int &starting_structs)
 Brief summary. Formatted for the R validator so don't change. More...
 
static int iterate_checkpoint_count (void)
 Keeps track of number of checkpoints made. Necessary for determining whether application is making progress on the client. More...
 
static void checkpoint_completed (void)
 Must be called after a checkpoint is made. More...
 
static bool is_worker_running (void)
 
static void stop_running_worker (void)
 
static void get_sema_name (char *name)
 
static int create_semaphore (void)
 
static int get_semaphore (void)
 
static int wait_semaphore (void)
 
static int trywait_semaphore (void)
 
static int unlock_semaphore (void)
 
static int decoy_count ()
 

Private Member Functions

 Boinc ()=default
 

Static Private Attributes

static bool worker_initialized_
 
static core::Real fraction_done_
 
static core::Real cpu_time_
 
static core::Real working_set_size_
 
static core::Real working_set_size_max_val_
 
static int checkpoint_count_
 
static int decoy_count_
 
static int no_progress_init_cnt_
 
static bool worker_running_
 
static core::Real project_pref_max_gfx_fps_
 
static core::Real project_pref_max_gfx_cpu_
 
static int project_pref_max_cpu_run_time_
 
static background_type project_pref_bg_
 

Constructor & Destructor Documentation

protocols::boinc::Boinc::Boinc ( )
privatedefault

Member Function Documentation

static void protocols::boinc::Boinc::checkpoint_completed ( void  )
static

Must be called after a checkpoint is made.

Referenced by protocols::checkpoint::Timer::reset().

static int protocols::boinc::Boinc::create_semaphore ( void  )
static
static int protocols::boinc::Boinc::decoy_count ( )
inlinestatic

References decoy_count_.

static core::Real protocols::boinc::Boinc::get_boinc_wu_cpu_time ( )
static

gets the current runtime for the boinc wu

static background_type protocols::boinc::Boinc::get_project_pref_bg ( void  )
static

Get graphics background type user preference.

static int protocols::boinc::Boinc::get_project_pref_max_cpu_run_time ( void  )
static

Get maximum target cpu run time user preference.

static core::Real protocols::boinc::Boinc::get_project_pref_max_gfx_cpu ( void  )
static

Get maximum percent cpu for graphics user preference.

static core::Real protocols::boinc::Boinc::get_project_pref_max_gfx_fps ( void  )
static

Get maximum graphics frames per second user preference.

static core::Real protocols::boinc::Boinc::get_remaining_cpu_time ( void  )
static

Gets the remaining cpu time which depends on the user run time preference.

static void protocols::boinc::Boinc::get_sema_name ( char *  name)
static
static int protocols::boinc::Boinc::get_semaphore ( void  )
static
void protocols::boinc::Boinc::initialize_worker ( void  )

Initialize BOINC. Sets up diagnostics, calls boinc_init(), etc. Should be used at the start of main in worker app.

static Boinc& protocols::boinc::Boinc::instance ( void  )
static

Access to singleton Boinc class.

static bool protocols::boinc::Boinc::is_worker_running ( void  )
static
static int protocols::boinc::Boinc::iterate_checkpoint_count ( void  )
static

Keeps track of number of checkpoints made. Necessary for determining whether application is making progress on the client.

static void protocols::boinc::Boinc::read_and_set_project_prefs ( void  )
static

Rereads project prefs and stores info.

static void protocols::boinc::Boinc::set_project_pref_max_cpu_run_time ( int  project_pref_max_cpu_run_time)
static

Set maximum target cpu run time. Standalone mode only.

static void protocols::boinc::Boinc::set_project_pref_max_gfx_cpu ( core::Real  project_pref_max_gfx_cpu)
static

Set maximum percent cpu for graphics. Standalone mode only.

static void protocols::boinc::Boinc::set_project_pref_max_gfx_fps ( core::Real  project_pref_max_gfx_fps)
static

Set maximum graphics frames per second. Standalone mode only.

static void protocols::boinc::Boinc::set_working_set_size ( core::Real  working_set_size)
static

Set working set size to keep track of memory usage.

static void protocols::boinc::Boinc::stop_running_worker ( void  )
static
static int protocols::boinc::Boinc::trywait_semaphore ( void  )
static
static int protocols::boinc::Boinc::unlock_semaphore ( void  )
static
static void protocols::boinc::Boinc::update_pct_complete ( void  )
static

Determines the fraction complete based on the max_cpu_run_time preference and the total wu_cpu_run_time. Calls BOINC API boinc_fraction_done().

Referenced by protocols::cyclic_peptide_predict::SimpleCycpepPredictApplication::checkpoint(), and protocols::checkpoint::Timer::reset().

static int protocols::boinc::Boinc::wait_semaphore ( void  )
static
static void protocols::boinc::Boinc::worker_finish_summary ( const int &  num_decoys,
const int &  attempted_decoys,
const int &  starting_structs 
)
static

Brief summary. Formatted for the R validator so don't change.

Referenced by protocols::jd2::BOINCJobDistributor::go(), and protocols::jobdist::BaseJobDistributor::shutdown().

static bool protocols::boinc::Boinc::worker_is_finished ( const int &  total_nstruct)
static
static void protocols::boinc::Boinc::worker_shutdown ( void  )
static

Stop BOINC. Does not return. Uses BOINC API boinc_finish(0).

Referenced by protocols::jd2::BOINCJobDistributor::go(), and protocols::jobdist::BaseJobDistributor::shutdown().

static void protocols::boinc::Boinc::worker_startup ( void  )
static

Member Data Documentation

int protocols::boinc::Boinc::checkpoint_count_
staticprivate
core::Real protocols::boinc::Boinc::cpu_time_
staticprivate
int protocols::boinc::Boinc::decoy_count_
staticprivate

Referenced by decoy_count().

core::Real protocols::boinc::Boinc::fraction_done_
staticprivate
int protocols::boinc::Boinc::no_progress_init_cnt_
staticprivate
background_type protocols::boinc::Boinc::project_pref_bg_
staticprivate
int protocols::boinc::Boinc::project_pref_max_cpu_run_time_
staticprivate
core::Real protocols::boinc::Boinc::project_pref_max_gfx_cpu_
staticprivate
core::Real protocols::boinc::Boinc::project_pref_max_gfx_fps_
staticprivate
bool protocols::boinc::Boinc::worker_initialized_
staticprivate
bool protocols::boinc::Boinc::worker_running_
staticprivate
core::Real protocols::boinc::Boinc::working_set_size_
staticprivate
core::Real protocols::boinc::Boinc::working_set_size_max_val_
staticprivate

The documentation for this class was generated from the following file: