Rosetta 3.5
|
#include <UnfoldedStateEnergyCalculatorMPIWorkPoolJobDistributor.hh>
Public Types | |
typedef std::map< std::string, utility::vector1 < core::scoring::EMapVector > >::iterator | uem_iter |
Public Member Functions | |
UnfoldedStateEnergyCalculatorMPIWorkPoolJobDistributor () | |
ctor is protected; singleton pattern More... | |
virtual | ~UnfoldedStateEnergyCalculatorMPIWorkPoolJobDistributor () |
dtor (don't put anything in here) More... | |
void | add_unfolded_energy_data (std::string tlc, core::scoring::EMapVector const &scores) |
dummy for master/slave version More... | |
void | set_energy_terms (core::scoring::EMapVector const &weights) |
dummy for master/slave version More... | |
![]() | |
virtual | ~MPIWorkPoolJobDistributor () |
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 More... | |
virtual void | go (protocols::moves::MoverOP mover) |
dummy for master/slave version More... | |
virtual core::Size | get_new_job_id () |
dummy for master/slave version More... | |
virtual void | mark_current_job_id_for_repetition () |
dummy for master/slave version More... | |
virtual void | remove_bad_inputs_from_job_list () |
dummy for master/slave version More... | |
virtual void | job_succeeded (core::pose::Pose &pose, core::Real run_time) |
dummy for master/slave version More... | |
virtual void | mpi_finalize (bool finalize) |
should the go() function call MPI_finalize()? It probably should, this is true by default. More... | |
![]() | |
virtual | ~JobDistributor () |
void | go (protocols::moves::MoverOP mover, JobOutputterOP jo) |
invokes go, after setting JobOutputter More... | |
JobOP | current_job () const |
Movers may ask their controlling job distributor for information about the current job. They may also load information into this job for later output. More... | |
std::string | current_output_name () const |
Movers may ask their controlling job distributor for the output name as defined by the Job and JobOutputter. More... | |
JobOutputterOP | job_outputter () const |
Movers (or derived classes) may ask for the JobOutputter. More... | |
void | set_job_outputter (const JobOutputterOP &new_job_outputter) |
Movers (or derived classes) may ask for the JobOutputter. More... | |
JobInputterOP | job_inputter () const |
JobInputter access. More... | |
JobInputterInputSource::Enum | job_inputter_input_source () const |
The input source for the current JobInputter. More... | |
virtual void | restart () |
core::Size | total_nr_jobs () const |
core::Size | current_job_id () const |
integer access - which job are we on? More... | |
std::string | get_current_batch () const |
what is the current batch ? — name refers to the flag-file used for this batch More... | |
virtual void | add_batch (std::string const &, core::Size id=0) |
add a new batch ( name will be interpreted as flag_file ) More... | |
core::Size | current_batch_id () const |
what is the current batch number ? — refers to position in batches_ More... | |
Protected Member Functions | |
virtual void | master_go (protocols::moves::MoverOP mover) |
unforntunatly this is pretty much copied from the MPIWorkPoolJobDistributor, I should make that more compartmentalized More... | |
![]() | |
MPIWorkPoolJobDistributor () | |
ctor is protected; singleton pattern More... | |
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. More... | |
virtual void | slave_go (protocols::moves::MoverOP mover) |
Proceeds to the parent class go_main() as usual. More... | |
virtual core::Size | master_get_new_job_id () |
Always returns zero, simply increments next_job_to_assign_ to the next job that should be run based on what has been completeted and the overwrite flags. More... | |
virtual core::Size | slave_get_new_job_id () |
requests, receives, and returns a new job id from the master node or returns the current job id if the repeat_job_ flag is set to true More... | |
virtual void | master_mark_current_job_id_for_repetition () |
This should never be called as this is handled internally by the slave nodes, it utility_exits. More... | |
virtual void | slave_mark_current_job_id_for_repetition () |
Sets the repeat_job_ flag to true. More... | |
virtual void | master_remove_bad_inputs_from_job_list () |
Simply increments next_job_to_assign_ to the next job that should be run based on what has been completed and if the input job tag of the job marked as having bad input. More... | |
virtual void | slave_remove_bad_inputs_from_job_list () |
Sends a message to the head node that contains the id of a job that had bad input. More... | |
virtual void | master_job_succeeded (core::pose::Pose &pose) |
This should never be called as this is handled internally by the slave nodes, it utility_exits. More... | |
virtual void | slave_job_succeeded (core::pose::Pose &pose) |
Sends a message to the head node upon successful job completion to avoid output interleaving. More... | |
![]() | |
JobDistributor () | |
Singleton instantiation pattern; Derived classes will call default ctor, but their ctors, too must be protected (and the JDFactory must be their friend.) More... | |
JobDistributor (bool empty) | |
MPIArchiveJobDistributor starts with an empty job-list... More... | |
void | go_main (protocols::moves::MoverOP mover) |
Non-virtual get-job, run it, & output loop. This function is pretty generic and your subclass may be able to use it. It is NOT virtual - this implementation can be shared by (at least) the simple FileSystemJobDistributor, the MPIWorkPoolJobDistributor, and the MPIWorkPartitionJobDistributor. Do not feel that you need to use it as-is in your class - but DO plan on implementing all its functionality! More... | |
Jobs const & | get_jobs () const |
Read access to private data for derived classes. More... | |
void | mark_job_as_completed (core::Size job_id, core::Real run_time) |
Jobs is the container of Job objects need non-const to mark Jobs as completed on Master in MPI-JobDistributor. More... | |
void | mark_job_as_bad (core::Size job_id) |
ParserOP | parser () const |
Parser access. More... | |
void | begin_critical_section () |
void | end_critical_section () |
bool | obtain_new_job (bool re_consider_current_job=false) |
this function updates the current_job_id_ and current_job_ fields. The boolean return states whether or not a new job was obtained (if false, quit distributing!) More... | |
virtual void | job_failed (core::pose::Pose &, bool) |
This function is called when we give up on the job; it has been virtualized so BOINC and MPI can delay/protect output base implementation is just a call to the job outputter. More... | |
virtual void | current_job_finished () |
Derived classes are allowed to clean up any temporary files or data relating to the current job after the current job has completed. Called inside go_main loop. Default implementation is a no-op. More... | |
virtual void | note_all_jobs_finished () |
Derived classes are allowed to perform some kind of action when the job distributor runs out of jobs to execute. Called inside go_main. Default implementation is a no-op. More... | |
void | clear_current_job_output () |
void | set_batch_id (core::Size setting) |
set current_batch_id — eg for slave nodes in MPI framework More... | |
virtual bool | next_batch () |
switch current_batch_id_ to next batch More... | |
virtual void | batch_underflow () |
if end of batches_ reached via next_batch or set_batch_id ... More... | |
virtual void | load_new_batch () |
called by next_batch() or set_batch_id() to switch-over and restart JobDistributor on new batch More... | |
core::Size | nr_batches () const |
how many batches are in our list ... this can change dynamically More... | |
std::string const & | batch (core::Size batch_id) |
give name of batch with given id More... | |
Private Member Functions | |
void | master_add_unfolded_energy_data (std::string tlc, core::scoring::EMapVector const &scores) |
dummy for master/slave version More... | |
void | slave_add_unfolded_energy_data (std::string tlc, core::scoring::EMapVector const &scores) |
dummy for master/slave version More... | |
void | master_set_energy_terms (core::scoring::EMapVector const &weights) |
dummy for master/slave version More... | |
void | slave_set_energy_terms (core::scoring::EMapVector const &weights) |
dummy for master/slave version More... | |
Private Attributes | |
core::scoring::EMapVector | energy_terms_ |
utility::vector1 < core::scoring::EMapVector > | unweighted_energies_ |
std::map< std::string, utility::vector1 < core::scoring::EMapVector > > | unweighted_energies_map_ |
Additional Inherited Members | |
![]() | |
static JobDistributor * | get_instance () |
![]() | |
static void | setup_system_signal_handler (void(*prev_fn)(int)=jd2_signal_handler) |
Setting up callback function that will be call when our process is about to terminate. More... | |
static void | remove_system_signal_handler () |
Set signal handler back to default state. More... | |
static void | jd2_signal_handler (int Signal) |
Default callback function for signal handling. More... | |
![]() | |
core::Size | npes_ |
total number of processing elements More... | |
core::Size | rank_ |
rank of the "local" instance More... | |
core::Size | current_job_id_ |
where slave jobs store current job id More... | |
core::Size | next_job_to_assign_ |
where master stores next job to assign (in a good state after get_new_job_id up until it's used) More... | |
core::Size | bad_job_id_ |
where master temporarily stores id of jobs with bad input More... | |
bool | repeat_job_ |
where slave stores whether it should repeat its current job id More... | |
bool | finalize_MPI_ |
should the go() function call MPI_finalize? There are very few cases where this should be false More... | |
typedef std::map<std::string, utility::vector1< core::scoring::EMapVector > >::iterator protocols::unfolded_state_energy_calculator::UnfoldedStateEnergyCalculatorMPIWorkPoolJobDistributor::uem_iter |
protocols::unfolded_state_energy_calculator::UnfoldedStateEnergyCalculatorMPIWorkPoolJobDistributor::UnfoldedStateEnergyCalculatorMPIWorkPoolJobDistributor | ( | ) |
ctor is protected; singleton pattern
ctor
|
virtual |
dtor (don't put anything in here)
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
void protocols::unfolded_state_energy_calculator::UnfoldedStateEnergyCalculatorMPIWorkPoolJobDistributor::add_unfolded_energy_data | ( | std::string | tlc, |
core::scoring::EMapVector const & | scores | ||
) |
dummy for master/slave version
References master_add_unfolded_energy_data(), protocols::jd2::MPIWorkPoolJobDistributor::rank_, and slave_add_unfolded_energy_data().
|
private |
dummy for master/slave version
References unweighted_energies_map_.
Referenced by add_unfolded_energy_data(), and master_go().
|
protectedvirtual |
unforntunatly this is pretty much copied from the MPIWorkPoolJobDistributor, I should make that more compartmentalized
Reimplemented from protocols::jd2::MPIWorkPoolJobDistributor.
References protocols::jd2::BAD_INPUT_TAG, protocols::jd2::MPIWorkPoolJobDistributor::bad_job_id_, protocols::unfolded_state_energy_calculator::calc_all_averages(), energy_terms_, protocols::jd2::JOB_SUCCESS_TAG, protocols::unfolded_state_energy_calculator::LENGTH_TLC(), master_add_unfolded_energy_data(), protocols::jd2::MPIWorkPoolJobDistributor::master_get_new_job_id(), protocols::jd2::MPIWorkPoolJobDistributor::master_remove_bad_inputs_from_job_list(), master_set_energy_terms(), MPI_ANY_SOURCE, core::scoring::n_score_types, protocols::jd2::NEW_JOB_ID_TAG, protocols::jd2::MPIWorkPoolJobDistributor::next_job_to_assign_, protocols::jd2::MPIWorkPoolJobDistributor::npes_, protocols::jd2::MPIWorkPoolJobDistributor::rank_, protocols::TR(), protocols::unfolded_state_energy_calculator::UNFOLDED_ENERGY_DATA_TAG(), protocols::unfolded_state_energy_calculator::UNFOLDED_ENERGY_TERMS_TAG(), and unweighted_energies_map_.
|
private |
dummy for master/slave version
References energy_terms_, and core::scoring::n_score_types.
Referenced by master_go(), and set_energy_terms().
void protocols::unfolded_state_energy_calculator::UnfoldedStateEnergyCalculatorMPIWorkPoolJobDistributor::set_energy_terms | ( | core::scoring::EMapVector const & | weights) |
dummy for master/slave version
References master_set_energy_terms(), protocols::jd2::MPIWorkPoolJobDistributor::rank_, and slave_set_energy_terms().
|
private |
dummy for master/slave version
References protocols::jd2::MPIWorkPoolJobDistributor::current_job_id_, protocols::unfolded_state_energy_calculator::LENGTH_TLC(), core::scoring::n_score_types, protocols::jd2::MPIWorkPoolJobDistributor::rank_, protocols::TR(), and protocols::unfolded_state_energy_calculator::UNFOLDED_ENERGY_DATA_TAG().
Referenced by add_unfolded_energy_data().
|
private |
dummy for master/slave version
References protocols::jd2::MPIWorkPoolJobDistributor::current_job_id_, core::scoring::n_score_types, protocols::jd2::MPIWorkPoolJobDistributor::rank_, protocols::TR(), and protocols::unfolded_state_energy_calculator::UNFOLDED_ENERGY_TERMS_TAG().
Referenced by set_energy_terms().
|
private |
Referenced by master_go(), and master_set_energy_terms().
|
private |
|
private |
Referenced by master_add_unfolded_energy_data(), and master_go().