![]() |
Rosetta
2021.16
|
#include <MPI_WorkUnitManager.hh>

Public Member Functions | |
| MPI_WorkUnitManager (char machine_letter) | |
| ~MPI_WorkUnitManager () override=default | |
| void | go () override=0 |
Public Member Functions inherited from protocols::wum::WorkUnitManager | |
| WorkUnitManager () | |
| ~WorkUnitManager () override=default | |
| void | register_work_units (const protocols::wum::WorkUnitList &work_unit_list) |
| WorkUnitQueue & | outbound () |
| WorkUnitQueue & | inbound () |
| const WorkUnitQueue & | outbound () const |
| const WorkUnitQueue & | inbound () const |
Protected Types | |
| enum | MPI_TIMING { TIMING_WAIT =0, TIMING_TRANSFER_SEND, TIMING_TRANSFER_RECV, TIMING_CPU, TIMING_IO_WRITE, TIMING_IO_READ, TIMING_IDLE, TIMING_end } |
Protected Member Functions | |
| virtual void | init ()=0 |
| virtual void | process_inbound_wus ()=0 |
| virtual void | process_outbound_wus ()=0 |
| virtual void | print_stats () |
| Print a line with general run statistics, now. More... | |
| virtual void | print_stats_auto () |
| Print a line with general run statistics, only if enough time has pased since the last statistics printout. More... | |
| void | reset_timing_stats () |
| Reset all the stats counters. More... | |
| void | process_incoming_msgs (bool wait_until_message=false) |
| MPI Communication function. More... | |
| void | send_MPI_workunit (const WorkUnitBaseOP &wu, int dest_rank) const |
| Send a workunit to an arbitrary recipient. More... | |
| void | receive_MPI_workunit (core::Size node_rank=MPI_ANY_SOURCE) |
| Receive a workunit and add it to the inbound queue. By default accept any workunit or accept a specific source rank. Note that this function is blocking and will onyl return once a workunit has been received. More... | |
| void | send_next_WU_on_request () |
| char | get_machine_letter () |
| How many masters are there in total ? More... | |
| core::Real | start_timer (MPI_TIMING timing_mode) const |
| This initiates a new timer block. Note that there is no end_timer() function - you just keep calling start_timer, which automatically ends the previous block (and records times etc) More... | |
| void | print_timing_stats () |
| Display the timing statistics. More... | |
| long | wall_time () const |
| Return the total life time of this class in seconds. More... | |
Protected Member Functions inherited from protocols::wum::WorkUnitManager | |
| const protocols::wum::WorkUnitList & | work_unit_list () const |
| protocols::wum::WorkUnitList & | work_unit_list () |
| void | write_queues_to_file (const std::string &prefix="default") const |
| void | write_work_unit (const WorkUnitBaseOP &wu, std::ostream &out) const |
| void | write_queue (const WorkUnitQueue &the_queue, std::ostream &out) const |
| void | read_queues_from_file (const std::string &prefix="default") |
| bool | read_work_unit (WorkUnitBaseOP &qualified_wu, std::istream &in) |
| void | read_queue (WorkUnitQueue &the_queue, std::istream &in) |
| core::Size | mem_foot_print () const |
| return total memory foot print in bytes More... | |
Private Attributes | |
| core::Size | print_statw_interval_ |
| Minimum time in seconds between statistics updates (to screen) More... | |
| core::Real | timing_last_start_time_ |
| when did the last timing block start ? (unixtime) More... | |
| MPI_TIMING | timing_last_type_ |
| Timing type that is currently active. More... | |
| core::Real | timing_total_ [TIMING_end] |
| Running sums of total time spent in for any given timing type. More... | |
| long | start_time_wall_clock_ |
| Start unixtime of this class (set once in contructor) More... | |
| long | last_stats_ |
| Last unixtime when stats were printed. More... | |
| core::Size | traffic_total_received_ |
| Total amount of traffic received, in bytes. More... | |
| core::Size | traffic_total_sent_ |
| Total amount of traffic sent, in bytes. More... | |
| core::Real | send_wu_time_ |
| Total time spent in MPI_Send. More... | |
| core::Real | send_wu_time_n_ |
| Total number of sends. More... | |
| core::Real | recv_wu_time_ |
| Total time spent in MPI_Recv. More... | |
| core::Real | recv_wu_time_n_ |
| Total time of receives. More... | |
| char | machine_letter_ |
Additional Inherited Members | |
Public Types inherited from protocols::wum::WorkUnitManager | |
| typedef WorkUnitQueue::iterator | iterator |
| typedef WorkUnitQueue::const_iterator | const_iterator |
|
protected |
| protocols::wum::MPI_WorkUnitManager::MPI_WorkUnitManager | ( | char | machine_letter | ) |
References protocols::wum::WorkUnitManager::inbound(), protocols::wum::mpi_npes(), protocols::wum::mpi_rank(), protocols::wum::WorkUnitManager::outbound(), reset_timing_stats(), protocols::wum::WorkUnitQueue::set_memory_limit(), start_time_wall_clock_, start_timer(), TIMING_CPU, timing_last_start_time_, and timing_last_type_.
|
overridedefault |
|
protected |
How many masters are there in total ?
This is for masters only - returns a serial master number, i.e. 0 is the first master, N-1 is the last master. Returns the running serial number (0 based) of a master. Returns 0 if emperor The first master returns 0, the second returns 1, etc..
References machine_letter_.
Referenced by print_stats().
|
overridepure virtual |
|
protectedpure virtual |
|
protectedvirtual |
Print a line with general run statistics, now.
Reimplemented in protocols::mpi_refinement::MPI_Refinement, and protocols::loophash::MPI_LoopHashRefine.
References core::chemical::element::F, get_machine_letter(), core::chemical::element::I, protocols::wum::WorkUnitManager::inbound(), protocols::wum::WorkUnitQueue::mem_foot_print(), protocols::wum::WorkUnitQueue::mem_stats(), protocols::wum::WorkUnitManager::outbound(), recv_wu_time_, recv_wu_time_n_, reset_timing_stats(), send_wu_time_, send_wu_time_n_, protocols::wum::WorkUnitQueue::size(), TIMING_CPU, TIMING_IDLE, TIMING_IO_READ, TIMING_IO_WRITE, timing_total_, TIMING_TRANSFER_RECV, TIMING_TRANSFER_SEND, TIMING_WAIT, traffic_total_received_, traffic_total_sent_, and wall_time().
Referenced by protocols::wum::MPI_WorkUnitManager_Slave::go(), and print_stats_auto().
|
protectedvirtual |
Print a line with general run statistics, only if enough time has pased since the last statistics printout.
References last_stats_, and print_stats().
Referenced by protocols::wum::MPI_WorkUnitManager_Slave::go(), and process_incoming_msgs().
|
protected |
Display the timing statistics.
|
protectedpure virtual |
|
protected |
MPI Communication function.
Check for messages and process them accordingly
References MPI_ANY_SOURCE, protocols::wum::WorkUnitManager::outbound(), print_stats_auto(), receive_MPI_workunit(), send_next_WU_on_request(), protocols::wum::WorkUnitQueue::size(), start_timer(), TIMING_CPU, TIMING_IDLE, protocols::wum::WUM_MPI_REQUEST_WU, and protocols::wum::WUM_MPI_SEND_WU.
Referenced by protocols::wum::MPI_WorkUnitManager_Slave::go().
|
protectedpure virtual |
|
protected |
Receive a workunit and add it to the inbound queue. By default accept any workunit or accept a specific source rank. Note that this function is blocking and will onyl return once a workunit has been received.
References protocols::wum::WorkUnitQueue::add(), core::chemical::element::F, protocols::wum::get_time(), protocols::wum::WorkUnitList::get_work_unit(), protocols::wum::WorkUnitManager::inbound(), recv_wu_time_, recv_wu_time_n_, start_timer(), TIMING_CPU, TIMING_TRANSFER_RECV, traffic_total_received_, TRDEBUG, protocols::wum::WorkUnitManager::work_unit_list(), protocols::wum::WUM_MPI_DATA_BLOCK, and protocols::wum::WUM_MPI_SEND_WU.
Referenced by process_incoming_msgs().
|
protected |
Reset all the stats counters.
References timing_total_.
Referenced by MPI_WorkUnitManager(), and print_stats().
|
protected |
Send a workunit to an arbitrary recipient.
References core::chemical::element::F, protocols::wum::get_time(), protocols::wum::mpi_npes(), protocols::wum::mpi_rank(), send_wu_time_, send_wu_time_n_, start_timer(), TIMING_CPU, TIMING_TRANSFER_SEND, TIMING_WAIT, traffic_total_sent_, TRDEBUG, protocols::wum::WUM_MPI_DATA_BLOCK, and protocols::wum::WUM_MPI_SEND_WU.
Referenced by protocols::wum::MPI_WorkUnitManager_Slave::process_outbound_wus(), send_next_WU_on_request(), protocols::loophash::MPI_LoopHashRefine::send_random_library_struct(), protocols::mpi_refinement::MPI_Refinement::send_random_library_struct(), protocols::mpi_refinement::MPI_Refinement::send_random_library_structs(), and protocols::mpi_refinement::MPI_Refinement::send_sortedpick_library_structs().
|
protected |
References protocols::wum::WorkUnitQueue::begin(), core::sequence::end, protocols::wum::WorkUnitQueue::end(), protocols::wum::WorkUnitQueue::erase(), MPI_ANY_SOURCE, protocols::wum::WorkUnitManager::outbound(), protocols::wum::WorkUnitQueue::push_back(), send_MPI_workunit(), protocols::wum::WorkUnitQueue::size(), start_timer(), TIMING_CPU, TRDEBUG, and protocols::wum::WUM_MPI_REQUEST_WU.
Referenced by process_incoming_msgs().
|
protected |
This initiates a new timer block. Note that there is no end_timer() function - you just keep calling start_timer, which automatically ends the previous block (and records times etc)
References protocols::wum::get_time(), TIMING_end, timing_last_start_time_, timing_last_type_, and timing_total_.
Referenced by protocols::loophash::MPI_LoopHashRefine::add_structure_to_library_add_n_replace(), protocols::mpi_refinement::MPI_Refinement::add_structure_to_library_add_n_replace(), protocols::loophash::MPI_LoopHashRefine::dump_structures(), protocols::mpi_refinement::MPI_Refinement::dump_structures(), protocols::loophash::MPI_LoopHashRefine::load_state(), protocols::mpi_refinement::MPI_Refinement::load_state(), protocols::loophash::MPI_LoopHashRefine::load_structures_from_cmdline_into_library(), protocols::mpi_refinement::MPI_Refinement::load_structures_from_cmdline_into_library(), MPI_WorkUnitManager(), protocols::wum::MPI_WorkUnitManager_Slave::process_inbound_wus(), process_incoming_msgs(), receive_MPI_workunit(), protocols::wum::MPI_WorkUnitManager_Slave::request_new_jobs(), protocols::loophash::MPI_LoopHashRefine::save_state(), protocols::mpi_refinement::MPI_Refinement::save_state(), send_MPI_workunit(), and send_next_WU_on_request().
|
protected |
Return the total life time of this class in seconds.
References start_time_wall_clock_.
Referenced by protocols::loophash::MPI_LoopHashRefine::print_stats(), protocols::mpi_refinement::MPI_Refinement::print_stats(), and print_stats().
|
mutableprivate |
Last unixtime when stats were printed.
Referenced by print_stats_auto().
|
private |
Referenced by get_machine_letter().
|
private |
Minimum time in seconds between statistics updates (to screen)
|
mutableprivate |
Total time spent in MPI_Recv.
Referenced by print_stats(), and receive_MPI_workunit().
|
mutableprivate |
Total time of receives.
Referenced by print_stats(), and receive_MPI_workunit().
|
mutableprivate |
Total time spent in MPI_Send.
Referenced by print_stats(), and send_MPI_workunit().
|
mutableprivate |
Total number of sends.
Referenced by print_stats(), and send_MPI_workunit().
|
private |
Start unixtime of this class (set once in contructor)
Referenced by MPI_WorkUnitManager(), and wall_time().
|
mutableprivate |
when did the last timing block start ? (unixtime)
Referenced by MPI_WorkUnitManager(), and start_timer().
|
mutableprivate |
Timing type that is currently active.
Referenced by MPI_WorkUnitManager(), and start_timer().
|
mutableprivate |
Running sums of total time spent in for any given timing type.
Referenced by print_stats(), reset_timing_stats(), and start_timer().
|
mutableprivate |
Total amount of traffic received, in bytes.
Referenced by print_stats(), and receive_MPI_workunit().
|
mutableprivate |
Total amount of traffic sent, in bytes.
Referenced by print_stats(), and send_MPI_workunit().
1.8.7