Rosetta 3.4
Public Member Functions | Protected Member Functions | Friends
protocols::jd2::MPIWorkPartitionJobDistributor Class Reference

#include <MPIWorkPartitionJobDistributor.hh>

Inheritance diagram for protocols::jd2::MPIWorkPartitionJobDistributor:
Inheritance graph
[legend]
Collaboration diagram for protocols::jd2::MPIWorkPartitionJobDistributor:
Collaboration graph
[legend]

List of all members.

Public Member Functions

virtual ~MPIWorkPartitionJobDistributor ()
 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
virtual void go (protocols::moves::MoverOP mover)
 This may be overridden by derived classes. Default implementation invokes go_main.
virtual core::Size get_new_job_id ()
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.
virtual void remove_bad_inputs_from_job_list ()

Protected Member Functions

 MPIWorkPartitionJobDistributor ()
 ctor is protected; singleton pattern
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.

Friends

class JobDistributorFactory

Detailed Description

This job distributor is meant for running jobs where the number of jobs is equal to the number of processors (or, similarly, the jobs % processors calculation is very close to the number of processors and NOT a small number). It will blindly divide up jobs across processors and then start running them; it will NOT attempt load-balancing by giving more jobs to the processors that finished their original jobs. This is intended for use on smaller numbers of processors, and/or where the jobs are known to be equal in runtime. (The WorkPool implementation is meant for when runtimes are uncertain, or you have many many processors). It does not "waste" a processor as a master node, instead all processors run jobs.


Constructor & Destructor Documentation

protocols::jd2::MPIWorkPartitionJobDistributor::MPIWorkPartitionJobDistributor ( ) [protected]

ctor is protected; singleton pattern

constructor. Notice it calls the parent class! It also builds some internal variables for determining which processor it is in MPI land (later used in job determination). Note that all processors will have the same internal Jobs object (set by the parent class); this class merely iterates over it differently.

References protocols::jd2::JobDistributor::get_jobs(), and protocols::jd2::TR().

protocols::jd2::MPIWorkPartitionJobDistributor::~MPIWorkPartitionJobDistributor ( ) [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

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


Member Function Documentation

core::Size protocols::jd2::MPIWorkPartitionJobDistributor::get_new_job_id ( ) [virtual]

determine which job to assign next: increment until we run out of available jobs

Implements protocols::jd2::JobDistributor.

References protocols::jd2::JobDistributor::get_jobs(), and protocols::jd2::JobDistributor::job_outputter().

void protocols::jd2::MPIWorkPartitionJobDistributor::go ( protocols::moves::MoverOP  mover) [virtual]

This may be overridden by derived classes. Default implementation invokes go_main.

Reimplemented from protocols::jd2::JobDistributor.

References protocols::jd2::JobDistributor::go_main().

virtual void protocols::jd2::MPIWorkPartitionJobDistributor::handle_interrupt ( ) [inline, protected, virtual]

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.

Implements protocols::jd2::JobDistributor.

void protocols::jd2::MPIWorkPartitionJobDistributor::mark_current_job_id_for_repetition ( ) [virtual]

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.

Implements protocols::jd2::JobDistributor.

References protocols::jd2::JobDistributor::clear_current_job_output(), and protocols::jd2::JobDistributor::current_job_id().

void protocols::jd2::MPIWorkPartitionJobDistributor::remove_bad_inputs_from_job_list ( ) [virtual]

this function handles the FAIL_BAD_INPUT mover status by removing other jobs with the same input from consideration. This function DOES NOT percolate across processors - so if multiple processors have jobs starting with the same bad input, you will get multiple hits through this function. This is less efficient than it theoretically could be (but it's good enough).

Reimplemented from protocols::jd2::JobDistributor.

References protocols::jd2::JobDistributor::current_job(), protocols::jd2::JobDistributor::get_jobs(), protocols::jd2::JobDistributor::job_outputter(), and protocols::jd2::TR().


Friends And Related Function Documentation

friend class JobDistributorFactory [friend]

Reimplemented from protocols::jd2::JobDistributor.


The documentation for this class was generated from the following files:
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines