Realm
A distributed, event-based tasking library
Loading...
Searching...
No Matches
Realm::RuntimeImpl Class Reference

#include <runtime_impl.h>

Collaboration diagram for Realm::RuntimeImpl:
[legend]

Classes

class  DeferredShutdown

Public Member Functions

 RuntimeImpl (void)
 ~RuntimeImpl (void)
bool network_init (int *argc, char ***argv, const Runtime::KeyValueStoreVtable &vtable)
bool has_key_value_store (void) const
bool is_key_value_store_elastic (void) const
bool has_key_value_store_group (void) const
std::optional< uint64_t > key_value_store_local_group (void) const
std::optional< uint64_t > key_value_store_local_rank (void) const
std::optional< uint64_t > key_value_store_local_ranks (void) const
std::optional< uint64_t > key_value_store_get_int (const std::string_view &key) const
bool key_value_store_put (const void *key, size_t key_size, const void *value, size_t value_size) const
bool key_value_store_get (const void *key, size_t key_size, void *value, size_t *value_size) const
bool key_value_store_bar (void) const
bool key_value_store_cas (const void *key, size_t key_size, void *expected, size_t *expected_size, const void *desired, size_t desired_size) const
void parse_command_line (std::vector< std::string > &cmdline)
void finish_configure (void)
bool configure_from_command_line (std::vector< std::string > &cmdline)
void start (void)
bool register_task (Processor::TaskFuncID taskid, Processor::TaskFuncPtr taskptr)
Event notify_register_reduction (ReductionOpID redop_id)
bool register_reduction (Event &event, ReductionOpID redop_id, const ReductionOpUntyped *redop)
bool register_custom_serdez (CustomSerdezID serdez_id, const CustomSerdezUntyped *serdez)
Event collective_spawn (Processor target_proc, Processor::TaskFuncID task_id, const void *args, size_t arglen, Event wait_on=Event::NO_EVENT, int priority=0)
Event collective_spawn_by_kind (Processor::Kind target_kind, Processor::TaskFuncID task_id, const void *args, size_t arglen, bool one_per_node=false, Event wait_on=Event::NO_EVENT, int priority=0)
void run (Processor::TaskFuncID task_id=0, Runtime::RunStyle style=Runtime::ONE_TASK_ONLY, const void *args=0, size_t arglen=0, bool background=false)
bool request_shutdown (Event wait_on, int result_code)
void initiate_shutdown (void)
void shutdown (Event wait_on=Event::NO_EVENT, int result_code=0)
int wait_for_shutdown (void)
bool create_configs (int argc, char **argv)
ModuleConfig * get_module_config (const std::string &name) const
EventImpl * get_event_impl (Event e)
GenEventImpl * get_genevent_impl (Event e)
BarrierImpl * get_barrier_impl (Event e)
ReservationImpl * get_lock_impl (ID id)
MemoryImpl * get_memory_impl (ID id) const
IBMemory * get_ib_memory_impl (ID id) const
REALM_INTERNAL_API_EXTERNAL_LINKAGE ProcessorImpl * get_processor_impl (ID id)
ProcessorGroupImpl * get_procgroup_impl (ID id)
RegionInstanceImpl * get_instance_impl (ID id)
SparsityMapImplWrapper * get_sparsity_impl (ID id)
SparsityMapImplWrapper * get_available_sparsity_impl (NodeID target_node)
void free_sparsity_impl (SparsityMapImplWrapper *impl)
CompQueueImpl * get_compqueue_impl (ID id)
SubgraphImpl * get_subgraph_impl (ID id)
void add_memory (MemoryImpl *m)
void add_ib_memory (IBMemory *m)
void add_processor (ProcessorImpl *p)
void add_dma_channel (Channel *c)
void add_code_translator (CodeTranslator *t)
void add_proc_mem_affinity (const Machine::ProcessorMemoryAffinity &pma)
Memory next_local_memory_id (void)
Memory next_local_ib_memory_id (void)
Processor next_local_processor_id (void)
CoreReservationSet & core_reservation_set (void)
const std::vector< CodeTranslator * > & get_code_translators (void) const
template<typename T>
T * get_module (const char *name) const

Static Public Member Functions

static void realm_backtrace (int signal)

Public Attributes

