Rosetta  2021.16
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
Public Member Functions | Protected Types | Protected Member Functions | Private Attributes | List of all members
protocols::wum::MPI_WorkUnitManager Class Referenceabstract

#include <MPI_WorkUnitManager.hh>

Inheritance diagram for protocols::wum::MPI_WorkUnitManager:
Inheritance graph
[legend]

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)
 
WorkUnitQueueoutbound ()
 
WorkUnitQueueinbound ()
 
const WorkUnitQueueoutbound () const
 
const WorkUnitQueueinbound () 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::WorkUnitListwork_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
 

Member Enumeration Documentation

Enumerator
TIMING_WAIT 
TIMING_TRANSFER_SEND 
TIMING_TRANSFER_RECV 
TIMING_CPU 
TIMING_IO_WRITE 
TIMING_IO_READ 
TIMING_IDLE 
TIMING_end 

Constructor & Destructor Documentation

protocols::wum::MPI_WorkUnitManager::MPI_WorkUnitManager ( char  machine_letter)
protocols::wum::MPI_WorkUnitManager::~MPI_WorkUnitManager ( )
overridedefault

Member Function Documentation

char protocols::wum::MPI_WorkUnitManager::get_machine_letter ( )
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().

void protocols::wum::MPI_WorkUnitManager::go ( )
overridepure virtual
virtual void protocols::wum::MPI_WorkUnitManager::init ( )
protectedpure virtual
void protocols::wum::MPI_WorkUnitManager::print_stats ( )
protectedvirtual
void protocols::wum::MPI_WorkUnitManager::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().

void protocols::wum::MPI_WorkUnitManager::print_timing_stats ( )
protected

Display the timing statistics.

virtual void protocols::wum::MPI_WorkUnitManager::process_inbound_wus ( )
protectedpure virtual
void protocols::wum::MPI_WorkUnitManager::process_incoming_msgs ( bool  wait_until_message = false)
protected
virtual void protocols::wum::MPI_WorkUnitManager::process_outbound_wus ( )
protectedpure virtual
void protocols::wum::MPI_WorkUnitManager::receive_MPI_workunit ( core::Size  node_rank = MPI_ANY_SOURCE)
protected
void protocols::wum::MPI_WorkUnitManager::reset_timing_stats ( )
protected

Reset all the stats counters.

References timing_total_.

Referenced by MPI_WorkUnitManager(), and print_stats().

void protocols::wum::MPI_WorkUnitManager::send_MPI_workunit ( const WorkUnitBaseOP wu,
int  dest_rank 
) const
protected
void protocols::wum::MPI_WorkUnitManager::send_next_WU_on_request ( )
protected
core::Real protocols::wum::MPI_WorkUnitManager::start_timer ( MPI_TIMING  timing_mode) const
protected
long protocols::wum::MPI_WorkUnitManager::wall_time ( ) const
protected

Member Data Documentation

long protocols::wum::MPI_WorkUnitManager::last_stats_
mutableprivate

Last unixtime when stats were printed.

Referenced by print_stats_auto().

char protocols::wum::MPI_WorkUnitManager::machine_letter_
private

Referenced by get_machine_letter().

core::Size protocols::wum::MPI_WorkUnitManager::print_statw_interval_
private

Minimum time in seconds between statistics updates (to screen)

core::Real protocols::wum::MPI_WorkUnitManager::recv_wu_time_
mutableprivate

Total time spent in MPI_Recv.

Referenced by print_stats(), and receive_MPI_workunit().

core::Real protocols::wum::MPI_WorkUnitManager::recv_wu_time_n_
mutableprivate

Total time of receives.

Referenced by print_stats(), and receive_MPI_workunit().

core::Real protocols::wum::MPI_WorkUnitManager::send_wu_time_
mutableprivate

Total time spent in MPI_Send.

Referenced by print_stats(), and send_MPI_workunit().

core::Real protocols::wum::MPI_WorkUnitManager::send_wu_time_n_
mutableprivate

Total number of sends.

Referenced by print_stats(), and send_MPI_workunit().

long protocols::wum::MPI_WorkUnitManager::start_time_wall_clock_
private

Start unixtime of this class (set once in contructor)

Referenced by MPI_WorkUnitManager(), and wall_time().

core::Real protocols::wum::MPI_WorkUnitManager::timing_last_start_time_
mutableprivate

when did the last timing block start ? (unixtime)

Referenced by MPI_WorkUnitManager(), and start_timer().

MPI_TIMING protocols::wum::MPI_WorkUnitManager::timing_last_type_
mutableprivate

Timing type that is currently active.

Referenced by MPI_WorkUnitManager(), and start_timer().

core::Real protocols::wum::MPI_WorkUnitManager::timing_total_[TIMING_end]
mutableprivate

Running sums of total time spent in for any given timing type.

Referenced by print_stats(), reset_timing_stats(), and start_timer().

core::Size protocols::wum::MPI_WorkUnitManager::traffic_total_received_
mutableprivate

Total amount of traffic received, in bytes.

Referenced by print_stats(), and receive_MPI_workunit().

core::Size protocols::wum::MPI_WorkUnitManager::traffic_total_sent_
mutableprivate

Total amount of traffic sent, in bytes.

Referenced by print_stats(), and send_MPI_workunit().


The documentation for this class was generated from the following files: