Thrill
0.1
|
The HostContext contains all data structures shared among workers on the same host.
It is used to construct and destroy them. For testing multiple instances are run in the same process.
Definition at line 90 of file context.hpp.
#include <context.hpp>
Public Member Functions | |
HostContext (size_t local_host_id, const MemoryConfig &mem_config, std::unique_ptr< net::DispatcherThread > dispatcher, std::array< net::GroupPtr, net::Manager::kGroupCount > &&groups, size_t workers_per_host) | |
constructor from existing net Groups. Used by the construction methods. More... | |
~HostContext () | |
destructor More... | |
data::BlockPool & | block_pool () |
the block manager keeps all data blocks moving through the system. More... | |
data::Multiplexer & | data_multiplexer () |
data multiplexer transmits large amounts of data asynchronously. More... | |
net::FlowControlChannelManager & | flow_manager () |
the flow control group is used for collective communication. More... | |
size_t | host_rank () const |
size_t | local_host_id () const |
Returns local_host_id_. More... | |
std::string | MakeHostLogPath (size_t host_rank) |
create host log More... | |
MemoryConfig & | mem_config () |
host-global memory config More... | |
mem::Manager & | mem_manager () |
host-global memory manager More... | |
net::Manager & | net_manager () |
net manager constructs communication groups to other hosts. More... | |
size_t | worker_mem_limit () const |
memory limit of each worker Context for local data structures More... | |
size_t | workers_per_host () const |
number of workers per host (all have the same). More... | |
Static Public Member Functions | |
static std::vector< std::unique_ptr< HostContext > > | ConstructLoopback (size_t num_hosts, size_t workers_per_host) |
Construct a number of mock hosts running in this process. More... | |
Public Attributes | |
Logging System | |
common::JsonLogger | base_logger_ |
base logger exclusive for this host context More... | |
common::JsonLogger | logger_ |
std::unique_ptr< common::ProfileThread > | profiler_ |
thread for scheduling profiling methods for statistical output More... | |
Private Attributes | |
data::BlockPool | block_pool_ |
data block pool More... | |
common::ProfileTaskRegistration | block_pool_profiler_ |
register BlockPool's profiling method More... | |
data::Multiplexer | data_multiplexer_ |
data multiplexer transmits large amounts of data asynchronously. More... | |
std::unique_ptr< net::DispatcherThread > | dispatcher_ |
main host network dispatcher thread backend More... | |
net::FlowControlChannelManager | flow_manager_ |
the flow control group is used for collective communication. More... | |
size_t | local_host_id_ |
id among all local hosts (in test program runs) More... | |
MemoryConfig | mem_config_ |
memory configuration More... | |
mem::Manager | mem_manager_ { nullptr, "HostContext" } |
host-global memory manager for internal memory only More... | |
net::Manager | net_manager_ |
net manager constructs communication groups to other hosts. More... | |
common::ProfileTaskRegistration | net_manager_profiler_ |
register net_manager_'s profiling method More... | |
size_t | workers_per_host_ |
number of workers per host (all have the same). More... | |
HostContext | ( | size_t | local_host_id, |
const MemoryConfig & | mem_config, | ||
std::unique_ptr< net::DispatcherThread > | dispatcher, | ||
std::array< net::GroupPtr, net::Manager::kGroupCount > && | groups, | ||
size_t | workers_per_host | ||
) |
constructor from existing net Groups. Used by the construction methods.
Definition at line 1123 of file context.cpp.
References MemoryConfig::enable_proc_profiler_, thrill::common::LogCmdlineParams(), HostContext::logger_, HostContext::mem_config_, HostContext::profiler_, thrill::common::StartLinuxProcStatsProfiler(), and thrill::mem::StartMemProfiler().
~HostContext | ( | ) |
|
inline |
the block manager keeps all data blocks moving through the system.
Definition at line 139 of file context.hpp.
|
static |
Construct a number of mock hosts running in this process.
Definition at line 308 of file context.cpp.
References HostContext::mem_config(), MemoryConfig::setup(), MemoryConfig::verbose_, and HostContext::workers_per_host().
|
inline |
data multiplexer transmits large amounts of data asynchronously.
Definition at line 142 of file context.hpp.
|
inline |
the flow control group is used for collective communication.
Definition at line 136 of file context.hpp.
|
inline |
Returns id of this host in the cluser. A host is a machine in the cluster that hosts multiple workers
Definition at line 133 of file context.hpp.
|
inline |
Returns local_host_id_.
Definition at line 112 of file context.hpp.
std::string MakeHostLogPath | ( | size_t | host_rank | ) |
create host log
Definition at line 1154 of file context.cpp.
References HostContext::mem_config(), and thrill::mem::to_string().
|
inline |
host-global memory config
Definition at line 123 of file context.hpp.
Referenced by HostContext::ConstructLoopback(), HostContext::MakeHostLogPath(), thrill::api::RunBackendLoopback(), thrill::api::RunLocalSameThread(), and thrill::api::RunLocalTests().
|
inline |
host-global memory manager
Definition at line 126 of file context.hpp.
|
inline |
net manager constructs communication groups to other hosts.
Definition at line 129 of file context.hpp.
|
inline |
memory limit of each worker Context for local data structures
Definition at line 118 of file context.hpp.
|
inline |
number of workers per host (all have the same).
Definition at line 115 of file context.hpp.
Referenced by HostContext::ConstructLoopback(), and thrill::api::RunBackendLoopback().
common::JsonLogger base_logger_ |
base logger exclusive for this host context
Definition at line 153 of file context.hpp.
|
private |
|
private |
register BlockPool's profiling method
Definition at line 201 of file context.hpp.
|
private |
data multiplexer transmits large amounts of data asynchronously.
Definition at line 207 of file context.hpp.
|
private |
main host network dispatcher thread backend
Definition at line 176 of file context.hpp.
Referenced by HostContext::~HostContext().
|
private |
the flow control group is used for collective communication.
Definition at line 189 of file context.hpp.
|
private |
id among all local hosts (in test program runs)
Definition at line 167 of file context.hpp.
common::JsonLogger logger_ |
public member which delivers key:value pairs as JSON log lines. this logger is local to this Context which is exclusive for one worker thread.
Definition at line 158 of file context.hpp.
Referenced by HostContext::HostContext().
|
private |
memory configuration
Definition at line 146 of file context.hpp.
Referenced by HostContext::HostContext().
|
private |
host-global memory manager for internal memory only
Definition at line 173 of file context.hpp.
|
private |
net manager constructs communication groups to other hosts.
Definition at line 179 of file context.hpp.
|
private |
register net_manager_'s profiling method
Definition at line 183 of file context.hpp.
std::unique_ptr<common::ProfileThread> profiler_ |
thread for scheduling profiling methods for statistical output
Definition at line 161 of file context.hpp.
Referenced by HostContext::HostContext().
|
private |
number of workers per host (all have the same).
Definition at line 170 of file context.hpp.