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);
bool use_messagegrp_collectives_
If true use the generic collective routines in the base class.
Definition: messmpi.h:51
A template class that maintains references counts.
Definition: ref.h:332
Ref< MessageGrp > clone(void)
Clones (dups) an MPIMessageGrp from MPI_COMM_WORLD.
static int nmpi_grps
Number of MPIMessageGrp's currently in use.
Definition: messmpi.h:54
void sync()
Synchronize all of the processors.
int n()
Returns the number of processors.
Definition: message.h:136
void init(MPI_Comm comm, int *argc=0, char ***argv=0)
Not thread-safe due to race condition on nmpi_grps variable.
void sum(double *, int n, double *scratch=0, int target=-1)
Global sum reduction.
The MPIMessageGrp class is an concrete implementation of MessageGrp that uses the MPI 1 library.
Definition: messmpi.h:41
static Ref< ThreadLock > grplock
lock to access nmpi_grps variable
Definition: messmpi.h:56
int probet(int type)
Ask if a given typed message has been received.
void reduce(double *, int n, GrpReduce< double > &, double *scratch=0, int target=-1)
Global generic reduction.
The MessageGrp abstract class provides a mechanism for moving data and objects between nodes in a par...
Definition: message.h:109
MPI_Comm commgrp
Currently each commgrp is a dup of MPI_COMM_WORLD.
Definition: messmpi.h:60
Generated at Sun Jan 26 2020 23:33:04 for MPQC
2.3.1 using the documentation package Doxygen
1.8.16.