Merge pull request #5080 from ggouaillardet/topic/pmix_legacy_get
odls/base: fix support for PMIx < v2.1
Этот коммит содержится в:
Коммит
36325e7b31
@ -15,7 +15,7 @@
|
|||||||
* All rights reserved.
|
* All rights reserved.
|
||||||
* Copyright (c) 2011-2017 Cisco Systems, Inc. All rights reserved
|
* Copyright (c) 2011-2017 Cisco Systems, Inc. All rights reserved
|
||||||
* Copyright (c) 2013-2018 Intel, Inc. All rights reserved.
|
* Copyright (c) 2013-2018 Intel, Inc. All rights reserved.
|
||||||
* Copyright (c) 2014-2017 Research Organization for Information Science
|
* Copyright (c) 2014-2018 Research Organization for Information Science
|
||||||
* and Technology (RIST). All rights reserved.
|
* and Technology (RIST). All rights reserved.
|
||||||
* Copyright (c) 2017 Mellanox Technologies Ltd. All rights reserved.
|
* Copyright (c) 2017 Mellanox Technologies Ltd. All rights reserved.
|
||||||
* Copyright (c) 2017 IBM Corporation. All rights reserved.
|
* Copyright (c) 2017 IBM Corporation. All rights reserved.
|
||||||
@ -202,6 +202,27 @@ int orte_odls_base_default_get_add_procs_data(opal_buffer_t *buffer,
|
|||||||
wireup = OBJ_NEW(opal_buffer_t);
|
wireup = OBJ_NEW(opal_buffer_t);
|
||||||
/* always include data for mpirun as the daemons can't have it yet */
|
/* always include data for mpirun as the daemons can't have it yet */
|
||||||
val = NULL;
|
val = NULL;
|
||||||
|
if (opal_pmix.legacy_get()) {
|
||||||
|
if (OPAL_SUCCESS != (rc = opal_pmix.get(ORTE_PROC_MY_NAME, OPAL_PMIX_PROC_URI, NULL, &val)) || NULL == val) {
|
||||||
|
ORTE_ERROR_LOG(rc);
|
||||||
|
OBJ_RELEASE(wireup);
|
||||||
|
return rc;
|
||||||
|
} else {
|
||||||
|
/* pack the name of the daemon */
|
||||||
|
if (ORTE_SUCCESS != (rc = opal_dss.pack(wireup, ORTE_PROC_MY_NAME, 1, ORTE_NAME))) {
|
||||||
|
ORTE_ERROR_LOG(rc);
|
||||||
|
OBJ_RELEASE(wireup);
|
||||||
|
return rc;
|
||||||
|
}
|
||||||
|
/* pack the URI */
|
||||||
|
if (ORTE_SUCCESS != (rc = opal_dss.pack(wireup, &val->data.string, 1, OPAL_STRING))) {
|
||||||
|
ORTE_ERROR_LOG(rc);
|
||||||
|
OBJ_RELEASE(wireup);
|
||||||
|
return rc;
|
||||||
|
}
|
||||||
|
OBJ_RELEASE(val);
|
||||||
|
}
|
||||||
|
} else {
|
||||||
if (OPAL_SUCCESS != (rc = opal_pmix.get(ORTE_PROC_MY_NAME, NULL, NULL, &val)) || NULL == val) {
|
if (OPAL_SUCCESS != (rc = opal_pmix.get(ORTE_PROC_MY_NAME, NULL, NULL, &val)) || NULL == val) {
|
||||||
ORTE_ERROR_LOG(rc);
|
ORTE_ERROR_LOG(rc);
|
||||||
OBJ_RELEASE(wireup);
|
OBJ_RELEASE(wireup);
|
||||||
@ -235,6 +256,7 @@ int orte_odls_base_default_get_add_procs_data(opal_buffer_t *buffer,
|
|||||||
OPAL_LIST_RELEASE(modex);
|
OPAL_LIST_RELEASE(modex);
|
||||||
OBJ_RELEASE(val);
|
OBJ_RELEASE(val);
|
||||||
}
|
}
|
||||||
|
}
|
||||||
/* if we didn't rollup the connection info, then we have
|
/* if we didn't rollup the connection info, then we have
|
||||||
* to provide a complete map of connection info */
|
* to provide a complete map of connection info */
|
||||||
if (!orte_static_ports && !orte_fwd_mpirun_port) {
|
if (!orte_static_ports && !orte_fwd_mpirun_port) {
|
||||||
@ -243,6 +265,30 @@ int orte_odls_base_default_get_add_procs_data(opal_buffer_t *buffer,
|
|||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
val = NULL;
|
val = NULL;
|
||||||
|
if (opal_pmix.legacy_get()) {
|
||||||
|
if (OPAL_SUCCESS != (rc = opal_pmix.get(&dmn->name, OPAL_PMIX_PROC_URI, NULL, &val)) || NULL == val) {
|
||||||
|
ORTE_ERROR_LOG(rc);
|
||||||
|
OBJ_RELEASE(buffer);
|
||||||
|
OBJ_RELEASE(wireup);
|
||||||
|
return rc;
|
||||||
|
} else {
|
||||||
|
/* pack the name of the daemon */
|
||||||
|
if (ORTE_SUCCESS != (rc = opal_dss.pack(wireup, &dmn->name, 1, ORTE_NAME))) {
|
||||||
|
ORTE_ERROR_LOG(rc);
|
||||||
|
OBJ_RELEASE(buffer);
|
||||||
|
OBJ_RELEASE(wireup);
|
||||||
|
return rc;
|
||||||
|
}
|
||||||
|
/* pack the URI */
|
||||||
|
if (ORTE_SUCCESS != (rc = opal_dss.pack(wireup, &val->data.string, 1, OPAL_STRING))) {
|
||||||
|
ORTE_ERROR_LOG(rc);
|
||||||
|
OBJ_RELEASE(buffer);
|
||||||
|
OBJ_RELEASE(wireup);
|
||||||
|
return rc;
|
||||||
|
}
|
||||||
|
OBJ_RELEASE(val);
|
||||||
|
}
|
||||||
|
} else {
|
||||||
if (OPAL_SUCCESS != (rc = opal_pmix.get(&dmn->name, NULL, NULL, &val)) || NULL == val) {
|
if (OPAL_SUCCESS != (rc = opal_pmix.get(&dmn->name, NULL, NULL, &val)) || NULL == val) {
|
||||||
ORTE_ERROR_LOG(rc);
|
ORTE_ERROR_LOG(rc);
|
||||||
OBJ_RELEASE(buffer);
|
OBJ_RELEASE(buffer);
|
||||||
@ -281,6 +327,7 @@ int orte_odls_base_default_get_add_procs_data(opal_buffer_t *buffer,
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
/* put it in a byte object for xmission */
|
/* put it in a byte object for xmission */
|
||||||
opal_dss.unload(wireup, (void**)&bo.bytes, &numbytes);
|
opal_dss.unload(wireup, (void**)&bo.bytes, &numbytes);
|
||||||
OBJ_RELEASE(wireup);
|
OBJ_RELEASE(wireup);
|
||||||
|
Загрузка…
x
Ссылка в новой задаче
Block a user