![]() |
Rosetta Protocols
2014.16.56682
|
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_, and runtime_assert.
|
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(), option, 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 add_all_rosetta_options(), utility::options::OptionCollection::add_built_in_options(), protocols::jd2::archive::Batch::all_broker_files(), protocols::jd2::archive::Batch::batch(), batches_, broker, protocols::jd2::archive::Batch::broker_file(), utility::file::file_exists(), 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(), run::intermediate_structures, protocols::jd2::archive::Batch::is_cancelled(), utility::options::OptionCollection::load_options_from_file_exception(), utility::options::OptionCollection::load_options_from_stream(), protocols::jd2::archive::Batch::mark_as_finished(), nstruct, out::nstruct, 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(), out::file::scorefile, protocols::jd2::archive::Batch::set_decoys_returned(), protocols::jd2::archive::Batch::set_intermediate_structs(), broker::setup, utility::options::OptionCollection::show_inaccessed_user_options(), utility::options::OptionCollection::show_user(), out::file::silent, in::file::silent, protocols::jd2::archive::Batch::silent_in(), protocols::jd2::archive::Batch::silent_out(), theArchive_, protocols::jd2::tr, user, 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 basic::ARCHIVE_CRITICAL_JOBSCOMPLETE, basic::ARCHIVE_GEN_BATCH, archive_rank_, batches_, file_buf_rank_, idle(), 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(), send_stop_to_jobdistributor(), basic::show_time(), protocols::stepwise::sampling::rna::sleep(), status, protocols::loops::stop, theArchive_, 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, jobs_completed(), jobs_completed_, PROF_START, PROF_STOP, save_archive(), save_archive_time_interval_, protocols::stepwise::sampling::rna::sleep(), theArchive_, and protocols::jd2::tr.
Referenced by go().
|
protected |
References protocols::jd2::archive::Batch::allow_reading_cancelled_decoys(), basic::ARCHIVE_BLOCK_FILE, basic::ARCHIVE_EVAL_DECOYS, basic::ARCHIVE_READ_DECOYS, protocols::jd2::archive::Batch::batch(), batches_, run::constant_seed, 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(), option, PROF_START, PROF_STOP, core::io::silent::SilentFileData::read_tags_fast(), runtime_assert, basic::SAVE_ARCHIVE, save_archive(), protocols::jd2::archive::Batch::set_decoys_returned(), protocols::jd2::archive::Batch::silent_out(), protocols::stepwise::sampling::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(), size(), and protocols::jd2::tr.
Referenced by finalize_batch(), and send_stop_to_jobdistributor().
|
protected |
References protocols::jd2::archive::Batch::batch(), batches_, file_exists(), utility::file::file_exists(), finalize_batch(), protocols::jd2::archive::Batch::flag_file(), protocols::jd2::archive::Batch::id(), jobs_completed_, nstruct, option, runtime_assert, start_new_batch(), and protocols::jd2::tr.
Referenced by go().
|
protected |
|
static |
References NEW_OPT, and 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 option, queue_batch(), save_archive(), protocols::jd2::tr, and utility_exit_with_message.
Referenced by go().
| Batch & protocols::jd2::archive::ArchiveManager::start_new_batch | ( | core::io::silent::SilentStructOPs const & | start_decoys | ) |
References add_all_rosetta_options(), core::io::silent::SilentFileData::add_structure(), batches_, utility::file::create_directory(), utility::file::file_exists(), basic::options::OptionKeys::out::nstruct, basic::options::option, protocols::jd2::archive::Batch::set_id(), protocols::jd2::tr, and core::io::silent::SilentFileData::write_all().
| Batch & protocols::jd2::archive::ArchiveManager::start_new_batch | ( | ) |
References empty.
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().
1.8.7