From 7cc045f9c54ad80378b49e2481e8bc5183b1f788 Mon Sep 17 00:00:00 2001 From: Ralph Castain Date: Wed, 26 Aug 2009 01:58:15 +0000 Subject: [PATCH] Check return codes when init'ing the paffinity framework to avoid segfaulting This commit was SVN r21884. --- opal/runtime/opal_init.c | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/opal/runtime/opal_init.c b/opal/runtime/opal_init.c index aeb0dce9a6..18e6db664b 100644 --- a/opal/runtime/opal_init.c +++ b/opal/runtime/opal_init.c @@ -297,9 +297,15 @@ opal_init(void) } /* open the processor affinity base */ - opal_paffinity_base_open(); - opal_paffinity_base_select(); - + if (OPAL_SUCCESS != (ret = opal_paffinity_base_open())) { + error = "opal_paffinity_base_open"; + goto return_error; + } + if (OPAL_SUCCESS != (ret = opal_paffinity_base_select())) { + error = "opal_paffinity_base_select"; + goto return_error; + } + /* the memcpy component should be one of the first who get * loaded in order to make sure we ddo have all the available * versions of memcpy correctly configured.