libgrape-lite
A C++ library for parallel graph processing
Loading...
Searching...
No Matches
Public Member Functions | Private Attributes | List of all members
grape::cuda::BatchShuffleMessageManager Class Reference

Public Member Functions

void Init (const grape::CommSpec &comm_spec)
 Initialize message manager.
 
void Start ()
 This function will be called before Init step of applications.
 
void StartARound ()
 This function will be called before each evaluation step of applications.
 
void FinishARound ()
 This function will be called after each evaluation step of applications.
 
void Finalize () const
 This function will be called after the evaluation of applications.
 
template<typename GRAPH_T , typename DATA_T >
void SyncInnerVertices (const GRAPH_T &h_frag, VertexArray< DATA_T, typename GRAPH_T::vid_t > &h_data)
 Synchronize the inner vertices' data of a vertex array to their mirrors. The data_out and data_in are the same vertex array.
 
bool ToTerminate () const
 This function will be called by worker after a step to determine whether evaluation is terminated.
 
size_t GetMsgSize () const
 Get size of messages sent by this message manager instance. The return value is valid only after FinishARound is called. StartARound will reset the value to zero.
 
void ForceContinue ()
 Force continue to evaluate one more round even if all workers stop sending message.
 
Streamstream ()
 
ncclComm_t nccl_comm ()
 
double GetAccumulatedCommTime () const
 

Private Attributes

grape::CommSpec comm_spec_
 
fid_t fid_
 
fid_t fnum_
 
std::shared_ptr< ncclComm_t > nccl_comm_
 
Stream compute_stream_
 
Stream comm_stream_
 
std::vector< thrust::device_vector< char > > shuffle_in_buffers_
 
std::vector< thrust::device_vector< char > > shuffle_out_buffers_
 
Event computation_finished_
 
size_t sent_size_ {}
 
double total_memcpy_time_ {}
 
bool to_terminate_ {}
 

Member Function Documentation

◆ ForceContinue()

void grape::cuda::BatchShuffleMessageManager::ForceContinue ( )
inline

Force continue to evaluate one more round even if all workers stop sending message.

This function can be called by applications.

◆ GetMsgSize()

size_t grape::cuda::BatchShuffleMessageManager::GetMsgSize ( ) const
inline

Get size of messages sent by this message manager instance. The return value is valid only after FinishARound is called. StartARound will reset the value to zero.

Returns
Size of messages sent by this message manager instance.

◆ Init()

void grape::cuda::BatchShuffleMessageManager::Init ( const grape::CommSpec comm_spec)
inline

Initialize message manager.

Parameters
commMPI_Comm object.

◆ SyncInnerVertices()

template<typename GRAPH_T , typename DATA_T >
void grape::cuda::BatchShuffleMessageManager::SyncInnerVertices ( const GRAPH_T &  h_frag,
VertexArray< DATA_T, typename GRAPH_T::vid_t > &  h_data 
)
inline

Synchronize the inner vertices' data of a vertex array to their mirrors. The data_out and data_in are the same vertex array.

Template Parameters
GRAPH_T
DATA_T
Parameters
frag
data

◆ ToTerminate()

bool grape::cuda::BatchShuffleMessageManager::ToTerminate ( ) const
inline

This function will be called by worker after a step to determine whether evaluation is terminated.

Returns
Whether evaluation is terminated.