MachineImpl * machine
LockedMap< ReductionOpID, ReductionOpUntyped * > reduce_op_table
LockedMap< CustomSerdezID, CustomSerdezUntyped * > custom_serdez_table
atomic< size_t > num_untriggered_events
Node * nodes
size_t num_nodes
DynamicTable< LocalEventTableAllocator > local_events
LocalEventTableAllocator::FreeList * local_event_free_list {nullptr}
BarrierTableAllocator::FreeList * local_barrier_free_list {nullptr}
ReservationTableAllocator::FreeList * local_reservation_free_list {nullptr}
CompQueueTableAllocator::FreeList * local_compqueue_free_list {nullptr}
std::vector< SparsityMapTableAllocator::FreeList * > local_sparsity_map_free_lists
std::vector< SubgraphTableAllocator::FreeList * > local_subgraph_free_lists
std::vector< ProcessorGroupTableAllocator::FreeList * > local_proc_group_free_lists
bool run_method_called
Mutex shutdown_mutex
Mutex::CondVar shutdown_condvar
bool shutdown_request_received
Event shutdown_precondition
int shutdown_result_code
bool shutdown_initiated
atomic< bool > shutdown_in_progress
std::unordered_map< realm_id_t, SharedMemoryInfo > remote_shared_memory_mappings
std::unordered_map< realm_id_t, SharedMemoryInfo > local_shared_memory_mappings
HardwareTopology host_topology
bool topology_init = false
CoreReservationSet * core_reservations
BackgroundWorkManager bgwork
IncomingMessageManager * message_manager
EventTriggerNotifier event_triggerer
EventCommunicator event_communicator
CopyAnalyzer copy_analyzer
OperationTable optable
SamplingProfiler sampling_profiler
ReplicatedHeap repl_heap
bool shared_peers_use_network_module = true
DeferredShutdown deferred_shutdown

Protected Member Functions

Module * get_module_untyped (const char *name) const
void create_shared_peers (void)
 Auxilary function to create Network::shared_peers using either ipc mailbox or relying on network modules.
bool share_memories (void)
 Auxilary function for handling the sharing mechanism of all registered memories across the machine.

Protected Attributes

ID::IDType num_local_memories
ID::IDType num_local_ib_memories
ID::IDType num_local_processors
NetworkSegment reg_ib_mem_segment
NetworkSegment reg_mem_segment
ModuleRegistrar module_registrar
bool modules_created
bool module_configs_created
std::vector< Module * > modules
std::vector< CodeTranslator * > code_translators
std::vector< NetworkModule * > network_modules
std::vector< NetworkSegment * > network_segments
std::map< std::string, ModuleConfig * > module_configs
Runtime::KeyValueStoreVtable key_value_store_vtable
std::vector< uint8_t > key_value_store_vtable_data

Friends

class Runtime

Constructor & Destructor Documentation

◆ RuntimeImpl()

Realm::RuntimeImpl::RuntimeImpl ( void )

◆ ~RuntimeImpl()

Realm::RuntimeImpl::~RuntimeImpl ( void )

Member Function Documentation

◆ add_code_translator()

void Realm::RuntimeImpl::add_code_translator ( CodeTranslator * t)

◆ add_dma_channel()

void Realm::RuntimeImpl::add_dma_channel ( Channel * c)

◆ add_ib_memory()

void Realm::RuntimeImpl::add_ib_memory ( IBMemory * m)

◆ add_memory()

void Realm::RuntimeImpl::add_memory ( MemoryImpl * m)

◆ add_proc_mem_affinity()

void Realm::RuntimeImpl::add_proc_mem_affinity ( const Machine::ProcessorMemoryAffinity & pma)

◆ add_processor()

void Realm::RuntimeImpl::add_processor ( ProcessorImpl * p)

◆ collective_spawn()

Event Realm::RuntimeImpl::collective_spawn ( Processor target_proc,
Processor::TaskFuncID task_id,
const void * args,
size_t arglen,
Event wait_on = Event::NO_EVENT,
int priority = 0 )

◆ collective_spawn_by_kind()

Event Realm::RuntimeImpl::collective_spawn_by_kind ( Processor::Kind target_kind,
Processor::TaskFuncID task_id,
const void * args,
size_t arglen,
bool one_per_node = false,
Event wait_on = Event::NO_EVENT,
int priority = 0 )

◆ configure_from_command_line()

