From ba1fa738816e2f4b9380c5b758d8b287037ed4ab Mon Sep 17 00:00:00 2001 From: Lenny Verkhovsky Date: Thu, 3 Jul 2008 13:39:34 +0000 Subject: [PATCH] Selectign Maffinity only if Paffinity selected fix This commit was SVN r18797. --- ompi/runtime/ompi_mpi_init.c | 14 +++++++------- opal/mca/paffinity/base/paffinity_base_service.c | 8 ++++---- 2 files changed, 11 insertions(+), 11 deletions(-) diff --git a/ompi/runtime/ompi_mpi_init.c b/ompi/runtime/ompi_mpi_init.c index 99f5a71a0f..15ddd5d7e3 100644 --- a/ompi/runtime/ompi_mpi_init.c +++ b/ompi/runtime/ompi_mpi_init.c @@ -331,18 +331,18 @@ int ompi_mpi_init(int argc, char **argv, int requested, int *provided) } /* Setup process affinity */ - if (OMPI_SUCCESS != (ret = opal_paffinity_base_slot_list_set((long)ORTE_PROC_MY_NAME->vpid))) { - error = "opal_paffinity_base_slot_list_set: error slot_list assigning"; - goto error; - } else { - /* If we were able to set processor affinity, try setting - up memory affinity */ + if ( OPAL_SUCCESS == (ret = opal_paffinity_base_slot_list_set((long)ORTE_PROC_MY_NAME->vpid))) { + /* If we were able to set processor affinity, try setting up memory affinity */ if (OPAL_SUCCESS == opal_maffinity_base_open() && OPAL_SUCCESS == opal_maffinity_base_select()) { ompi_mpi_maffinity_setup = true; } } - + if ( OPAL_ERROR == ret ){ + error = "opal_paffinity_base_slot_list_set: error slot_list assigning"; + goto error; + } + /* initialize datatypes. This step should be done early as it will * create the local convertor and local arch used in the proc * init. diff --git a/opal/mca/paffinity/base/paffinity_base_service.c b/opal/mca/paffinity/base/paffinity_base_service.c index 9d81282301..145dde895a 100644 --- a/opal/mca/paffinity/base/paffinity_base_service.c +++ b/opal/mca/paffinity/base/paffinity_base_service.c @@ -343,13 +343,13 @@ int opal_paffinity_base_slot_list_set(long rank) if (rc >= 0) { if (OPAL_SUCCESS == mca_base_param_lookup_string(rc, &slot_str)) { if (NULL == slot_str) { - return OPAL_SUCCESS; + return OPAL_ERR_BAD_PARAM; } } - }else{ - return OPAL_SUCCESS; } - + if (0 == strcmp("", slot_str)){ + return OPAL_ERR_BAD_PARAM; + } opal_output_verbose(5, opal_paffinity_base_output, "paffinity slot assignment: slot_list == %s", slot_str); item = opal_argv_split (slot_str, ',');