![]() |
Rosetta Protocols
2014.35
|
ArchiveManager is responsible for communication with JobDistributor and organization of Batches and returning decoys. More...
#include <ArchiveManager.hh>
Public Member Functions | |
ArchiveManager (core::Size archive_rank, core::Size jd_master_rank, core::Size file_buf_rank) | |
ctor is protected; singleton pattern More... | |
virtual | ~ArchiveManager () |
void | go (ArchiveBaseOP) |
core::Size | unfinished_batches () const |
void | save_archive () |
virtual bool | restore_archive () |
![]() | |
BaseArchiveManager () | |
ctor is protected; singleton pattern More... | |
virtual | ~BaseArchiveManager () |
virtual Batch & | start_new_batch () |
virtual void | finalize_batch (Batch &, bool reread=false) |
virtual void | cancel_batches_previous_to (core::Size batch_id, bool allow_reading_of_decoys=true) |
BatchList const & | batches () const |
core::Size | last_batch_id () const |
Static Public Member Functions | |
static void | register_options () |
Protected Member Functions | |
virtual void | batch_underflow () |
triggered in slave if new batch_ID comes in. More... | |
void | idle () |
void | jobs_completed () |
void | queue_batch (Batch const &batch) |
void | cancel_batch (Batch &batch, bool allow_reading_of_decoys=true) |
void | read_existing_batches () |
void | register_batch (Batch new_batch) |
void | send_stop_to_jobdistributor () |
virtual void | unlock_file (Batch const &batch, bool final) |
![]() | |
void | set_archive (AbstractArchiveBaseOP) |
AbstractArchiveBase & | the_archive () |
void | read_returning_decoys (Batch &batch, bool final) |
Private Types | |
typedef BaseArchiveManager | Parent |
typedef MPIArchiveJobDistributor::CompletionMessage | CompletionMessage |
typedef std::map< core::Size, CompletionMessage > | CompletionMessages |
Private Attributes | |
core::Size const | archive_rank_ |
core::Size const | jd_master_rank_ |
core::Size const | file_buf_rank_ |
CompletionMessages | jobs_completed_ |
core::Size | save_archive_time_interval_ |
specify seconds between automatic saves to filesystem More... | |
Static Private Attributes | |
static bool | options_registered_ |
Friends | |
class | JobDistributorFactory |
Additional Inherited Members | |
![]() | |
typedef utility::vector1< Batch > | BatchList |
![]() | |
utility::vector1< Batch > | batches_ |
![]() | |
static bool | options_registered_ |
ArchiveManager is responsible for communication with JobDistributor and organization of Batches and returning decoys.
he owns an Archive (AbstractArchiveBase) that will be handed the decoys and is asked to generate_batch() if the QUEUE_EMPTY .
|
private |
|
private |
protocols::jd2::archive::ArchiveManager::ArchiveManager | ( | core::Size | archive_rank, |
core::Size | jd_master_rank, | ||
core::Size | file_buf_rank | ||
) |
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.
References options_registered_, and runtime_assert.
|
inlinevirtual |
|
inlineprotectedvirtual |
triggered in slave if new batch_ID comes in.
|
protectedvirtual |
Reimplemented from protocols::jd2::archive::BaseArchiveManager.
References protocols::jd2::JobDistributor::add_batch(), protocols::jd2::BatchJobInputter::BOGUS_BATCH_ID, protocols::jd2::archive::CANCEL_BATCH, protocols::jd2::archive::Batch::flag_file(), protocols::jd2::JobDistributor::get_instance(), protocols::jd2::archive::Batch::id(), protocols::jd2::MPI_JOB_DIST_TAG(), protocols::jd2::archive::Batch::nstruct(), option, size(), protocols::jd2::tr, and protocols::jd2::archive::Batch::write_info_file().
void protocols::jd2::archive::ArchiveManager::go | ( | ArchiveBaseOP | archive | ) |
References basic::ARCHIVE_CRITICAL_JOBSCOMPLETE, basic::ARCHIVE_GEN_BATCH, archive_rank_, protocols::jd2::archive::BaseArchiveManager::batches_, file_buf_rank_, protocols::jd2::archive::AbstractArchiveBase::generate_batch(), idle(), protocols::jd2::archive::AbstractArchiveBase::init_from_decoy_set(), jd_master_rank_, protocols::jd2::archive::JOB_COMPLETION, jobs_completed(), jobs_completed_, mem_tr, protocols::jd2::archive::MPI_ARCHIVE_TAG, option, basic::prof_show(), PROF_START, PROF_STOP, protocols::jd2::archive::QUEUE_EMPTY, read_existing_batches(), core::io::silent::SilentFileData::read_file(), restore_archive(), save_archive(), protocols::jd2::archive::AbstractArchiveBase::save_status(), send_stop_to_jobdistributor(), protocols::jd2::archive::BaseArchiveManager::set_archive(), basic::show_time(), protocols::stepwise::modeler::rna::sleep(), protocols::loops::stop, protocols::jd2::archive::BaseArchiveManager::the_archive(), protocols::analysis::total, protocols::jd2::tr, unfinished_batches(), user, and utility_exit_with_message.
Referenced by protocols::jd2::archive::MPIArchiveJobDistributor::go().
|
protected |
References basic::ARCHIVE_JOBSCOMPLETE, protocols::jd2::archive::AbstractArchiveBase::idle(), jobs_completed(), jobs_completed_, PROF_START, PROF_STOP, save_archive(), save_archive_time_interval_, protocols::stepwise::modeler::rna::sleep(), protocols::jd2::archive::BaseArchiveManager::the_archive(), and protocols::jd2::tr.
Referenced by go().
|
protected |
References protocols::jd2::archive::Batch::allow_reading_cancelled_decoys(), basic::ARCHIVE_BLOCK_FILE, basic::ARCHIVE_READ_DECOYS, protocols::jd2::archive::Batch::batch(), protocols::jd2::archive::BaseArchiveManager::batches_, run::constant_seed, protocols::jd2::archive::Batch::decoys_returned(), protocols::jd2::archive::Batch::id(), protocols::jd2::archive::Batch::is_cancelled(), protocols::jd2::archive::Batch::mark_as_finished(), option, PROF_START, PROF_STOP, protocols::jd2::archive::BaseArchiveManager::read_returning_decoys(), runtime_assert, basic::SAVE_ARCHIVE, protocols::jd2::archive::BaseArchiveManager::save_archive(), protocols::jd2::archive::Batch::silent_out(), protocols::stepwise::modeler::rna::sleep(), protocols::jd2::tr, and protocols::jd2::archive::Batch::write_info_file().
|
protectedvirtual |
Implements protocols::jd2::archive::BaseArchiveManager.
References protocols::jd2::archive::ADD_BATCH, protocols::jd2::JobDistributor::add_batch(), protocols::jd2::archive::Batch::flag_file(), protocols::jd2::JobDistributor::get_instance(), protocols::jd2::archive::Batch::id(), protocols::jd2::MPI_JOB_DIST_TAG(), protocols::jd2::archive::Batch::nstruct(), size(), and protocols::jd2::tr.
|
protected |
References protocols::jd2::archive::Batch::batch(), protocols::jd2::archive::BaseArchiveManager::batches_, file_exists(), utility::file::file_exists(), protocols::jd2::archive::BaseArchiveManager::finalize_batch(), protocols::jd2::archive::Batch::flag_file(), protocols::jd2::archive::Batch::id(), nstruct, option, runtime_assert, protocols::jd2::archive::BaseArchiveManager::start_new_batch(), and protocols::jd2::tr.
Referenced by go().
|
protected |
|
static |
References NEW_OPT, and protocols::evaluation::options_registered_.
|
virtual |
Implements protocols::jd2::archive::BaseArchiveManager.
References protocols::jd2::archive::AbstractArchiveBase::restore_from_file(), and protocols::jd2::archive::BaseArchiveManager::the_archive().
Referenced by go().
|
virtual |
|
protected |
core::Size protocols::jd2::archive::ArchiveManager::unfinished_batches | ( | ) | const |
References protocols::jd2::archive::BaseArchiveManager::batches(), and begin.
Referenced by go().
|
protectedvirtual |
Reimplemented from protocols::jd2::archive::BaseArchiveManager.
References protocols::jd2::MpiFileBuffer::release_file(), protocols::jd2::archive::Batch::silent_out(), and protocols::jd2::tr.
|
friend |
|
private |
Referenced by go().
|
private |
Referenced by go().
|
private |
Referenced by go().
|
private |
|
staticprivate |
Referenced by ArchiveManager().
|
private |
specify seconds between automatic saves to filesystem
Referenced by idle().