Rosetta 3.4
Classes | Public Member Functions | Protected Types | Protected Member Functions | Friends
protocols::jd2::archive::MPIArchiveJobDistributor Class Reference

JobDistributor for the iterative ArchiveManager/Archive Framework. More...

#include <MPIArchiveJobDistributor.hh>

Inheritance diagram for protocols::jd2::archive::MPIArchiveJobDistributor:
Inheritance graph
[legend]
Collaboration diagram for protocols::jd2::archive::MPIArchiveJobDistributor:
Collaboration graph
[legend]

List of all members.

Classes

struct  CompletionMessage
 CompletionMessage(s) are send to the ArchiveManager whenever more than nr_notify decoys have been finished / or when the full batch is finished. More...

Public Member Functions

virtual void go (protocols::moves::MoverOP mover)
 overloaded to also start the ArchiveManager process
void set_archive (archive::ArchiveBaseOP)
bool is_archive_rank () const

Protected Types

typedef MPIFileBufJobDistributor Parent

Protected Member Functions

 MPIArchiveJobDistributor ()
 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.
virtual void batch_underflow ()
 triggered in slave if new batch_ID comes in.
virtual bool process_message (core::Size msg_tag, core::Size slave_rank, core::Size slave_job_id, core::Size slave_batch_id, core::Real run_time)
 act on a message, return true if message was understood
virtual void mark_job_as_completed (core::Size job_id, core::Size batch_id, core::Real run_time)
 overloaded to allow statistics and sending of CompletionMessages
virtual void mark_job_as_bad (core::Size job_id, core::Size batch_id)
 overloaded to allow statistics and sending of CompletionMessages
virtual void load_new_batch ()
 overloaded to start new entries in nr_new_completed_, nr_completed_, nstruct_ and nr_bad_ ...
core::Size archive_rank () const
 rank of ArchiveManger process

Friends

class protocols::jd2::JobDistributorFactory

Detailed Description

JobDistributor for the iterative ArchiveManager/Archive Framework.

Tags used to tag messeges sent by MPI functions used to decide whether a slave is requesting a new job id or flagging as job as being a bad input

This job distributor is meant for running iterative jobs with the ArchiveManager/Archive Framework. could vary greatly. In this configuration the three first nodes are dedicated processes (JobDistributor, FileBuffer, and ArchiveManger ) and the remaining CPUs form slave or worker nodes. This JD will not work at all without MPI and the implementations of all but the interface functions have been put inside of ifdef directives. Generally each function has a master and slave version, and the interface functions call one or the other depending on processor rank.


Member Typedef Documentation


Constructor & Destructor Documentation

protocols::jd2::archive::MPIArchiveJobDistributor::MPIArchiveJobDistributor ( ) [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.


Member Function Documentation

core::Size protocols::jd2::archive::MPIArchiveJobDistributor::archive_rank ( ) const [inline, protected]

rank of ArchiveManger process

Referenced by batch_underflow(), go(), is_archive_rank(), process_message(), and set_archive().

void protocols::jd2::archive::MPIArchiveJobDistributor::batch_underflow ( ) [protected, virtual]
void protocols::jd2::archive::MPIArchiveJobDistributor::go ( protocols::moves::MoverOP  mover) [virtual]
virtual void protocols::jd2::archive::MPIArchiveJobDistributor::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.

Reimplemented from protocols::jd2::MPIFileBufJobDistributor.

bool protocols::jd2::archive::MPIArchiveJobDistributor::is_archive_rank ( ) const [inline]
void protocols::jd2::archive::MPIArchiveJobDistributor::load_new_batch ( ) [protected, virtual]

overloaded to start new entries in nr_new_completed_, nr_completed_, nstruct_ and nr_bad_ ...

load new batch from BatchQueue .. overloaded to setup the statistics for CompletionMessages

Reimplemented from protocols::jd2::JobDistributor.

References protocols::jd2::JobDistributor::current_batch_id(), protocols::jd2::JobDistributor::get_jobs(), protocols::jd2::JobDistributor::load_new_batch(), protocols::jd2::MPIFileBufJobDistributor::master_rank(), and protocols::jd2::MPIFileBufJobDistributor::rank().

void protocols::jd2::archive::MPIArchiveJobDistributor::mark_job_as_bad ( core::Size  job_id,
core::Size  batch_id 
) [protected, virtual]
void protocols::jd2::archive::MPIArchiveJobDistributor::mark_job_as_completed ( core::Size  job_id,
core::Size  batch_id,
core::Real  run_time 
) [protected, virtual]

overloaded to allow statistics and sending of CompletionMessages

overloaded to update our job-statistics ( needed for CompletionMessages )

Reimplemented from protocols::jd2::MPIFileBufJobDistributor.

References protocols::jd2::MPIFileBufJobDistributor::mark_job_as_completed(), protocols::jd2::MPIFileBufJobDistributor::master_rank(), protocols::jd2::MPIFileBufJobDistributor::rank(), and protocols::jd2::tr().

bool protocols::jd2::archive::MPIArchiveJobDistributor::process_message ( core::Size  msg_tag,
core::Size  slave_rank,
core::Size  slave_job_id,
core::Size  slave_batch_id,
core::Real  run_time 
) [protected, virtual]
void protocols::jd2::archive::MPIArchiveJobDistributor::set_archive ( archive::ArchiveBaseOP  archive)

Friends And Related Function Documentation


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