Thrill  0.1
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
context.cpp File Reference
#include <thrill/api/context.hpp>
#include <thrill/api/dia_base.hpp>
#include <thrill/common/linux_proc_stats.hpp>
#include <thrill/common/logger.hpp>
#include <thrill/common/math.hpp>
#include <thrill/common/porting.hpp>
#include <thrill/common/profile_thread.hpp>
#include <thrill/common/string.hpp>
#include <thrill/common/system_exception.hpp>
#include <thrill/io/iostats.hpp>
#include <thrill/vfs/file_io.hpp>
#include <tlx/math/abs_diff.hpp>
#include <tlx/string/format_si_iec_units.hpp>
#include <tlx/string/parse_si_iec_units.hpp>
#include <tlx/string/split.hpp>
#include <thrill/net/mock/group.hpp>
#include <algorithm>
#include <csignal>
#include <iostream>
#include <memory>
#include <string>
#include <thread>
#include <tuple>
#include <utility>
#include <vector>
+ Include dependency graph for context.cpp:

Go to the source code of this file.

Namespaces

 thrill
 
 thrill::api
 

Typedefs

using TestGroup = net::tcp::Group
 

Functions

template<typename NetGroup >
static std::vector
< std::unique_ptr< HostContext > > 
ConstructLoopbackHostContexts (const MemoryConfig &mem_config, size_t num_hosts, size_t workers_per_host)
 Generic network constructor for net backends supporting loopback tests. More...
 
template<>
data::CatStreamPtr Context::GetNewStream< data::CatStream > (size_t dia_id)
 
template<>
data::MixStreamPtr Context::GetNewStream< data::MixStream > (size_t dia_id)
 
static bool Deinitialize ()
 
static const char * DetectNetBackend ()
 
static size_t FindWorkersPerHost (const char *&str_workers_per_host, const char *&env_workers_per_host)
 
static bool Initialize ()
 
int Run (const std::function< void(Context &)> &job_startpoint)
 Runs the given job startpoint with a Context instance. More...
 
template<typename NetGroup >
static int RunBackendLoopback (const char *backend, const std::function< void(Context &)> &job_startpoint)
 Run() implementation which uses a loopback net backend ("mock" or "tcp"). More...
 
template<typename NetGroup >
static void RunLoopbackThreads (const MemoryConfig &mem_config, size_t num_hosts, size_t workers_per_host, size_t core_offset, const std::function< void(Context &)> &job_startpoint)
 Generic runner for backends supporting loopback tests. More...
 
int RunNotSupported (const char *env_net)
 
static bool SetupBlockSize ()
 
int wrap_setenv (const char *name, const char *value, int overwrite)
 
Run Methods with Internal Networks for Testing
void RunLocalMock (const MemoryConfig &mem_config, size_t num_hosts, size_t workers_per_host, const std::function< void(Context &)> &job_startpoint)
 Function to run a number of mock hosts as locally independent threads, which communicate via internal stream sockets. More...
 
void RunLocalTests (const std::function< void(Context &)> &job_startpoint)
 Helper Function to execute RunLocalMock() tests using mock networks in test suite for many different numbers of workers and hosts as independent threads in one program. More...
 
void RunLocalTests (size_t ram, const std::function< void(Context &)> &job_startpoint)
 Helper Function to execute RunLocalMock() tests using mock networks in test suite for many different numbers of workers and hosts as independent threads in one program. More...
 
void RunLocalSameThread (const std::function< void(Context &)> &job_startpoint)
 Runs the given job_startpoint within the same thread with a test network –> run test with one host and one thread. More...
 
int RunCheckDieWithParent ()
 Check environment variable THRILL_DIE_WITH_PARENT and enable process flag: this is useful for ssh/invoke.sh: it kills spawned processes when the ssh connection breaks. More...
 
int RunCheckUnlinkBinary ()
 Check environment variable THRILL_UNLINK_BINARY and unlink given program path: this is useful for ssh/invoke.sh: it removes the copied program files while it is running, hence it is gone even if the program crashes. More...