33#ifndef _util_group_memmtmpi_h
34#define _util_group_memmtmpi_h
37#define MPICH_SKIP_MPICXX
40#include <util/group/message.h>
41#include <util/group/memamsg.h>
42#include <util/group/thread.h>
66 unsigned int *nreq_sent_;
67 unsigned int *nreq_sent_buf_;
69 MTMPIThread **thread_;
74 void init_mtmpimg(MPI_Comm comm,
int nthreads);
77 void retrieve_data(
void *,
int node,
int offset,
int size,
int lock);
78 void replace_data(
void *,
int node,
int offset,
int size,
int unlock);
79 void sum_data(
double *data,
int node,
int doffset,
int dsize);
81 friend class MTMPIThread;
88 MPI_Comm comm = MPI_COMM_WORLD);
void sync()
Synchronizes all the nodes.
void deactivate()
Deactivate is called after the memory has been used.
MTMPIMemoryGrp(const Ref< MessageGrp > &msg, const Ref< ThreadGrp > &th, MPI_Comm comm=MPI_COMM_WORLD)
Construct a MTMPIMemoryGrp given a MessageGrp, ThreadGrp, and an MPI communicator.
void activate()
Activate is called before the memory is to be used.
MTMPIMemoryGrp(const Ref< KeyVal > &)
Construct a MTMPIMemoryGrp given a KeyVal input object.
int size(int node)
Returns the amount of memory residing on node.
Definition memory.h:165
distsize_t offset(int node)
Returns the global offset to node's memory.
Definition memory.h:168
A template class that maintains references counts.
Definition ref.h:332