@@ -64,16 +64,20 @@ extern "C" {
64
64
typedef struct pmix_fabric_s {
65
65
/* user-supplied name for this fabric */
66
66
char * name ;
67
- /* revision - tracks how many times the
68
- * fabric info has been updated. Used to detect
69
- * that a change has occurred since the last
70
- * time the data was accessed. Restricted to
71
- * PMIx-internal use */
72
- uint64_t revision ;
73
- /* PMIx server-defined object for internal use */
67
+ /* communication cost array - the number of vertices
68
+ * (nverts) equals the number of interfaces in the
69
+ * fabric. This equates to the number of columns & rows
70
+ * in the commcost array as the matrix is symmetric */
71
+ uint16_t * * commcost ;
72
+ uint32_t nverts ;
73
+ /* object pointer for use by the PMIx server library */
74
74
void * module ;
75
75
} pmix_fabric_t ;
76
76
77
+ /* convenience macros to support pmix_fabric_t */
78
+ #define PMIX_FABRIC_CONSTRUCT (x ) \
79
+ memset(x, 0, sizeof(pmix_fabric_t))
80
+
77
81
/* Register for access to fabric-related information, including
78
82
* communication cost matrix. This call must be made prior to
79
83
* requesting information from a fabric.
@@ -83,9 +87,9 @@ typedef struct pmix_fabric_s {
83
87
* utilize this field
84
88
*
85
89
* directives - an optional array of values indicating desired
86
- * behaviors and/or fabric to be accessed via
87
- * the returned struct. If NULL, then the highest
88
- * priority available fabric will return the struct
90
+ * behaviors and/or fabric to be accessed. If NULL,
91
+ * then the highest priority available fabric will
92
+ * be used
89
93
*
90
94
* ndirs - number of elements in the directives array
91
95
*
@@ -106,62 +110,9 @@ PMIX_EXPORT pmix_status_t PMIx_server_register_fabric(pmix_fabric_t *fabric,
106
110
*/
107
111
PMIX_EXPORT pmix_status_t PMIx_server_deregister_fabric (pmix_fabric_t * fabric );
108
112
109
- /* Get the number of vertices in the provided fabric.
110
- * To avoid blocking the caller, this function will
111
- * always return immediately, returning a PMIX_ERR_RESOURCE_BUSY
112
- * status if the matrix is in the process of being updated.
113
- *
114
- * fabric - pointer to the pmix_fabric_t struct provided
115
- * to the registration function
116
- *
117
- * nverts - pointer to the location where the number of
118
- * vertices is to be returned
119
- *
120
- * Return values include:
121
- *
122
- * PMIX_SUCCESS - indicates return of a valid value
123
- * PMIX_ERR_RESOURCE_BUSY - matrix is being updated
124
- * PMIX_ERR_FABRIC_UPDATED - fabric info has been updated since
125
- * last call involving this pmix_fabric_t
126
- */
127
- PMIX_EXPORT pmix_status_t PMIx_server_get_num_vertices (pmix_fabric_t * fabric ,
128
- uint32_t * nverts );
129
-
130
- /* Obtain communication cost for messages transmitted from indicated
131
- * source to destination across the provided fabric - i.e.,
132
- * the value of the (src,dest) entry of that fabric's communication
133
- * cost matrix. To avoid blocking the caller, this function will
134
- * always return immediately, returning a PMIX_ERR_RESOURCE_BUSY
135
- * status if the matrix is in the process of being updated.
136
- *
137
- * fabric - pointer to the pmix_fabric_t struct provided to
138
- * the registration function
139
- *
140
- * src - the index of the originating vertex for the communication
141
- *
142
- * dest - the index of the destination vertex for the communication
143
- *
144
- * cost - pointer to the location where the cost is to be returned
145
- *
146
- * Return values include:
147
- *
148
- * PMIX_SUCCESS - indicates return of a valid value
149
- * PMIX_ERR_BAD_PARAM - src and/or dest is out of bounds
150
- * PMIX_ERR_RESOURCE_BUSY - matrix is being updated
151
- * PMIX_ERR_FABRIC_UPDATED - fabric info has been updated since
152
- * last call involving this pmix_fabric_t
153
- */
154
- PMIX_EXPORT pmix_status_t PMIx_server_get_comm_cost (pmix_fabric_t * fabric ,
155
- uint32_t src , uint32_t dest ,
156
- uint16_t * cost );
157
-
158
- /* Given a communication cost matrix index, return the corresponding
159
- * vertex info in the provided fabric and the name of the node upon
113
+ /* Given a communication cost matrix index for a specified fabric,
114
+ * return the corresponding vertex info and the name of the node upon
160
115
* which it resides.
161
- * If the PMIX_ERR_RESOURCE_BUSY or PMIX_ERR_FABRIC_UPDATED status is
162
- * returned, then the caller should update their cost information
163
- * before re-issuing this request to ensure accurate correlation
164
- * between cost and LID
165
116
*
166
117
* fabric - pointer to the pmix_fabric_t struct provided to
167
118
* the registration function
@@ -179,20 +130,14 @@ PMIX_EXPORT pmix_status_t PMIx_server_get_comm_cost(pmix_fabric_t *fabric,
179
130
*
180
131
* PMIX_SUCCESS - indicates return of a valid value
181
132
* PMIX_ERR_BAD_PARAM - provided index is out of bounds
182
- * PMIX_ERR_RESOURCE_BUSY - matrix is being updated
183
- * PMIX_ERR_FABRIC_UPDATED - fabric info has been updated since
184
- * last call involving this pmix_fabric_t
185
133
*/
186
134
PMIX_EXPORT pmix_status_t PMIx_server_get_vertex_info (pmix_fabric_t * fabric ,
187
135
uint32_t i , pmix_value_t * vertex ,
188
136
char * * nodename );
189
137
190
- /* Given vertex info, return the corresponding communication cost matrix
191
- * index and the name of the node upon which it resides.
192
- * If the PMIX_ERR_RESOURCE_BUSY or PMIX_ERR_FABRIC_UPDATED status is
193
- * returned, then the caller should update their cost information
194
- * before re-issuing this request to ensure accurate correlation
195
- * between cost and LID
138
+ /* Given vertex info and the name of the device upon which that
139
+ * vertex resides, return the corresponding communication cost matrix
140
+ * index
196
141
*
197
142
* fabric - pointer to the pmix_fabric_t struct provided to
198
143
* the registration function
@@ -201,10 +146,6 @@ PMIX_EXPORT pmix_status_t PMIx_server_get_vertex_info(pmix_fabric_t *fabric,
201
146
*
202
147
* i - pointer to the location where the index is to be returned
203
148
*
204
- * nodename - pointer to the location where the string nodename
205
- * is to be returned. The caller is responsible for
206
- * releasing the string when done
207
- *
208
149
* Return values include:
209
150
*
210
151
* PMIX_SUCCESS - indicates return of a valid value
@@ -214,8 +155,7 @@ PMIX_EXPORT pmix_status_t PMIx_server_get_vertex_info(pmix_fabric_t *fabric,
214
155
* last call involving this pmix_fabric_t
215
156
*/
216
157
PMIX_EXPORT pmix_status_t PMIx_server_get_index (pmix_fabric_t * fabric ,
217
- pmix_value_t * vertex , uint32_t * i ,
218
- char * * nodename );
158
+ pmix_value_t * vertex , uint32_t * i );
219
159
220
160
#if defined(c_plusplus ) || defined(__cplusplus )
221
161
}
0 commit comments