28 #ifndef _util_group_messmpi_h 29 #define _util_group_messmpi_h 31 #include <util/group/message.h> 32 #include <util/group/thread.h> 34 #define MPICH_SKIP_MPICXX 63 void init(MPI_Comm comm,
int *argc=0,
char ***argv=0);
80 void raw_send(
int target,
const void* data,
int nbyte);
81 void raw_recv(
int sender,
void* data,
int nbyte);
82 void raw_sendt(
int target,
int type,
const void* data,
int nbyte);
83 void raw_recvt(
int type,
void* data,
int nbyte);
89 void sum(
double*,
int n,
double*scratch = 0,
int target = -1);
90 void sum(
int*,
int n,
int*scratch = 0,
int target = -1);
93 double*scratch = 0,
int target = -1);
95 unsigned int*scratch = 0,
int target = -1);
97 int*scratch = 0,
int target = -1);
99 char*scratch = 0,
int target = -1);
101 unsigned char*scratch = 0,
int target = -1);
103 signed char*scratch = 0,
int target = -1);
105 short*scratch = 0,
int target = -1);
107 float*scratch = 0,
int target = -1);
109 long*scratch = 0,
int target = -1);
111 void raw_bcast(
void* data,
int nbyte,
int from);
The MessageGrp abstract class provides a mechanism for moving data and objects between nodes in a par...
Definition: message.h:109
static Ref< ThreadLock > grplock
lock to access nmpi_grps variable
Definition: messmpi.h:56
bool use_messagegrp_collectives_
If true use the generic collective routines in the base class.
Definition: messmpi.h:51
MPI_Comm commgrp
Currently each commgrp is a dup of MPI_COMM_WORLD.
Definition: messmpi.h:60
The MPIMessageGrp class is an concrete implementation of MessageGrp that uses the MPI 1 library...
Definition: messmpi.h:41
int probet(int type)
Ask if a given typed message has been received.
int n()
Returns the number of processors.
Definition: message.h:136
A template class that maintains references counts.
Definition: ref.h:332
void sum(double *, int n, double *scratch=0, int target=-1)
Global sum reduction.
void sync()
Synchronize all of the processors.
void init(MPI_Comm comm, int *argc=0, char ***argv=0)
Not thread-safe due to race condition on nmpi_grps variable.
void reduce(double *, int n, GrpReduce< double > &, double *scratch=0, int target=-1)
Global generic reduction.
static int nmpi_grps
Number of MPIMessageGrp's currently in use.
Definition: messmpi.h:54
Ref< MessageGrp > clone(void)
Clones (dups) an MPIMessageGrp from MPI_COMM_WORLD.