Rosetta 3.5
|
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 . More...
#include <ArchiveManager.hh>
Public Types | |
typedef utility::vector1< Batch > | BatchList |
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) |
Batch & | start_new_batch (core::io::silent::SilentStructOPs const &start_decoys) |
Batch & | start_new_batch () |
void | finalize_batch (Batch &, bool reread=false) |
core::Size | last_batch_id () const |
BatchList const & | batches () const |
core::Size | unfinished_batches () const |
void | cancel_batch (Batch &batch, bool allow_reading_of_decoys=true) |
void | cancel_batches_previous_to (core::Size batch_id, bool allow_reading_of_decoys=true) |
void | save_archive () |
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 const &batch) |
void | read_existing_batches () |
void | register_batch (Batch new_batch) |
void | send_stop_to_jobdistributor () |
bool | restore_archive () |
Private Types | |
typedef MPIArchiveJobDistributor::CompletionMessage | CompletionMessage |
typedef std::map< core::Size, CompletionMessage > | CompletionMessages |
Private Attributes | |
utility::vector1< Batch > | batches_ |
core::Size const | archive_rank_ |
core::Size const | jd_master_rank_ |
core::Size const | file_buf_rank_ |
AbstractArchiveBaseOP | theArchive_ |
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 |
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_.
|
inlinevirtual |
|
inlineprotectedvirtual |
triggered in slave if new batch_ID comes in.
|
inline |
References batches_.
Referenced by protocols::abinitio::IterativeBase::collect_hedgeing_decoys_from_batches(), and unfinished_batches().
void protocols::jd2::archive::ArchiveManager::cancel_batch | ( | Batch & | batch, |
bool | allow_reading_of_decoys = true |
||
) |
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(), jd_master_rank_, protocols::jd2::archive::Batch::mark_as_cancelled(), protocols::jd2::MPI_JOB_DIST_TAG(), protocols::jd2::archive::Batch::nstruct(), core::io::serialization::size(), protocols::jd2::tr(), and protocols::jd2::archive::Batch::write_info_file().
Referenced by cancel_batches_previous_to().
|
protected |
void protocols::jd2::archive::ArchiveManager::cancel_batches_previous_to | ( | core::Size | batch_id, |
bool | allow_reading_of_decoys = true |
||
) |
References batches_, and cancel_batch().
Referenced by protocols::abinitio::IterativeBase::increment_stage(), and protocols::abinitio::IterativeBase::rescore_nonlocal_archive().
void protocols::jd2::archive::ArchiveManager::finalize_batch | ( | Batch & | new_batch, |
bool | reread = false |
||
) |
References protocols::jd2::archive::Batch::all_broker_files(), protocols::jd2::archive::Batch::batch(), batches_, protocols::jd2::archive::Batch::broker_file(), protocols::swa::rna::file_exists(), protocols::jd2::archive::Batch::flag_file(), protocols::jd2::archive::Batch::has_finished(), protocols::jd2::archive::Batch::has_silent_in(), protocols::jd2::archive::Batch::intermediate_structs(), protocols::jd2::archive::Batch::is_cancelled(), protocols::jd2::archive::Batch::mark_as_finished(), protocols::jd2::archive::Batch::nstruct(), queue_batch(), protocols::jd2::archive::Batch::read_info_file(), protocols::jd2::archive::report_batch_inconsistency(), protocols::jd2::archive::Batch::score_file(), protocols::jd2::archive::Batch::set_decoys_returned(), protocols::jd2::archive::Batch::set_intermediate_structs(), protocols::jd2::archive::Batch::silent_in(), protocols::jd2::archive::Batch::silent_out(), theArchive_, protocols::jd2::tr(), protocols::jd2::archive::Batch::user_options(), and protocols::jd2::archive::Batch::write_info_file().
Referenced by protocols::abinitio::IterativeFullatom::generate_batch(), protocols::abinitio::IterativeBase::generate_batch(), protocols::jd2::archive::DebugArchive::generate_batch(), and read_existing_batches().
void protocols::jd2::archive::ArchiveManager::go | ( | ArchiveBaseOP | archive) |
References archive_rank_, batches_, file_buf_rank_, idle(), jd_master_rank_, protocols::jd2::archive::JOB_COMPLETION, jobs_completed(), jobs_completed_, protocols::jd2::archive::MPI_ARCHIVE_TAG, protocols::jd2::archive::QUEUE_EMPTY, read_existing_batches(), core::io::silent::SilentFileData::read_file(), restore_archive(), save_archive(), send_stop_to_jobdistributor(), protocols::swa::rna::sleep(), protocols::loops::stop, theArchive_, protocols::jd2::tr(), and unfinished_batches().
Referenced by protocols::jd2::archive::MPIArchiveJobDistributor::go().
|
protected |
References jobs_completed(), jobs_completed_, save_archive(), save_archive_time_interval_, protocols::swa::rna::sleep(), theArchive_, and protocols::jd2::tr().
Referenced by go().
|
protected |
References protocols::jd2::archive::Batch::allow_reading_cancelled_decoys(), protocols::jd2::archive::Batch::batch(), batches_, protocols::jd2::archive::Batch::decoys_returned(), file_buf_rank_, protocols::jd2::archive::Batch::id(), protocols::jd2::archive::Batch::is_cancelled(), jobs_completed_, protocols::jd2::archive::Batch::mark_as_finished(), core::io::silent::SilentFileData::read_tags_fast(), save_archive(), protocols::jd2::archive::Batch::set_decoys_returned(), protocols::jd2::archive::Batch::silent_out(), protocols::swa::rna::sleep(), theArchive_, protocols::jd2::tr(), and protocols::jd2::archive::Batch::write_info_file().
|
inline |
References batches_.
Referenced by protocols::abinitio::IterativeBase::increment_stage().
|
protected |
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(), jd_master_rank_, protocols::jd2::MPI_JOB_DIST_TAG(), protocols::jd2::archive::Batch::nstruct(), core::io::serialization::size(), and protocols::jd2::tr().
Referenced by finalize_batch(), and send_stop_to_jobdistributor().
|
protected |
|
protected |
|
static |
References protocols::evaluation::options_registered_.
|
protected |
References theArchive_.
Referenced by go().
void protocols::jd2::archive::ArchiveManager::save_archive | ( | ) |
References theArchive_.
Referenced by go(), idle(), jobs_completed(), protocols::abinitio::IterativeBase::reassign_noesy_data(), and send_stop_to_jobdistributor().
|
protected |
References queue_batch(), save_archive(), and protocols::jd2::tr().
Referenced by go().
Batch & protocols::jd2::archive::ArchiveManager::start_new_batch | ( | core::io::silent::SilentStructOPs const & | start_decoys) |
Batch & protocols::jd2::archive::ArchiveManager::start_new_batch | ( | ) |
Referenced by read_existing_batches().
core::Size protocols::jd2::archive::ArchiveManager::unfinished_batches | ( | ) | const |
|
friend |
|
private |
Referenced by go().
|
private |
Referenced by batches(), cancel_batches_previous_to(), finalize_batch(), go(), jobs_completed(), last_batch_id(), read_existing_batches(), and start_new_batch().
|
private |
Referenced by go(), and jobs_completed().
|
private |
Referenced by cancel_batch(), go(), and queue_batch().
|
private |
Referenced by go(), idle(), jobs_completed(), and read_existing_batches().
|
staticprivate |
Referenced by ArchiveManager().
|
private |
specify seconds between automatic saves to filesystem
Referenced by idle().
|
private |
Referenced by finalize_batch(), go(), idle(), jobs_completed(), restore_archive(), and save_archive().