diff --git a/opal/mca/paffinity/base/Makefile.am b/opal/mca/paffinity/base/Makefile.am index 2bf2ec72e5..2ee28577e2 100644 --- a/opal/mca/paffinity/base/Makefile.am +++ b/opal/mca/paffinity/base/Makefile.am @@ -26,7 +26,8 @@ libmca_paffinity_base_la_SOURCES = \ $(headers) \ paffinity_base_close.c \ paffinity_base_select.c \ - paffinity_base_open.c + paffinity_base_open.c \ + paffinity_base_wrappers.c # Conditionally install the header files diff --git a/opal/mca/paffinity/base/base.h b/opal/mca/paffinity/base/base.h index 67619d95a3..d648631ef8 100644 --- a/opal/mca/paffinity/base/base.h +++ b/opal/mca/paffinity/base/base.h @@ -101,7 +101,7 @@ extern "C" { * * If no paffinity components were available, or if the * opal_paffinity_base_select() was never invoked, OPAL_NOT_FOUND - * is returned. + * is returned and num_procs is set to -1. */ OMPI_DECLSPEC int opal_paffinity_base_get_num_processors(int *num_procs); @@ -134,9 +134,9 @@ extern "C" { * Get this process' CPU affinitity virtual ID number and assign * it to \em id. * - * * If no paffinity components were available, or if the + * If no paffinity components were available, or if the * opal_paffinity_base_select() was never invoked, OPAL_NOT_FOUND - * is returned. + * is returned and id is set to -1. */ OMPI_DECLSPEC int opal_paffinity_base_get(int *id); diff --git a/opal/mca/paffinity/base/paffinity_base_wrappers.c b/opal/mca/paffinity/base/paffinity_base_wrappers.c index 862cb8f0bb..2ffbe185c2 100644 --- a/opal/mca/paffinity/base/paffinity_base_wrappers.c +++ b/opal/mca/paffinity/base/paffinity_base_wrappers.c @@ -26,9 +26,10 @@ int opal_paffinity_base_get_num_processors(int *num_procs) { if (!opal_paffinity_base_selected) { + *num_procs = -1; return OPAL_ERR_NOT_FOUND; } - return opal_paffinity_base_module->paff_get_num_processors(num_procs); + return opal_paffinity_base_module->paff_module_get_num_processors(num_procs); } @@ -37,14 +38,15 @@ int opal_paffinity_base_set(int id) if (!opal_paffinity_base_selected) { return OPAL_ERR_NOT_FOUND; } - return opal_paffinity_base_module->paff_set(id); + return opal_paffinity_base_module->paff_module_set(id); } int opal_paffinity_base_get(int *id) { if (!opal_paffinity_base_selected) { + *id = -1; return OPAL_ERR_NOT_FOUND; } - return opal_paffinity_base_module->paff_get(id); + return opal_paffinity_base_module->paff_module_get(id); }