OpenMPI 0.1.1

- Main Page
- Related Pages
- Modules
- Data Structures
- Files

- File List
- Globals

mtl_mx_types.h
1 /*
2 * Copyright (c) 2004-2006 The Trustees of Indiana University and Indiana
3 * University Research and Technology
4 * Corporation. All rights reserved.
5 * Copyright (c) 2004-2007 The University of Tennessee and The University
6 * of Tennessee Research Foundation. All rights
7 * reserved.
8 * Copyright (c) 2004-2005 High Performance Computing Center Stuttgart,
9 * University of Stuttgart. All rights reserved.
10 * Copyright (c) 2004-2006 The Regents of the University of California.
11 * All rights reserved.
12 * Copyright (c) 2010 Cisco Systems, Inc. All rights reserved.
13 * $COPYRIGHT$
14 *
15 * Additional copyrights may follow
16 *
17 * $HEADER$
18 */
19
20 #ifndef MTL_MX_TYPES_H_HAS_BEEN_INCLUDED
21 #define MTL_MX_TYPES_H_HAS_BEEN_INCLUDED
22
23 #include "ompi_config.h"
24 #include "mtl_mx.h"
25
26 #include "ompi/mca/mtl/mtl.h"
27 #include "ompi/mca/mtl/base/base.h"
28 #include "mtl_mx_endpoint.h"
29
30 #include "myriexpress.h"
31
32
33 BEGIN_C_DECLS
34
35 /**
36 * MTL Module Interface
37 */
38 struct mca_mtl_mx_module_t {
39 mca_mtl_base_module_t super; /**< base MTL interface */
40 int32_t mx_unexp_queue_max; /**< maximium size of the MX unexpected message queue */
41 int32_t mx_filter; /**< user assigned value used to filter incomming messages */
42 int32_t mx_timeout;
43 int32_t mx_retries;
44 int32_t mx_support_sharedmem;
45 int mx_board_num;
46 int mx_endpoint_num;
47 mx_endpoint_t mx_endpoint; /**< mx data structure for local endpoint */
48 mx_endpoint_addr_t mx_endpoint_addr; /**< mx data structure for local endpoint address */
49 mca_mtl_mx_addr_t mx_addr;
50 };
51 typedef struct mca_mtl_mx_module_t mca_mtl_mx_module_t;
52
53 extern mca_mtl_mx_module_t ompi_mtl_mx;
54
55 struct mca_mtl_mx_component_t{
56 mca_mtl_base_component_2_0_0_t super; /**< base MTL component */
57 };
58 typedef struct mca_mtl_mx_component_t mca_mtl_mx_component_t;
59
60 OMPI_MODULE_DECLSPEC extern mca_mtl_mx_component_t mca_mtl_mx_component;
61
62
63 /* match/ignore bit manipulation
64 *
65 * 01234567 01234567 01234567 01234567 01234567 01234567 01234567 01234567
66 * | |
67 * context id | source | message tag
68 * | |
69 */
70
71 #define MX_SOURCE_MASK 0x0000FFFF00000000ULL
72 #define MX_TAG_MASK 0x00000000FFFFFFFFULL
73
74 #define MX_SOURCE_IGNR ~MX_SOURCE_MASK
75 /* we need to keep top bit (sign bit) of the tag
76 collectives use this to distinguish the message */
77 #define MX_TAG_IGNR 0xFFFFFFFF80000000ULL
78
79 /* get the tag from the bits */
80 #define MX_GET_TAG(match_bits, tag) \
81 { \
82 tag = (int) (match_bits & MX_TAG_MASK); \
83 }
84
85
86 /* get the tag from the bits */
87 #define MX_GET_SRC(match_bits, src) \
88 { \
89 src = (int) ((match_bits & MX_SOURCE_MASK) >> 32); \
90 }
91
92 /* send posting */
93 #define MX_SET_SEND_BITS(match_bits, contextid, source, tag) \
94 { \
95 match_bits = contextid; \
96 match_bits = (match_bits << 16); \
97 match_bits |= source; \
98 match_bits = (match_bits << 32); \
99 match_bits |= (MX_TAG_MASK & tag); \
100 }
101
102 /* receive posting */
103 #define MX_SET_RECV_BITS(match_bits, mask_bits, contextid, source, tag) \
104 { \
105 match_bits = contextid; \
106 match_bits = (match_bits << 16); \
107 \
108 if (MPI_ANY_SOURCE == source) { \
109 mask_bits = MX_SOURCE_IGNR; \
110 } else { \
111 mask_bits = ~0; \
112 match_bits |= source; \
113 } \
114 match_bits = (match_bits << 32); \
115 \
116 if (MPI_ANY_TAG == tag) { \
117 mask_bits &= MX_TAG_IGNR; \
118 } else { \
119 match_bits |= (MX_TAG_MASK & tag); \
120 } \
121 }
122
123
124
125 END_C_DECLS
126
127 #endif /* MTL_MX_TYPES_H_HAS_BEEN_INCLUDED */
128
mca_mtl_mx_module_t::super
mca_mtl_base_module_t super
base MTL interface
Definition: mtl_mx_types.h:39
mca_mtl_base_component_2_0_0_t
Definition: mtl.h:93
myriexpress.h
Macros to help interaction between hwloc and Myrinet Express.
mca_mtl_mx_module_t
MTL Module Interface.
Definition: mtl_mx_types.h:38
mca_mtl_mx_module_t::mx_filter
int32_t mx_filter
user assigned value used to filter incomming messages
Definition: mtl_mx_types.h:41
mca_mtl_mx_component_t::super
mca_mtl_base_component_2_0_0_t super
base MTL component
Definition: mtl_mx_types.h:56
mca_mtl_mx_addr_t
Structure used to publish MX information to peers.
Definition: mtl_mx_endpoint.h:37
mtl.h
Matching Transport Layer.
mca_mtl_mx_module_t::mx_unexp_queue_max
int32_t mx_unexp_queue_max
maximium size of the MX unexpected message queue
Definition: mtl_mx_types.h:40
mca_mtl_mx_component_t
Definition: mtl_mx_types.h:55
mca_mtl_base_module_t
MTL module interface functions and attributes.
Definition: mtl.h:399
mca_mtl_mx_module_t::mx_endpoint
mx_endpoint_t mx_endpoint
mx data structure for local endpoint
Definition: mtl_mx_types.h:47
mca_mtl_mx_module_t::mx_endpoint_addr
mx_endpoint_addr_t mx_endpoint_addr
mx data structure for local endpoint address
Definition: mtl_mx_types.h:48