g4tools  5.4.0
dummy_mpi.h
Go to the documentation of this file.
1 // Copyright (C) 2010, Guy Barrand. All rights reserved.
2 // See the file tools.license for terms.
3 
4 #ifndef tools_mpi_dummy_mpi_h
5 #define tools_mpi_dummy_mpi_h
6 
7 extern "C" {
8 
12 
13 typedef void* MPI_Comm;
14 typedef void* MPI_Datatype;
15 
16 #define MPI_UNSIGNED 0
17 #define MPI_FLOAT 0
18 #define MPI_DOUBLE 0
19 #define MPI_UNSIGNED_CHAR 0
20 #define MPI_CHAR 0
21 #define MPI_LONG 0
22 #define MPI_SHORT 0
23 #define MPI_INT 0
24 #define MPI_UNSIGNED_LONG 0
25 #define MPI_LONG_LONG 0
26 #define MPI_UNSIGNED_LONG_LONG 0
27 
28 #define MPI_ANY_SOURCE 0
29 
30 #define MPI_SUCCESS 1
31 
32 #ifdef TOOLS_USE_MPI_PACK_NOT_CONST
33 inline int MPI_Pack(void*,int,MPI_Datatype,void*,int,int*,MPI_Comm){return 0;}
34 inline int MPI_Unpack(void*,int,int*,void*,int,MPI_Datatype,MPI_Comm){return 0;}
35 #else
36 inline int MPI_Pack(const void*,int,MPI_Datatype,void*,int,int*,MPI_Comm){return 0;}
37 inline int MPI_Unpack(const void*,int,int*,void*,int,MPI_Datatype,MPI_Comm){return 0;}
38 #endif
39 
43 
44 struct _MPI_Status {
46  int MPI_TAG;
47 };
49 
50 inline int MPI_Probe(int,int,MPI_Comm,MPI_Status*){return 0;}
51 inline int MPI_Get_count(const MPI_Status*,MPI_Datatype,int*){return 0;}
52 inline int MPI_Send(const void*,int,MPI_Datatype,int,int,MPI_Comm){return 0;}
53 inline int MPI_Recv(void*,int,MPI_Datatype,int,int,MPI_Comm,MPI_Status*){return 0;}
54 
58 
59 #define MPI_COMM_WORLD 0
60 #define MPI_MAX_PROCESSOR_NAME 100
61 
62 inline int MPI_Init(int*,char***){return 0;}
63 inline int MPI_Finalize(void){return 0;}
64 inline int MPI_Comm_size(MPI_Comm,int*){return 0;}
65 inline int MPI_Comm_rank(MPI_Comm,int*){return 0;}
66 inline int MPI_Get_processor_name(char*,int*){return 0;}
67 
68 }
69 
70 
71 #endif
MPI_Send
int MPI_Send(const void *, int, MPI_Datatype, int, int, MPI_Comm)
Definition: dummy_mpi.h:52
MPI_Datatype
void * MPI_Datatype
Definition: dummy_mpi.h:14
_MPI_Status::MPI_TAG
int MPI_TAG
Definition: dummy_mpi.h:46
MPI_Comm_size
int MPI_Comm_size(MPI_Comm, int *)
Definition: dummy_mpi.h:64
MPI_Recv
int MPI_Recv(void *, int, MPI_Datatype, int, int, MPI_Comm, MPI_Status *)
Definition: dummy_mpi.h:53
MPI_Pack
int MPI_Pack(const void *, int, MPI_Datatype, void *, int, int *, MPI_Comm)
Definition: dummy_mpi.h:36
_MPI_Status::MPI_SOURCE
int MPI_SOURCE
Definition: dummy_mpi.h:45
_MPI_Status
to pass h2mpi, hs2mpi /////////////////////////////////////
Definition: dummy_mpi.h:44
MPI_Comm_rank
int MPI_Comm_rank(MPI_Comm, int *)
Definition: dummy_mpi.h:65
MPI_Finalize
int MPI_Finalize(void)
Definition: dummy_mpi.h:63
MPI_Comm
void * MPI_Comm
to pass hd2mpi ////////////////////////////////////////////
Definition: dummy_mpi.h:13
MPI_Get_processor_name
int MPI_Get_processor_name(char *, int *)
Definition: dummy_mpi.h:66
MPI_Get_count
int MPI_Get_count(const MPI_Status *, MPI_Datatype, int *)
Definition: dummy_mpi.h:51
MPI_Probe
int MPI_Probe(int, int, MPI_Comm, MPI_Status *)
Definition: dummy_mpi.h:50
MPI_Init
int MPI_Init(int *, char ***)
Definition: dummy_mpi.h:62
MPI_Unpack
int MPI_Unpack(const void *, int, int *, void *, int, MPI_Datatype, MPI_Comm)
Definition: dummy_mpi.h:37
MPI_Status
_MPI_Status MPI_Status
Definition: dummy_mpi.h:48