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 OMPI_SKIP_MPICXX
35 #define MPICH_SKIP_MPICXX
63 void init(MPI_Comm comm,
int *argc=0,
char ***argv=0);
89 void raw_send(
int target,
const void* data,
int nbyte);
90 void raw_recv(
int sender,
void* data,
int nbyte,
92 void raw_sendt(
int target,
int type,
const void* data,
int nbyte,
94 void raw_recvt(
int sender,
int type,
void* data,
int nbyte,
101 void sum(
double*,
int n,
double*scratch = 0,
int target = -1);
102 void sum(
int*,
int n,
int*scratch = 0,
int target = -1);
105 double*scratch = 0,
int target = -1);
107 unsigned int*scratch = 0,
int target = -1);
109 int*scratch = 0,
int target = -1);
111 char*scratch = 0,
int target = -1);
113 unsigned char*scratch = 0,
int target = -1);
115 signed char*scratch = 0,
int target = -1);
117 short*scratch = 0,
int target = -1);
119 float*scratch = 0,
int target = -1);
121 long*scratch = 0,
int target = -1);
123 void raw_nb_sendt(
int sender,
int type,
124 const void* data,
int nbyte,
127 void raw_nb_recvt(
int sender,
int type,
128 void* data,
int nbyte,
133 void raw_bcast(
void* data,
int nbyte,
int from);
Ref< MessageGrp > split(int grpkey=0, int rankkey=0)
Returns MessageGrp objects that are a subset of this MessageGrp.
static ThreadLock * grplock
lock to access nmpi_grps variable
Definition: messmpi.h:54
bool use_messagegrp_collectives_
If true use the generic collective routines in the base class.
Definition: messmpi.h:48
Definition: message.h:135
A template class that maintains references counts.
Definition: ref.h:361
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:51
void sync()
Synchronize all of the processors.
int n()
Returns the number of processors.
Definition: message.h:192
void init(MPI_Comm comm, int *argc=0, char ***argv=0)
Not thread-safe due to race condition on nmpi_grps variable.
void wait(const MessageHandle &, MessageInfo *info=0)
Wait for an operation to complete.
Definition: message.h:122
The ThreadLock abstract class provides mutex locks to be used in conjunction with ThreadGrp's.
Definition: thread.h:40
The MPIMessageGrp class is an concrete implementation of MessageGrp that uses the MPI 1 library.
Definition: messmpi.h:42
int probet(int sender, int type, MessageInfo *info=0)
Ask if a given typed message has been received.
The MessageGrp abstract class provides a mechanism for moving data and objects between nodes in a par...
Definition: message.h:120
Contains all MPQC code up to version 3.
Definition: mpqcin.h:14
static bool mpi_init_called
Was MPI_Init called by one of MPIMessagrGrp? Will also call MPI_Finalize, if so.
Definition: messmpi.h:56
Ref< MessageGrp > subset(const std::set< int > &)
Returns MessageGrp objects that are a subset of this MessageGrp.
MPI_Comm commgrp
Currently each commgrp is a dup of MPI_COMM_WORLD.
Definition: messmpi.h:60
Generated at Sun Jan 26 2020 23:24:01 for MPQC
3.0.0-alpha using the documentation package Doxygen
1.8.16.