bool Realm::RuntimeImpl::configure_from_command_line ( std::vector< std::string > & cmdline)

◆ core_reservation_set()

CoreReservationSet & Realm::RuntimeImpl::core_reservation_set ( void )

◆ create_configs()

bool Realm::RuntimeImpl::create_configs ( int argc,
char ** argv )

◆ create_shared_peers()

void Realm::RuntimeImpl::create_shared_peers ( void )
protected

Auxilary function to create Network::shared_peers using either ipc mailbox or relying on network modules.

◆ finish_configure()

void Realm::RuntimeImpl::finish_configure ( void )

◆ free_sparsity_impl()

void Realm::RuntimeImpl::free_sparsity_impl ( SparsityMapImplWrapper * impl)

◆ get_available_sparsity_impl()

SparsityMapImplWrapper * Realm::RuntimeImpl::get_available_sparsity_impl ( NodeID target_node)

◆ get_barrier_impl()

BarrierImpl * Realm::RuntimeImpl::get_barrier_impl ( Event e)

◆ get_code_translators()

const std::vector< CodeTranslator * > & Realm::RuntimeImpl::get_code_translators ( void ) const

◆ get_compqueue_impl()

CompQueueImpl * Realm::RuntimeImpl::get_compqueue_impl ( ID id)

◆ get_event_impl()

EventImpl * Realm::RuntimeImpl::get_event_impl ( Event e)

◆ get_genevent_impl()

GenEventImpl * Realm::RuntimeImpl::get_genevent_impl ( Event e)

◆ get_ib_memory_impl()

IBMemory * Realm::RuntimeImpl::get_ib_memory_impl ( ID id) const

◆ get_instance_impl()

RegionInstanceImpl * Realm::RuntimeImpl::get_instance_impl ( ID id)

◆ get_lock_impl()

ReservationImpl * Realm::RuntimeImpl::get_lock_impl ( ID id)

◆ get_memory_impl()

MemoryImpl * Realm::RuntimeImpl::get_memory_impl ( ID id) const

◆ get_module()

template<typename T>
T * Realm::RuntimeImpl::get_module ( const char * name) const
inline

◆ get_module_config()

ModuleConfig * Realm::RuntimeImpl::get_module_config ( const std::string & name) const

◆ get_module_untyped()

Module * Realm::RuntimeImpl::get_module_untyped ( const char * name) const
protected

◆ get_processor_impl()

REALM_INTERNAL_API_EXTERNAL_LINKAGE ProcessorImpl * Realm::RuntimeImpl::get_processor_impl ( ID id)

◆ get_procgroup_impl()

ProcessorGroupImpl * Realm::RuntimeImpl::get_procgroup_impl ( ID id)

◆ get_sparsity_impl()

SparsityMapImplWrapper * Realm::RuntimeImpl::get_sparsity_impl ( ID id)

◆ get_subgraph_impl()

SubgraphImpl * Realm::RuntimeImpl::get_subgraph_impl ( ID id)

◆ has_key_value_store()

bool Realm::RuntimeImpl::has_key_value_store ( void ) const

◆ has_key_value_store_group()

bool Realm::RuntimeImpl::has_key_value_store_group ( void ) const

◆ initiate_shutdown()

void Realm::RuntimeImpl::initiate_shutdown ( void )

◆ is_key_value_store_elastic()

bool Realm::RuntimeImpl::is_key_value_store_elastic ( void ) const

◆ key_value_store_bar()

bool Realm::RuntimeImpl::key_value_store_bar ( void ) const

◆ key_value_store_cas()

bool Realm::RuntimeImpl::key_value_store_cas ( const void * key,
size_t key_size,
void * expected,
size_t * expected_size,
const void * desired,
size_t desired_size ) const

◆ key_value_store_get()

bool Realm::RuntimeImpl::key_value_store_get ( const void * key,
size_t key_size,
void * value,
size_t * value_size ) const

◆ key_value_store_get_int()

std::optional< uint64_t > Realm::RuntimeImpl::key_value_store_get_int ( const std::string_view & key) const

◆ key_value_store_local_group()

std::optional< uint64_t > Realm::RuntimeImpl::key_value_store_local_group ( void ) const

◆ key_value_store_local_rank()

std::optional< uint64_t > Realm::RuntimeImpl::key_value_store_local_rank ( void ) const

