update PMI RTE component to adapt to ORTE changes
This commit was SVN r28885.
Этот коммит содержится в:
родитель
d984d25da3
Коммит
5bfd980968
@ -82,6 +82,7 @@ struct ompi_process_info_t {
|
|||||||
pid_t pid;
|
pid_t pid;
|
||||||
ompi_vpid_t num_procs;
|
ompi_vpid_t num_procs;
|
||||||
ompi_local_rank_t my_local_rank;
|
ompi_local_rank_t my_local_rank;
|
||||||
|
ompi_node_rank_t my_node_rank;
|
||||||
ompi_node_rank_t num_local_peers;
|
ompi_node_rank_t num_local_peers;
|
||||||
char *my_hnp_uri;
|
char *my_hnp_uri;
|
||||||
int peer_modex;
|
int peer_modex;
|
||||||
|
@ -13,7 +13,7 @@
|
|||||||
|
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
#include <pmi.h>
|
#include <pmi.h>
|
||||||
#if WANT_CRAY_PMI2_EXT
|
#if WANT_PMI2_SUPPORT
|
||||||
#include <pmi2.h>
|
#include <pmi2.h>
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
@ -15,7 +15,7 @@
|
|||||||
#include <unistd.h>
|
#include <unistd.h>
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
#include <pmi.h>
|
#include <pmi.h>
|
||||||
#if WANT_CRAY_PMI2_EXT
|
#if WANT_PMI2_SUPPORT
|
||||||
#include <pmi2.h>
|
#include <pmi2.h>
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
@ -72,7 +72,7 @@ ompi_rte_init(int *argc, char ***argv)
|
|||||||
hwloc_cpuset_t boundset, rootset;
|
hwloc_cpuset_t boundset, rootset;
|
||||||
char *tmp_str;
|
char *tmp_str;
|
||||||
|
|
||||||
#if WANT_CRAY_PMI2_EXT
|
#if WANT_PMI2_SUPPORT
|
||||||
{
|
{
|
||||||
int spawned, appnum;
|
int spawned, appnum;
|
||||||
|
|
||||||
@ -120,6 +120,7 @@ ompi_rte_init(int *argc, char ***argv)
|
|||||||
for (i = 0 ; i < ompi_process_info.num_local_peers ; ++i) {
|
for (i = 0 ; i < ompi_process_info.num_local_peers ; ++i) {
|
||||||
if (rank == node_ranks[i]) {
|
if (rank == node_ranks[i]) {
|
||||||
ompi_process_info.my_local_rank = i;
|
ompi_process_info.my_local_rank = i;
|
||||||
|
ompi_process_info.my_node_rank = i;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -13,7 +13,7 @@
|
|||||||
|
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
#include <pmi.h>
|
#include <pmi.h>
|
||||||
#if WANT_CRAY_PMI2_EXT
|
#if WANT_PMI2_SUPPORT
|
||||||
#include <pmi2.h>
|
#include <pmi2.h>
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
@ -64,7 +64,7 @@ OBJ_CLASS_INSTANCE(local_data_t,
|
|||||||
*/
|
*/
|
||||||
static int kvs_put(const char *key, const char *value)
|
static int kvs_put(const char *key, const char *value)
|
||||||
{
|
{
|
||||||
#if WANT_CRAY_PMI2_EXT
|
#if WANT_PMI2_SUPPORT
|
||||||
return PMI2_KVS_Put(key, value);
|
return PMI2_KVS_Put(key, value);
|
||||||
#else
|
#else
|
||||||
return PMI_KVS_Put(pmi_kvs_name, key, value);
|
return PMI_KVS_Put(pmi_kvs_name, key, value);
|
||||||
@ -73,7 +73,7 @@ static int kvs_put(const char *key, const char *value)
|
|||||||
|
|
||||||
static int kvs_get(const char *key, char *value, int valuelen)
|
static int kvs_get(const char *key, char *value, int valuelen)
|
||||||
{
|
{
|
||||||
#if WANT_CRAY_PMI2_EXT
|
#if WANT_PMI2_SUPPORT
|
||||||
int len;
|
int len;
|
||||||
|
|
||||||
return PMI2_KVS_Get(pmi_kvs_name, PMI2_ID_NULL, key, value, valuelen, &len);
|
return PMI2_KVS_Get(pmi_kvs_name, PMI2_ID_NULL, key, value, valuelen, &len);
|
||||||
@ -87,7 +87,7 @@ static int setup_pmi(void)
|
|||||||
{
|
{
|
||||||
int max_length, rc;
|
int max_length, rc;
|
||||||
|
|
||||||
#if WANT_CRAY_PMI2_EXT
|
#if WANT_PMI2_SUPPORT
|
||||||
pmi_vallen_max = PMI2_MAX_VALLEN;
|
pmi_vallen_max = PMI2_MAX_VALLEN;
|
||||||
#else
|
#else
|
||||||
rc = PMI_KVS_Get_value_length_max(&pmi_vallen_max);
|
rc = PMI_KVS_Get_value_length_max(&pmi_vallen_max);
|
||||||
@ -96,7 +96,7 @@ static int setup_pmi(void)
|
|||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if WANT_CRAY_PMI2_EXT
|
#if WANT_PMI2_SUPPORT
|
||||||
/* TODO -- is this ok */
|
/* TODO -- is this ok */
|
||||||
max_length = 1024;
|
max_length = 1024;
|
||||||
#else
|
#else
|
||||||
@ -109,7 +109,7 @@ static int setup_pmi(void)
|
|||||||
return OMPI_ERR_OUT_OF_RESOURCE;
|
return OMPI_ERR_OUT_OF_RESOURCE;
|
||||||
}
|
}
|
||||||
|
|
||||||
#if WANT_CRAY_PMI2_EXT
|
#if WANT_PMI2_SUPPORT
|
||||||
rc = PMI2_Job_GetId(pmi_kvs_name, max_length);
|
rc = PMI2_Job_GetId(pmi_kvs_name, max_length);
|
||||||
#else
|
#else
|
||||||
rc = PMI_KVS_Get_my_name(pmi_kvs_name,max_length);
|
rc = PMI_KVS_Get_my_name(pmi_kvs_name,max_length);
|
||||||
@ -118,7 +118,7 @@ static int setup_pmi(void)
|
|||||||
return OMPI_ERROR;
|
return OMPI_ERROR;
|
||||||
}
|
}
|
||||||
|
|
||||||
#if WANT_CRAY_PMI2_EXT
|
#if WANT_PMI2_SUPPORT
|
||||||
pmi_keylen_max = PMI2_MAX_KEYLEN;
|
pmi_keylen_max = PMI2_MAX_KEYLEN;
|
||||||
#else
|
#else
|
||||||
if (PMI_SUCCESS != (rc = PMI_KVS_Get_key_length_max(&pmi_keylen_max))) {
|
if (PMI_SUCCESS != (rc = PMI_KVS_Get_key_length_max(&pmi_keylen_max))) {
|
||||||
|
@ -14,7 +14,7 @@
|
|||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
#include <stdarg.h>
|
#include <stdarg.h>
|
||||||
#include <pmi.h>
|
#include <pmi.h>
|
||||||
#if WANT_CRAY_PMI2_EXT
|
#if WANT_PMI2_SUPPORT
|
||||||
#include <pmi2.h>
|
#include <pmi2.h>
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
@ -13,7 +13,7 @@
|
|||||||
|
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
#include <pmi.h>
|
#include <pmi.h>
|
||||||
#if WANT_CRAY_PMI2_EXT
|
#if WANT_PMI2_SUPPORT
|
||||||
#include <pmi2.h>
|
#include <pmi2.h>
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
Загрузка…
x
Ссылка в новой задаче
Block a user