Hermes  0.9.5-beta
Hierarchical Distributed I/O Buffering System
hermes::api::Hermes Class Reference

#include <hermes.h>

Collaboration diagram for hermes::api::Hermes:

Public Member Functions

 Hermes (SharedMemoryContext context)
 
bool IsApplicationCore ()
 Return true if this rank is an application core, otherwise false. More...
 
bool IsFirstRankOnNode ()
 Returns true if this is the first MPI rank on this node, otherwise false. More...
 
void AppBarrier ()
 A barrier across all application processes. More...
 
int GetProcessRank ()
 Returns the rank of this process. More...
 
int GetNodeId ()
 Return ID of the node this process is running on. More...
 
int GetNumProcesses ()
 Returns the total number of application processes. More...
 
void * GetAppCommunicator ()
 Get an application communicator handle. More...
 
void Finalize (bool force_rpc_shutdown=false)
 Shutdown Hermes. More...
 
void FinalizeClient (bool stop_daemon=true)
 Shutdown application cores. More...
 
void RemoteFinalize ()
 
void RunDaemon ()
 Starts a Hermes daemon. More...
 
bool BucketContainsBlob (const std::string &bucket_name, const std::string &blob_name)
 Check if a given Bucket contains a Blob. More...
 
bool BucketExists (const std::string &bucket_name)
 Returns true if bucket_name exists in this Hermes instance. More...
 

Public Attributes

bool is_initialized
 
hermes::SharedMemoryContext context_
 
hermes::CommunicationContext comm_
 
hermes::RpcContext rpc_
 
hermes::Arena trans_arena_
 
std::string shmem_name_
 
std::string rpc_server_name_
 

Detailed Description

Class representing an instance of a Hermes buffering system.

Constructor & Destructor Documentation

◆ Hermes()

hermes::api::Hermes::Hermes ( SharedMemoryContext  context)
inlineexplicit

Constructor

Member Function Documentation

◆ IsApplicationCore()

bool hermes::api::Hermes::IsApplicationCore ( )

Return true if this rank is an application core, otherwise false.

An application core is a core or rank on which user code runs as opposed to the Hermes core (or rank) which only runs Hermes services.

Returns
true if this rank is an application core, otherwise false.
Here is the caller graph for this function:

◆ IsFirstRankOnNode()

bool hermes::api::Hermes::IsFirstRankOnNode ( )

Returns true if this is the first MPI rank on this node, otherwise false.

Hermes assigns numeric IDs to each rank. The first rank on the node is the lowest ID on that node.

Returns
true if this is the first MPI rank on this node, otherwise false.

◆ AppBarrier()

void hermes::api::Hermes::AppBarrier ( )

A barrier across all application processes.

Like MPI_Barrier but only involves application ranks.

Here is the call graph for this function:

◆ GetProcessRank()

int hermes::api::Hermes::GetProcessRank ( )

Returns the rank of this process.

Hermes assigns each application core a unique rank.

Returns
The rank of this process.

◆ GetNodeId()

int hermes::api::Hermes::GetNodeId ( )

Return ID of the node this process is running on.

Hermes assigns each node a numeric ID.

Returns
The node's ID.

◆ GetNumProcesses()

int hermes::api::Hermes::GetNumProcesses ( )

Returns the total number of application processes.

Does not count Hermes processes.

Returns
The number of application processes.

◆ GetAppCommunicator()

void * hermes::api::Hermes::GetAppCommunicator ( )

Get an application communicator handle.

The handle can be cast to the appropriate type for the communication backend and used in the backend's API calls. For example, when using the MPI communication backend (the default), this function returns a pointer to an MPI_Comm object, which can then be used in any MPI call.

Returns
A void pointer to a communicator handle.
Here is the call graph for this function:

◆ Finalize()

void hermes::api::Hermes::Finalize ( bool  force_rpc_shutdown = false)

Shutdown Hermes.

This should be called by every process (application and Hermes cores) before shutting down the communication backend (e.g., MPI_Finalize).

Parameters
force_rpc_shutdownThis should be true if Hermes was initialized as a daemon.
Here is the call graph for this function:

◆ FinalizeClient()

void hermes::api::Hermes::FinalizeClient ( bool  stop_daemon = true)

Shutdown application cores.

To be called from application cores that were started separately from a Hermes daemon. Normally this is called from adapters.

Parameters
stop_daemonBy default this function will stop the daemon this client is connected to. Passing false here will keep it alive.
Here is the call graph for this function:

◆ RemoteFinalize()

void hermes::api::Hermes::RemoteFinalize ( )
Todo:
Is this still necessary?

◆ RunDaemon()

void hermes::api::Hermes::RunDaemon ( )

Starts a Hermes daemon.

Starts all Hermes services, then waits on the main thread to be finalized.

Precondition
The Hermes instance must be initialized with InitHermesDaemon.
Here is the call graph for this function:

◆ BucketContainsBlob()

bool hermes::api::Hermes::BucketContainsBlob ( const std::string &  bucket_name,
const std::string &  blob_name 
)

Check if a given Bucket contains a Blob.

Parameters
bucket_nameThe name of the Bucket to check.
blob_nameThe name of the Blob to check.
Returns
true if the bucket bucket_name contains the Blob blob_name, otherwise false.
Here is the call graph for this function:

◆ BucketExists()

bool hermes::api::Hermes::BucketExists ( const std::string &  bucket_name)

Returns true if bucket_name exists in this Hermes instance.

Parameters
bucket_nameThe name of the Bucket to check.
Returns
true if bucket_name exists in this Hermes instance, otherwise false.
Here is the call graph for this function:

Member Data Documentation

◆ is_initialized

bool hermes::api::Hermes::is_initialized

true if Hermes is initialized, otherwise false.

◆ context_

hermes::SharedMemoryContext hermes::api::Hermes::context_

shared memory context

◆ comm_

hermes::CommunicationContext hermes::api::Hermes::comm_

communication context

◆ rpc_

hermes::RpcContext hermes::api::Hermes::rpc_

remote procedure call context

◆ trans_arena_

hermes::Arena hermes::api::Hermes::trans_arena_

arena backed by allocated memory.

◆ shmem_name_

std::string hermes::api::Hermes::shmem_name_

The name of the shared memory segment in which all Hermes data is stored.

◆ rpc_server_name_

std::string hermes::api::Hermes::rpc_server_name_

The name of the primary RPC server.


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