◆ key_value_store_local_ranks()

std::optional< uint64_t > Realm::RuntimeImpl::key_value_store_local_ranks ( void ) const

◆ key_value_store_put()

bool Realm::RuntimeImpl::key_value_store_put ( const void * key,
size_t key_size,
const void * value,
size_t value_size ) const

◆ network_init()

bool Realm::RuntimeImpl::network_init ( int * argc,
char *** argv,
const Runtime::KeyValueStoreVtable & vtable )

◆ next_local_ib_memory_id()

Memory Realm::RuntimeImpl::next_local_ib_memory_id ( void )

◆ next_local_memory_id()

Memory Realm::RuntimeImpl::next_local_memory_id ( void )

◆ next_local_processor_id()

Processor Realm::RuntimeImpl::next_local_processor_id ( void )

◆ notify_register_reduction()

Event Realm::RuntimeImpl::notify_register_reduction ( ReductionOpID redop_id)

◆ parse_command_line()

void Realm::RuntimeImpl::parse_command_line ( std::vector< std::string > & cmdline)

◆ realm_backtrace()

void Realm::RuntimeImpl::realm_backtrace ( int signal)
static

◆ register_custom_serdez()

bool Realm::RuntimeImpl::register_custom_serdez ( CustomSerdezID serdez_id,
const CustomSerdezUntyped * serdez )

◆ register_reduction()

bool Realm::RuntimeImpl::register_reduction ( Event & event,
ReductionOpID redop_id,
const ReductionOpUntyped * redop )

◆ register_task()

bool Realm::RuntimeImpl::register_task ( Processor::TaskFuncID taskid,
Processor::TaskFuncPtr taskptr )

◆ request_shutdown()

bool Realm::RuntimeImpl::request_shutdown ( Event wait_on,
int result_code )

◆ run()

void Realm::RuntimeImpl::run ( Processor::TaskFuncID task_id = 0,
Runtime::RunStyle style = Runtime::ONE_TASK_ONLY,
const void * args = 0,
size_t arglen = 0,
bool background = false )

◆ share_memories()

bool Realm::RuntimeImpl::share_memories ( void )
protected

Auxilary function for handling the sharing mechanism of all registered memories across the machine.

Note
requires a coordination of Network::barriers, so may be fatal if this call fails
Returns
True if successful, false otherwise

◆ shutdown()

void Realm::RuntimeImpl::shutdown ( Event wait_on = Event::NO_EVENT,
int result_code = 0 )

◆ start()

void Realm::RuntimeImpl::start ( void )

◆ wait_for_shutdown()

int Realm::RuntimeImpl::wait_for_shutdown ( void )

◆ Runtime

friend class Runtime
friend

Member Data Documentation

◆ bgwork

BackgroundWorkManager Realm::RuntimeImpl::bgwork

◆ code_translators

std::vector<CodeTranslator *> Realm::RuntimeImpl::code_translators
protected

◆ copy_analyzer

CopyAnalyzer Realm::RuntimeImpl::copy_analyzer

◆ core_reservations

CoreReservationSet* Realm::RuntimeImpl::core_reservations

◆ custom_serdez_table

LockedMap<CustomSerdezID, CustomSerdezUntyped *> Realm::RuntimeImpl::custom_serdez_table

◆ deferred_shutdown

DeferredShutdown Realm::RuntimeImpl::deferred_shutdown

◆ event_communicator

EventCommunicator Realm::RuntimeImpl::event_communicator

◆ event_triggerer

EventTriggerNotifier Realm::RuntimeImpl::event_triggerer

◆ host_topology

HardwareTopology Realm::RuntimeImpl::host_topology

◆ key_value_store_vtable

Runtime::KeyValueStoreVtable Realm::RuntimeImpl::key_value_store_vtable
protected

◆ key_value_store_vtable_data

std::vector<uint8_t> Realm::RuntimeImpl::key_value_store_vtable_data
protected

◆ local_barrier_free_list

BarrierTableAllocator::FreeList* Realm::RuntimeImpl::local_barrier_free_list {nullptr}

◆ local_compqueue_free_list

CompQueueTableAllocator::FreeList* Realm::RuntimeImpl::local_compqueue_free_list {nullptr}

◆ local_event_free_list

