@@ -309,7 +309,7 @@ typedef struct {
309
309
pmix_info_t _info; \
310
310
size_t _sz; \
311
311
OPAL_OUTPUT_VERBOSE((1, opal_pmix_verbose_output, \
312
- "%s[%s:%d] MODEX RECV VALUE OPTIONAL FOR PROC %s KEY %s", \
312
+ "%s[%s:%d] MODEX RECV VALUE IMMEDIATE FOR PROC %s KEY %s", \
313
313
OPAL_NAME_PRINT(OPAL_PROC_MY_NAME), \
314
314
__FILE__, __LINE__, \
315
315
OPAL_NAME_PRINT(*(p)), (s))); \
@@ -365,6 +365,46 @@ typedef struct {
365
365
} \
366
366
} while(0);
367
367
368
+ /**
369
+ * Provide a simplified macro for retrieving modex data
370
+ * from another process:
371
+ *
372
+ * r - the integer return status from the modex op (int)
373
+ * s - string key (char*)
374
+ * p - pointer to the opal_process_name_t of the proc that posted
375
+ * the data (opal_process_name_t*)
376
+ * d - pointer to a location wherein the data object
377
+ * it to be returned (char**)
378
+ * sz - pointer to a location wherein the number of bytes
379
+ * in the data object can be returned (size_t)
380
+ */
381
+ #define OPAL_MODEX_RECV_STRING_OPTIONAL (r , s , p , d , sz ) \
382
+ do { \
383
+ pmix_proc_t _proc; \
384
+ pmix_value_t *_kv = NULL; \
385
+ pmix_info_t _info; \
386
+ OPAL_OUTPUT_VERBOSE((1, opal_pmix_verbose_output, \
387
+ "%s[%s:%d] MODEX RECV STRING OPTIONAL FOR PROC %s KEY %s", \
388
+ OPAL_NAME_PRINT(OPAL_PROC_MY_NAME), \
389
+ __FILE__, __LINE__, \
390
+ OPAL_NAME_PRINT(*(p)), (s))); \
391
+ *(d) = NULL; \
392
+ *(sz) = 0; \
393
+ OPAL_PMIX_CONVERT_NAME(&_proc, (p)); \
394
+ PMIX_INFO_LOAD(&_info, PMIX_OPTIONAL, NULL, PMIX_BOOL); \
395
+ (r) = PMIx_Get(&(_proc), (s), &(_info), 1, &(_kv)); \
396
+ if (NULL == _kv) { \
397
+ (r) = PMIX_ERR_NOT_FOUND; \
398
+ } else if (PMIX_SUCCESS == (r)) { \
399
+ *(d) = (uint8_t*)_kv->data.bo.bytes; \
400
+ *(sz) = _kv->data.bo.size; \
401
+ _kv->data.bo.bytes = NULL; /* protect the data */ \
402
+ } \
403
+ if (NULL != _kv ) { \
404
+ PMIX_VALUE_RELEASE (_kv ); \
405
+ } \
406
+ } while (0 );
407
+
368
408
/**
369
409
* Provide a simplified macro for retrieving modex data
370
410
* from another process:
0 commit comments