HMLP: High-performance Machine Learning Primitives
mpi_prototypes.h
1 #ifndef MPI_PROTOTYPES_H
2 #define MPI_PROTOTYPES_H
3 #ifdef HMLP_USE_MPI
4 
5 #include <mpi.h>
6 #else
7 
8 #warning MPI routines are disable (-HMLP_USE_MPI=false)
9 
14 /* Results of the compare operations. */
15 #define MPI_IDENT 0
16 #define MPI_CONGRUENT 1
17 #define MPI_SIMILAR 2
18 #define MPI_UNEQUAL 3
19 
20 typedef int MPI_Datatype;
21 #define MPI_CHAR ((MPI_Datatype)0x4c000101)
22 #define MPI_SIGNED_CHAR ((MPI_Datatype)0x4c000118)
23 #define MPI_UNSIGNED_CHAR ((MPI_Datatype)0x4c000102)
24 #define MPI_BYTE ((MPI_Datatype)0x4c00010d)
25 #define MPI_WCHAR ((MPI_Datatype)0x4c00040e)
26 #define MPI_SHORT ((MPI_Datatype)0x4c000203)
27 #define MPI_UNSIGNED_SHORT ((MPI_Datatype)0x4c000204)
28 #define MPI_INT ((MPI_Datatype)0x4c000405)
29 #define MPI_UNSIGNED ((MPI_Datatype)0x4c000406)
30 #define MPI_LONG ((MPI_Datatype)0x4c000407)
31 #define MPI_UNSIGNED_LONG ((MPI_Datatype)0x4c000408)
32 #define MPI_FLOAT ((MPI_Datatype)0x4c00040a)
33 #define MPI_DOUBLE ((MPI_Datatype)0x4c00080b)
34 #define MPI_LONG_DOUBLE ((MPI_Datatype)0x4c00080c)
35 #define MPI_LONG_LONG_INT ((MPI_Datatype)0x4c000809)
36 #define MPI_UNSIGNED_LONG_LONG ((MPI_Datatype)0x4c000819)
37 #define MPI_LONG_LONG MPI_LONG_LONG_INT
38 
39 #define MPI_PACKED ((MPI_Datatype)0x4c00010f)
40 #define MPI_LB ((MPI_Datatype)0x4c000010)
41 #define MPI_UB ((MPI_Datatype)0x4c000011)
42 
43 #define MPI_FLOAT_INT ((MPI_Datatype)0x8c000000)
44 #define MPI_DOUBLE_INT ((MPI_Datatype)0x8c000001)
45 #define MPI_LONG_INT ((MPI_Datatype)0x8c000002)
46 #define MPI_SHORT_INT ((MPI_Datatype)0x8c000003)
47 #define MPI_2INT ((MPI_Datatype)0x4c000816)
48 #define MPI_LONG_DOUBLE_INT ((MPI_Datatype)0x8c000004)
49 
50 /* Communicators */
51 typedef int MPI_Comm;
52 #define MPI_COMM_WORLD ((MPI_Comm)0x44000000)
53 #define MPI_COMM_SELF ((MPI_Comm)0x44000001)
54 
55 /* Collective operations */
56 typedef int MPI_Op;
57 #define MPI_MAX (MPI_Op)(0x58000001)
58 #define MPI_MIN (MPI_Op)(0x58000002)
59 #define MPI_SUM (MPI_Op)(0x58000003)
60 #define MPI_PROD (MPI_Op)(0x58000004)
61 #define MPI_LAND (MPI_Op)(0x58000005)
62 #define MPI_BAND (MPI_Op)(0x58000006)
63 #define MPI_LOR (MPI_Op)(0x58000007)
64 #define MPI_BOR (MPI_Op)(0x58000008)
65 #define MPI_LXOR (MPI_Op)(0x58000009)
66 #define MPI_BXOR (MPI_Op)(0x5800000a)
67 #define MPI_MINLOC (MPI_Op)(0x5800000b)
68 #define MPI_MAXLOC (MPI_Op)(0x5800000c)
69 #define MPI_REPLACE (MPI_Op)(0x5800000d)
70 
71 /* Permanent key values */
72 #define MPI_TAG_UB 0x64400001
73 #define MPI_HOST 0x64400003
74 #define MPI_IO 0x64400005
75 #define MPI_WTIME_IS_GLOBAL 0x64400007
76 #define MPI_UNIVERSE_SIZE 0x64400009
77 #define MPI_LASTUSEDCODE 0x6440000b
78 #define MPI_APPNUM 0x6440000d
79 
80 /* The order of these elements must match that in mpif.h */
81 typedef struct MPI_Status {
82  int count;
83  int cancelled;
84  int MPI_SOURCE;
85  int MPI_TAG;
86  int MPI_ERROR;
87 } MPI_Status;
88 #define MPI_STATUS_IGNORE (MPI_Status *)1
89 #define MPI_STATUSES_IGNORE (MPI_Status *)1
90 
91 /* MPI request opjects */
92 typedef int MPI_Request;
93 
94 /* For supported thread levels */
95 #define MPI_THREAD_SINGLE 0
96 #define MPI_THREAD_FUNNELED 1
97 #define MPI_THREAD_SERIALIZED 2
98 #define MPI_THREAD_MULTIPLE 3
99 
101 #define MPI_ANY_SOURCE (-2)
102 #define MPI_ROOT (-3)
103 #define MPI_ANY_TAG (-1)
104 
105 #endif
106 #endif
Definition: mpi_prototypes.h:81