Rosetta 3.5
|
#include <BOINCJobDistributor.hh>
Public Member Functions | |
virtual | ~BOINCJobDistributor () |
dtor WARNING WARNING! SINGLETONS' DESTRUCTORS ARE NEVER CALLED IN MINI! DO NOT TRY TO PUT THINGS IN THIS FUNCTION! here's a nice link explaining why: http://www.research.ibm.com/designpatterns/pubs/ph-jun96.txt More... | |
void | checkpoint_read () |
void | checkpoint_write () |
void | checkpoint_clear () |
virtual void | go (protocols::moves::MoverOP mover) |
This may be overridden by derived classes. Default implementation invokes go_main. More... | |
virtual core::Size | get_new_job_id () |
dummy for master/slave version More... | |
![]() | |
virtual | ~ShuffleFileSystemJobDistributor () |
dtor WARNING WARNING! SINGLETONS' DESTRUCTORS ARE NEVER CALLED IN MINI! DO NOT TRY TO PUT THINGS IN THIS FUNCTION! here's a nice link explaining why: http://www.research.ibm.com/designpatterns/pubs/ph-jun96.txt More... | |
core::Size | next_random_job () |
![]() | |
virtual | ~FileSystemJobDistributor () |
virtual void | restart () |
virtual void | remove_bad_inputs_from_job_list () |
virtual void | current_job_finished () |
![]() | |
virtual | ~JobDistributor () |
void | go (protocols::moves::MoverOP mover, JobOutputterOP jo) |
invokes go, after setting JobOutputter More... | |
JobOP | current_job () const |
Movers may ask their controlling job distributor for information about the current job. They may also load information into this job for later output. More... | |
std::string | current_output_name () const |
Movers may ask their controlling job distributor for the output name as defined by the Job and JobOutputter. More... | |
JobOutputterOP | job_outputter () const |
Movers (or derived classes) may ask for the JobOutputter. More... | |
void | set_job_outputter (const JobOutputterOP &new_job_outputter) |
Movers (or derived classes) may ask for the JobOutputter. More... | |
JobInputterOP | job_inputter () const |
JobInputter access. More... | |
virtual void | mpi_finalize (bool finalize) |
should the go() function call MPI_finalize()? It probably should, this is true by default. More... | |
JobInputterInputSource::Enum | job_inputter_input_source () const |
The input source for the current JobInputter. More... | |
core::Size | total_nr_jobs () const |
core::Size | current_job_id () const |
integer access - which job are we on? More... | |
std::string | get_current_batch () const |
what is the current batch ? — name refers to the flag-file used for this batch More... | |
virtual void | add_batch (std::string const &, core::Size id=0) |
add a new batch ( name will be interpreted as flag_file ) More... | |
core::Size | current_batch_id () const |
what is the current batch number ? — refers to position in batches_ More... | |
Protected Member Functions | |
BOINCJobDistributor () | |
ctor is protected; singleton pattern More... | |
virtual void | job_failed (core::pose::Pose &pose, bool will_retry) |
This function is called when we five up on the job; it has been virtualized so BOINC and MPI can delay/protect output base implementation is just a call to the job outputter. More... | |
virtual void | job_succeeded (core::pose::Pose &pose, core::Real run_time) |
This function is called upon a successful job completion; it has been virtualized so BOINC and MPI can delay/protect output base implementation is just a call to the job outputter. More... | |
virtual void | mark_current_job_id_for_repetition () |
this function is called whenever a job "soft-fails" and needs to be retried. Generally it should ensure that the subsequent call to obtain_new_job returns this job over again. More... | |
virtual void | begin_critical_section () |
virtual void | end_critical_section () |
![]() | |
ShuffleFileSystemJobDistributor () | |
ctor is protected; singleton pattern More... | |
virtual void | handle_interrupt () |
This function got called when job is not yet finished and got termitated abnormaly (ctrl-c, kill etc). when implimenting it in subclasses make sure to delete all in-progress-data that your job spawn. More... | |
![]() | |
FileSystemJobDistributor () | |
![]() | |
JobDistributor () | |
Singleton instantiation pattern; Derived classes will call default ctor, but their ctors, too must be protected (and the JDFactory must be their friend.) More... | |
JobDistributor (bool empty) | |
MPIArchiveJobDistributor starts with an empty job-list... More... | |
void | go_main (protocols::moves::MoverOP mover) |
Non-virtual get-job, run it, & output loop. This function is pretty generic and your subclass may be able to use it. It is NOT virtual - this implementation can be shared by (at least) the simple FileSystemJobDistributor, the MPIWorkPoolJobDistributor, and the MPIWorkPartitionJobDistributor. Do not feel that you need to use it as-is in your class - but DO plan on implementing all its functionality! More... | |
Jobs const & | get_jobs () const |
Read access to private data for derived classes. More... | |
void | mark_job_as_completed (core::Size job_id, core::Real run_time) |
Jobs is the container of Job objects need non-const to mark Jobs as completed on Master in MPI-JobDistributor. More... | |
void | mark_job_as_bad (core::Size job_id) |
ParserOP | parser () const |
Parser access. More... | |
void | begin_critical_section () |
void | end_critical_section () |
bool | obtain_new_job (bool re_consider_current_job=false) |
this function updates the current_job_id_ and current_job_ fields. The boolean return states whether or not a new job was obtained (if false, quit distributing!) More... | |
virtual void | note_all_jobs_finished () |
Derived classes are allowed to perform some kind of action when the job distributor runs out of jobs to execute. Called inside go_main. Default implementation is a no-op. More... | |
void | clear_current_job_output () |
void | set_batch_id (core::Size setting) |
set current_batch_id — eg for slave nodes in MPI framework More... | |
virtual bool | next_batch () |
switch current_batch_id_ to next batch More... | |
virtual void | batch_underflow () |
if end of batches_ reached via next_batch or set_batch_id ... More... | |
virtual void | load_new_batch () |
called by next_batch() or set_batch_id() to switch-over and restart JobDistributor on new batch More... | |
core::Size | nr_batches () const |
how many batches are in our list ... this can change dynamically More... | |
std::string const & | batch (core::Size batch_id) |
give name of batch with given id More... | |
Protected Attributes | |
core::Size | total_completed_nstruct_ |
Friends | |
class | JobDistributorFactory |
Additional Inherited Members | |
![]() | |
static JobDistributor * | get_instance () |
![]() | |
static void | setup_system_signal_handler (void(*prev_fn)(int)=jd2_signal_handler) |
Setting up callback function that will be call when our process is about to terminate. More... | |
static void | remove_system_signal_handler () |
Set signal handler back to default state. More... | |
static void | jd2_signal_handler (int Signal) |
Default callback function for signal handling. More... | |
|
protected |
ctor is protected; singleton pattern
constructor. Notice it calls the parent class!
References checkpoint_read(), and protocols::boinc::Boinc::worker_startup().
|
virtual |
dtor WARNING WARNING! SINGLETONS' DESTRUCTORS ARE NEVER CALLED IN MINI! DO NOT TRY TO PUT THINGS IN THIS FUNCTION! here's a nice link explaining why: http://www.research.ibm.com/designpatterns/pubs/ph-jun96.txt
|
protectedvirtual |
Referenced by checkpoint_read(), and checkpoint_write().
void protocols::jd2::BOINCJobDistributor::checkpoint_clear | ( | ) |
References protocols::swa::rna::file_exists().
Referenced by go().
void protocols::jd2::BOINCJobDistributor::checkpoint_read | ( | ) |
References begin_critical_section(), end_critical_section(), and protocols::swa::rna::file_exists().
Referenced by BOINCJobDistributor().
void protocols::jd2::BOINCJobDistributor::checkpoint_write | ( | ) |
References begin_critical_section(), end_critical_section(), and protocols::checkpoint::Timer::reset().
Referenced by job_succeeded().
|
protectedvirtual |
Referenced by checkpoint_read(), and checkpoint_write().
|
virtual |
dummy for master/slave version
Reimplemented from protocols::jd2::ShuffleFileSystemJobDistributor.
References protocols::jd2::ShuffleFileSystemJobDistributor::get_new_job_id(), total_completed_nstruct_, and protocols::boinc::Boinc::worker_is_finished().
|
virtual |
This may be overridden by derived classes. Default implementation invokes go_main.
Reimplemented from protocols::jd2::FileSystemJobDistributor.
References checkpoint_clear(), protocols::jd2::JobDistributor::get_jobs(), protocols::jd2::FileSystemJobDistributor::go(), core::io::silent::gzip(), protocols::jd2::JobDistributor::job_outputter(), total_completed_nstruct_, protocols::boinc::Boinc::worker_finish_summary(), and protocols::boinc::Boinc::worker_shutdown().
|
protectedvirtual |
This function is called when we five up on the job; it has been virtualized so BOINC and MPI can delay/protect output base implementation is just a call to the job outputter.
Reimplemented from protocols::jd2::FileSystemJobDistributor.
References protocols::jd2::JobDistributor::current_job(), and job_succeeded().
|
protectedvirtual |
This function is called upon a successful job completion; it has been virtualized so BOINC and MPI can delay/protect output base implementation is just a call to the job outputter.
Reimplemented from protocols::jd2::FileSystemJobDistributor.
References checkpoint_write(), protocols::jd2::FileSystemJobDistributor::job_succeeded(), and total_completed_nstruct_.
Referenced by job_failed().
|
protectedvirtual |
this function is called whenever a job "soft-fails" and needs to be retried. Generally it should ensure that the subsequent call to obtain_new_job returns this job over again.
Reimplemented from protocols::jd2::ShuffleFileSystemJobDistributor.
|
friend |
|
protected |
Referenced by get_new_job_id(), go(), and job_succeeded().