LocalEventTableAllocator::FreeList* Realm::RuntimeImpl::local_event_free_list {nullptr}

◆ local_events

DynamicTable<LocalEventTableAllocator> Realm::RuntimeImpl::local_events
Initial value:
{
EventTriggerNotifier event_triggerer
Definition runtime_impl.h:416
EventCommunicator event_communicator
Definition runtime_impl.h:418

◆ local_proc_group_free_lists

std::vector<ProcessorGroupTableAllocator::FreeList *> Realm::RuntimeImpl::local_proc_group_free_lists

◆ local_reservation_free_list

ReservationTableAllocator::FreeList* Realm::RuntimeImpl::local_reservation_free_list {nullptr}

◆ local_shared_memory_mappings

std::unordered_map<realm_id_t, SharedMemoryInfo> Realm::RuntimeImpl::local_shared_memory_mappings

◆ local_sparsity_map_free_lists

std::vector<SparsityMapTableAllocator::FreeList *> Realm::RuntimeImpl::local_sparsity_map_free_lists

◆ local_subgraph_free_lists

std::vector<SubgraphTableAllocator::FreeList *> Realm::RuntimeImpl::local_subgraph_free_lists

◆ machine

MachineImpl* Realm::RuntimeImpl::machine

◆ message_manager

IncomingMessageManager* Realm::RuntimeImpl::message_manager

◆ module_configs

std::map<std::string, ModuleConfig *> Realm::RuntimeImpl::module_configs
protected

◆ module_configs_created

bool Realm::RuntimeImpl::module_configs_created
protected

◆ module_registrar

ModuleRegistrar Realm::RuntimeImpl::module_registrar
protected

◆ modules

std::vector<Module *> Realm::RuntimeImpl::modules
protected

◆ modules_created

bool Realm::RuntimeImpl::modules_created
protected

◆ network_modules

std::vector<NetworkModule *> Realm::RuntimeImpl::network_modules
protected

◆ network_segments

std::vector<NetworkSegment *> Realm::RuntimeImpl::network_segments
protected

◆ nodes

Node* Realm::RuntimeImpl::nodes

◆ num_local_ib_memories

ID::IDType Realm::RuntimeImpl::num_local_ib_memories
protected

◆ num_local_memories

ID::IDType Realm::RuntimeImpl::num_local_memories
protected

◆ num_local_processors

ID::IDType Realm::RuntimeImpl::num_local_processors
protected

◆ num_nodes

size_t Realm::RuntimeImpl::num_nodes

◆ num_untriggered_events

atomic<size_t> Realm::RuntimeImpl::num_untriggered_events

◆ optable

OperationTable Realm::RuntimeImpl::optable

◆ reduce_op_table

LockedMap<ReductionOpID, ReductionOpUntyped *> Realm::RuntimeImpl::reduce_op_table

◆ reg_ib_mem_segment

NetworkSegment Realm::RuntimeImpl::reg_ib_mem_segment
protected

◆ reg_mem_segment

NetworkSegment Realm::RuntimeImpl::reg_mem_segment
protected

◆ remote_shared_memory_mappings

std::unordered_map<realm_id_t, SharedMemoryInfo> Realm::RuntimeImpl::remote_shared_memory_mappings

◆ repl_heap

ReplicatedHeap Realm::RuntimeImpl::repl_heap

◆ run_method_called

bool Realm::RuntimeImpl::run_method_called

◆ sampling_profiler

SamplingProfiler Realm::RuntimeImpl::sampling_profiler

◆ shared_peers_use_network_module

bool Realm::RuntimeImpl::shared_peers_use_network_module = true

◆ shutdown_condvar

Mutex::CondVar Realm::RuntimeImpl::shutdown_condvar

◆ shutdown_in_progress

atomic<bool> Realm::RuntimeImpl::shutdown_in_progress

◆ shutdown_initiated

bool Realm::RuntimeImpl::shutdown_initiated

◆ shutdown_mutex

Mutex Realm::RuntimeImpl::shutdown_mutex

◆ shutdown_precondition

Event Realm::RuntimeImpl::shutdown_precondition

◆ shutdown_request_received

bool Realm::RuntimeImpl::shutdown_request_received

◆ shutdown_result_code

int Realm::RuntimeImpl::shutdown_result_code

◆ topology_init

bool Realm::RuntimeImpl::topology_init = false

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