From 2245ac0e7e1cf5a7120ba8f473458510903c9f31 Mon Sep 17 00:00:00 2001 From: Ralph Castain Date: Tue, 17 Sep 2013 02:26:46 +0000 Subject: [PATCH] Don't error log the return from setup_pmi as it can indicate that the process wasn't launched via srun or its equivalent. cmr:v1.7.3:reviewer=jladd This commit was SVN r29180. --- opal/mca/db/pmi/db_pmi.c | 17 ++++++++++------- 1 file changed, 10 insertions(+), 7 deletions(-) diff --git a/opal/mca/db/pmi/db_pmi.c b/opal/mca/db/pmi/db_pmi.c index 0a64348f33..998edf888c 100644 --- a/opal/mca/db/pmi/db_pmi.c +++ b/opal/mca/db/pmi/db_pmi.c @@ -112,10 +112,12 @@ static int init(void) { int rc; - if (OPAL_SUCCESS != (rc = setup_pmi())) { - OPAL_ERROR_LOG(rc); - } - + rc = setup_pmi(); + /* don't error log this return status as it + * could just mean we don't have PMI setup + * for this job + */ + return rc; } @@ -577,6 +579,7 @@ static int setup_pmi(void) #if WANT_PMI2_SUPPORT pmi_vallen_max = PMI2_MAX_VALLEN; + max_length = PMI2_MAX_VALLEN; #else rc = PMI_KVS_Get_value_length_max(&pmi_vallen_max); if (PMI_SUCCESS != rc) { @@ -586,7 +589,6 @@ static int setup_pmi(void) opal_errmgr_base_pmi_error(rc))); return OPAL_ERROR; } -#endif if (PMI_SUCCESS != (rc = PMI_KVS_Get_name_length_max(&max_length))) { OPAL_OUTPUT_VERBOSE((1, opal_db_base_framework.framework_output, @@ -595,6 +597,7 @@ static int setup_pmi(void) opal_errmgr_base_pmi_error(rc))); return OPAL_ERROR; } +#endif pmi_kvs_name = (char*)malloc(max_length); if (NULL == pmi_kvs_name) { return OPAL_ERR_OUT_OF_RESOURCE; @@ -607,9 +610,9 @@ static int setup_pmi(void) #endif if (PMI_SUCCESS != rc) { OPAL_OUTPUT_VERBOSE((1, opal_db_base_framework.framework_output, - "db:pmi:pmi_setup failed %s with error %s", + "db:pmi:pmi_setup failed %s with error %s on maxlength %d", "PMI_KVS_Get_my_name", - opal_errmgr_base_pmi_error(rc))); + opal_errmgr_base_pmi_error(rc), max_length)); return OPAL_ERROR; }