Change the ordering -- gotta initialize the cset before we can examine it!
This commit was SVN r23916.
Этот коммит содержится в:
родитель
5b0ffb7d1e
Коммит
26d28ea2a4
@ -83,6 +83,12 @@ static int fill_current_binding(char str[OMPI_AFFINITY_STRING_MAX])
|
|||||||
int ret, flag;
|
int ret, flag;
|
||||||
opal_paffinity_base_cpu_set_t cset;
|
opal_paffinity_base_cpu_set_t cset;
|
||||||
|
|
||||||
|
/* Get our binding */
|
||||||
|
ret = opal_paffinity_base_get(&cset);
|
||||||
|
if (OPAL_SUCCESS != ret) {
|
||||||
|
return ret;
|
||||||
|
}
|
||||||
|
|
||||||
/* Are we bound anywhere? */
|
/* Are we bound anywhere? */
|
||||||
OPAL_PAFFINITY_PROCESS_IS_BOUND(cset, &flag);
|
OPAL_PAFFINITY_PROCESS_IS_BOUND(cset, &flag);
|
||||||
if (!flag) {
|
if (!flag) {
|
||||||
@ -91,11 +97,6 @@ static int fill_current_binding(char str[OMPI_AFFINITY_STRING_MAX])
|
|||||||
return OPAL_SUCCESS;
|
return OPAL_SUCCESS;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Get our binding */
|
|
||||||
ret = opal_paffinity_base_get(&cset);
|
|
||||||
if (OPAL_SUCCESS != ret) {
|
|
||||||
return ret;
|
|
||||||
}
|
|
||||||
return opal_paffinity_base_cset2str(str, OMPI_AFFINITY_STRING_MAX, &cset);
|
return opal_paffinity_base_cset2str(str, OMPI_AFFINITY_STRING_MAX, &cset);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Загрузка…
x
Ссылка в новой задаче
Block a user