1
1
Restrict the search to the "immediate" range so at worst we check with
our local server and don't go up to the host daemon.

Signed-off-by: Ralph Castain <rhc@pmix.org>
Этот коммит содержится в:
Ralph Castain 2020-02-27 18:15:34 -08:00
родитель 0054de0de7
Коммит 9e2db26732
Не найден ключ, соответствующий данной подписи
Идентификатор ключа GPG: B63B630167D26BB5
4 изменённых файлов: 82 добавлений и 7 удалений

Просмотреть файл

@ -206,8 +206,8 @@ static int init_vader_endpoint (struct mca_btl_base_endpoint_t *ep, struct opal_
ep->peer_smp_rank = remote_rank;
if (remote_rank != MCA_BTL_VADER_LOCAL_RANK) {
OPAL_MODEX_RECV(rc, &component->super.btl_version,
&proc->proc_name, (void **) &modex, &msg_size);
OPAL_MODEX_RECV_IMMEDIATE(rc, &component->super.btl_version,
&proc->proc_name, (void **) &modex, &msg_size);
if (OPAL_SUCCESS != rc) {
return rc;
}

Просмотреть файл

@ -274,6 +274,7 @@ typedef struct {
OPAL_PMIX_CONVERT_NAME(&_proc, (p)); \
PMIX_INFO_LOAD(&_info, PMIX_OPTIONAL, NULL, PMIX_BOOL); \
(r) = PMIx_Get(&(_proc), (s), &(_info), 1, &(_kv)); \
PMIX_INFO_DESTRUCT(&_info); \
if (NULL == _kv) { \
(r) = PMIX_ERR_NOT_FOUND; \
} else if (_kv->type != (t)) { \
@ -301,8 +302,8 @@ typedef struct {
* is to be returned
* t - the expected data type
*/
#define OPAL_MODEX_RECV_VALUE_IMMEDIATE(r, s, p, d, t) \
do { \
#define OPAL_MODEX_RECV_VALUE_IMMEDIATE(r, s, p, d, t) \
do { \
pmix_proc_t _proc; \
pmix_value_t *_kv = NULL; \
pmix_info_t _info; \
@ -315,6 +316,7 @@ typedef struct {
OPAL_PMIX_CONVERT_NAME(&_proc, (p)); \
PMIX_INFO_LOAD(&_info, PMIX_IMMEDIATE, NULL, PMIX_BOOL); \
(r) = PMIx_Get(&(_proc), (s), &(_info), 1, &(_kv)); \
PMIX_INFO_DESTRUCT(&_info); \
if (NULL == _kv) { \
(r) = PMIX_ERR_NOT_FOUND; \
} else if (_kv->type != (t)) { \
@ -349,7 +351,7 @@ typedef struct {
OPAL_NAME_PRINT(OPAL_PROC_MY_NAME), \
__FILE__, __LINE__, \
OPAL_NAME_PRINT(*(p)), (s))); \
OPAL_PMIX_CONVERT_NAME(&_proc, (p)); \
OPAL_PMIX_CONVERT_NAME(&_proc, (p)); \
(r) = PMIx_Get(&(_proc), (s), NULL, 0, &(_kv)); \
if (NULL == _kv) { \
(r) = PMIX_ERR_NOT_FOUND; \
@ -401,6 +403,47 @@ typedef struct {
} \
} while(0);
/**
* Provide a simplified macro for retrieving modex data
* from another process:
*
* r - the integer return status from the modex op (int)
* s - string key (char*)
* p - pointer to the opal_process_name_t of the proc that posted
* the data (opal_process_name_t*)
* d - pointer to a location wherein the data object
* it to be returned (char**)
* sz - pointer to a location wherein the number of bytes
* in the data object can be returned (size_t)
*/
#define OPAL_MODEX_RECV_STRING_IMMEDIATE(r, s, p, d, sz) \
do { \
pmix_proc_t _proc; \
pmix_value_t *_kv = NULL; \
pmix_info_t _info; \
OPAL_OUTPUT_VERBOSE((1, opal_pmix_verbose_output, \
"%s[%s:%d] MODEX RECV STRING FOR PROC %s KEY %s", \
OPAL_NAME_PRINT(OPAL_PROC_MY_NAME), \
__FILE__, __LINE__, \
OPAL_NAME_PRINT(*(p)), (s))); \
*(d) = NULL; \
*(sz) = 0; \
OPAL_PMIX_CONVERT_NAME(&_proc, (p)); \
PMIX_INFO_LOAD(&_info, PMIX_IMMEDIATE, NULL, PMIX_BOOL); \
(r) = PMIx_Get(&(_proc), (s), &_info, 1, &(_kv)); \
PMIX_INFO_DESTRUCT(&_info); \
if (NULL == _kv) { \
(r) = PMIX_ERR_NOT_FOUND; \
} else if (PMIX_SUCCESS == (r)) { \
*(d) = (uint8_t*)_kv->data.bo.bytes; \
*(sz) = _kv->data.bo.size; \
_kv->data.bo.bytes = NULL; /* protect the data */ \
} \
if (NULL != _kv) { \
PMIX_VALUE_RELEASE(_kv); \
} \
} while(0);
/**
* Provide a simplified macro for retrieving modex data
* from another process:
@ -432,6 +475,38 @@ typedef struct {
} \
} while(0);
/**
* Provide a simplified macro for retrieving modex data
* from another process:
*
* r - the integer return status from the modex op (int)
* s - the MCA component that posted the data (mca_base_component_t*)
* p - pointer to the opal_process_name_t of the proc that posted
* the data (opal_process_name_t*)
* d - pointer to a location wherein the data object
* it to be returned (char**)
* sz - pointer to a location wherein the number of bytes
* in the data object can be returned (size_t)
*/
#define OPAL_MODEX_RECV_IMMEDIATE(r, s, p, d, sz) \
do { \
char *_key; \
_key = mca_base_component_to_string((s)); \
OPAL_OUTPUT_VERBOSE((1, opal_pmix_verbose_output, \
"%s[%s:%d] MODEX RECV FOR PROC %s KEY %s", \
OPAL_NAME_PRINT(OPAL_PROC_MY_NAME), \
__FILE__, __LINE__, \
OPAL_NAME_PRINT(*(p)), _key)); \
if (NULL == _key) { \
OPAL_ERROR_LOG(OPAL_ERR_OUT_OF_RESOURCE); \
(r) = OPAL_ERR_OUT_OF_RESOURCE; \
} else { \
OPAL_MODEX_RECV_STRING_IMMEDIATE((r), _key, (p), (d), (sz)); \
free(_key); \
} \
} while(0);
#define PMIX_ERROR_LOG(r) \
opal_output(0, "[%s:%d] PMIx Error: %s", __FILE__, __LINE__, PMIx_Error_string((r)))

@ -1 +1 @@
Subproject commit 683bfacffcfa7ddfd6b392d076b6672a6428513b
Subproject commit 73f93ceadc87ea4476491c96b320d5dff9e076d6

2
prrte

@ -1 +1 @@
Subproject commit e182f916c4164db40b285c261bd1341112ae455f
Subproject commit fcc3bedd33187f3416c74b7c4c7470f94049e558