Cyclops Tensor Framework
parallel arithmetic on multidimensional arrays
CTF_int::CommData Class Reference

#include <common.h>

Public Member Functions

 CommData ()
 
 ~CommData ()
 
 CommData (CommData const &other)
 copy constructor sets created to zero More...
 
CommDataoperator= (CommData const &other)
 
 CommData (MPI_Comm cm)
 create active communicator wrapper More...
 
 CommData (int rank, int color, int np)
 create non-active communicator wrapper More...
 
 CommData (int rank, int color, CommData parent)
 create active subcomm from parent comm which must be active More...
 
void activate (MPI_Comm parent)
 activate this subcommunicator by splitting parent_comm More...
 
void deactivate ()
 
double estimate_bcast_time (int64_t msg_sz)
 
double estimate_allred_time (int64_t msg_sz, MPI_Op op)
 
double estimate_red_time (int64_t msg_sz, MPI_Op op)
 
double estimate_alltoall_time (int64_t chunk_sz)
 
double estimate_alltoallv_time (int64_t tot_sz)
 
void bcast (void *buf, int64_t count, MPI_Datatype mdtype, int root)
 broadcast, same interface as MPI_Bcast, but excluding the comm More...
 
void allred (void *inbuf, void *outbuf, int64_t count, MPI_Datatype mdtype, MPI_Op op)
 allreduce, same interface as MPI_Allreduce, but excluding the comm More...
 
void red (void *inbuf, void *outbuf, int64_t count, MPI_Datatype mdtype, MPI_Op op, int root)
 reduce, same interface as MPI_Reduce, but excluding the comm More...
 
void all_to_allv (void *send_buffer, int64_t const *send_counts, int64_t const *send_displs, int64_t datum_size, void *recv_buffer, int64_t const *recv_counts, int64_t const *recv_displs)
 performs all-to-all-v with 64-bit integer counts and offset on arbitrary length types (datum_size), and uses point-to-point when all-to-all-v sparse More...
 

Data Fields

MPI_Comm cm
 
int np
 
int rank
 
int color
 
int alive
 
int created
 

Detailed Description

Definition at line 127 of file common.h.

Constructor & Destructor Documentation

CTF_int::CommData::CommData ( )

Definition at line 217 of file common.cxx.

CTF_int::CommData::~CommData ( )

Definition at line 222 of file common.cxx.

CTF_int::CommData::CommData ( CommData const &  other)

copy constructor sets created to zero

Definition at line 226 of file common.cxx.

References alive, cm, color, np, ctf.core::np(), rank, and ctf.core::rank().

CTF_int::CommData::CommData ( MPI_Comm  cm)

create active communicator wrapper

Parameters
[in]cmMPI_Comm defining this wrapper

Definition at line 246 of file common.cxx.

References ctf.core::np(), and ctf.core::rank().

CTF_int::CommData::CommData ( int  rank,
int  color,
int  np 
)

create non-active communicator wrapper

Parameters
[in]rankrank within this comm
[in]coloridentifier of comm within parent
[in]npnumber of processors within this comm

Definition at line 254 of file common.cxx.

References ctf.core::np(), and ctf.core::rank().

CTF_int::CommData::CommData ( int  rank,
int  color,
CommData  parent 
)

create active subcomm from parent comm which must be active

Parameters
[in]rankprocessor rank within subcomm
[in]coloridentifier of subcomm within this comm
[in]parentcomm to split

Definition at line 262 of file common.cxx.

References alive, ASSERT, cm, ctf.core::np(), and ctf.core::rank().

Member Function Documentation

void CTF_int::CommData::activate ( MPI_Comm  parent)

activate this subcommunicator by splitting parent_comm

Parameters
[in]parentcommunicator to split

Definition at line 272 of file common.cxx.

References ASSERT, ctf.core::np(), and ctf.core::rank().

Referenced by CTF_int::topology::activate().

void CTF_int::CommData::all_to_allv ( void *  send_buffer,
int64_t const *  send_counts,
int64_t const *  send_displs,
int64_t  datum_size,
void *  recv_buffer,
int64_t const *  recv_counts,
int64_t const *  recv_displs 
)

performs all-to-all-v with 64-bit integer counts and offset on arbitrary length types (datum_size), and uses point-to-point when all-to-all-v sparse

Parameters
[in]send_bufferdata to send
[in]send_countsnumber of datums to send to each process
[in]send_displsdisplacements of datum sets in sen_buffer
[in]datum_sizesize of MPI_datatype to use
[in,out]recv_bufferdata to recv
[in]recv_countsnumber of datums to recv to each process
[in]recv_displsdisplacements of datum sets in sen_buffer

Definition at line 424 of file common.cxx.

References ABORT, CTF_int::cdealloc(), CTF_int::mst_alloc_ptr(), ctf.core::np(), CTF_int::LinModel< nparam >::observe(), ctf.core::rank(), and CTF_int::LinModel< nparam >::should_observe().

Referenced by CTF_int::cyclic_reshuffle(), and CTF_int::wr_pairs_layout().

void CTF_int::CommData::allred ( void *  inbuf,
void *  outbuf,
int64_t  count,
MPI_Datatype  mdtype,
MPI_Op  op 
)

allreduce, same interface as MPI_Allreduce, but excluding the comm

Definition at line 360 of file common.cxx.

References ctf.core::np(), CTF_int::LinModel< nparam >::observe(), and CTF_int::LinModel< nparam >::should_observe().

Referenced by CTF_int::tensor::orient_subworld(), CTF_int::tspsum_replicate::run(), and CTF_int::tsum_replicate::run().

void CTF_int::CommData::deactivate ( )

Definition at line 283 of file common.cxx.

Referenced by CTF_int::topology::deactivate().

double CTF_int::CommData::estimate_allred_time ( int64_t  msg_sz,
MPI_Op  op 
)

Definition at line 300 of file common.cxx.

References CTF_int::LinModel< nparam >::est_time(), and ctf.core::np().

double CTF_int::CommData::estimate_alltoall_time ( int64_t  chunk_sz)

Definition at line 325 of file common.cxx.

References CTF_int::LinModel< nparam >::est_time(), and ctf.core::np().

double CTF_int::CommData::estimate_alltoallv_time ( int64_t  tot_sz)

Definition at line 330 of file common.cxx.

References CTF_int::LinModel< nparam >::est_time(), and ctf.core::np().

double CTF_int::CommData::estimate_red_time ( int64_t  msg_sz,
MPI_Op  op 
)
CommData & CTF_int::CommData::operator= ( CommData const &  other)

Definition at line 235 of file common.cxx.

References alive, cm, color, np, ctf.core::np(), rank, and ctf.core::rank().

void CTF_int::CommData::red ( void *  inbuf,
void *  outbuf,
int64_t  count,
MPI_Datatype  mdtype,
MPI_Op  op,
int  root 
)

Field Documentation

int CTF_int::CommData::alive

Definition at line 133 of file common.h.

Referenced by CommData(), and operator=().

int CTF_int::CommData::color

Definition at line 132 of file common.h.

Referenced by CommData(), and operator=().

int CTF_int::CommData::created

Definition at line 134 of file common.h.


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