Add some protection against PMIx v4
Ensure we can build against PMIx v3.1.5 Fixes #8089 Signed-off-by: Ralph Castain <rhc@pmix.org>
Этот коммит содержится в:
родитель
0bcef049c9
Коммит
9db78938c4
@ -696,7 +696,11 @@ static int dpm_convert(opal_list_t *infos,
|
|||||||
/* does it conflict? */
|
/* does it conflict? */
|
||||||
if (0 != strncasecmp(ck, directive, strlen(directive))) {
|
if (0 != strncasecmp(ck, directive, strlen(directive))) {
|
||||||
opal_asprintf(&help_str, "Conflicting directives \"%s %s\"", ck, directive);
|
opal_asprintf(&help_str, "Conflicting directives \"%s %s\"", ck, directive);
|
||||||
|
#if PMIX_NUMERIC_VERSION >= 0x00040000
|
||||||
attr = PMIx_Get_attribute_string(option);
|
attr = PMIx_Get_attribute_string(option);
|
||||||
|
#else
|
||||||
|
attr = option;
|
||||||
|
#endif
|
||||||
opal_show_help("help-dpm.txt", "deprecated-fail", true,
|
opal_show_help("help-dpm.txt", "deprecated-fail", true,
|
||||||
infokey, attr, help_str);
|
infokey, attr, help_str);
|
||||||
free(help_str);
|
free(help_str);
|
||||||
@ -723,7 +727,11 @@ static int dpm_convert(opal_list_t *infos,
|
|||||||
if (OMPI_SUCCESS != rc) {
|
if (OMPI_SUCCESS != rc) {
|
||||||
/* we have a conflict */
|
/* we have a conflict */
|
||||||
opal_asprintf(&ptr, " Option %s\n Conflicting modifiers \"%s %s\"", option, infokey, modifier);
|
opal_asprintf(&ptr, " Option %s\n Conflicting modifiers \"%s %s\"", option, infokey, modifier);
|
||||||
|
#if PMIX_NUMERIC_VERSION >= 0x00040000
|
||||||
attr = PMIx_Get_attribute_string(option);
|
attr = PMIx_Get_attribute_string(option);
|
||||||
|
#else
|
||||||
|
attr = option;
|
||||||
|
#endif
|
||||||
opal_show_help("help-dpm.txt", "deprecated-fail", true,
|
opal_show_help("help-dpm.txt", "deprecated-fail", true,
|
||||||
infokey, attr, ptr);
|
infokey, attr, ptr);
|
||||||
free(ptr);
|
free(ptr);
|
||||||
|
@ -668,6 +668,7 @@ int ompi_rte_init(int *pargc, char ***pargv)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#ifdef PMIX_APP_ARGV
|
||||||
/* get our command - defaults to our appnum */
|
/* get our command - defaults to our appnum */
|
||||||
ev1 = NULL;
|
ev1 = NULL;
|
||||||
OPAL_MODEX_RECV_VALUE_OPTIONAL(rc, PMIX_APP_ARGV,
|
OPAL_MODEX_RECV_VALUE_OPTIONAL(rc, PMIX_APP_ARGV,
|
||||||
@ -681,13 +682,21 @@ int ompi_rte_init(int *pargc, char ***pargv)
|
|||||||
opal_process_info.command = opal_argv_join(tmp, ' ');
|
opal_process_info.command = opal_argv_join(tmp, ' ');
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
#else
|
||||||
|
tmp = *pargv;
|
||||||
|
if (NULL != tmp) {
|
||||||
|
opal_process_info.command = opal_argv_join(tmp, ' ');
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#ifdef PMIX_REINCARNATION
|
||||||
/* get our reincarnation number */
|
/* get our reincarnation number */
|
||||||
OPAL_MODEX_RECV_VALUE_OPTIONAL(rc, PMIX_REINCARNATION,
|
OPAL_MODEX_RECV_VALUE_OPTIONAL(rc, PMIX_REINCARNATION,
|
||||||
&OPAL_PROC_MY_NAME, &u32ptr, PMIX_UINT32);
|
&OPAL_PROC_MY_NAME, &u32ptr, PMIX_UINT32);
|
||||||
if (PMIX_SUCCESS == rc) {
|
if (PMIX_SUCCESS == rc) {
|
||||||
opal_process_info.reincarnation = u32;
|
opal_process_info.reincarnation = u32;
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
/* get the number of local peers - required for wireup of
|
/* get the number of local peers - required for wireup of
|
||||||
* shared memory BTL, defaults to local node */
|
* shared memory BTL, defaults to local node */
|
||||||
|
Загрузка…
x
Ссылка в новой задаче
Block a user