1
1

In a recent v1.5 branch issue, it took a while to figure out that

paffinity hwloc was returning "NOT_SUPPORTED" when the real problem
was that the underlying hwloc simply hadn't been initialized yet.  So
let's clearly delineate this case: return OPAL_ERR_NOT_INITIALIZED if
the underlying hwloc is not initialized.

This commit was SVN r25902.
Этот коммит содержится в:
Jeff Squyres 2012-02-10 18:29:52 +00:00
родитель 8d0bc199df
Коммит 63a96e92b5
4 изменённых файлов: 27 добавлений и 15 удалений

Просмотреть файл

@ -9,7 +9,7 @@
* University of Stuttgart. All rights reserved.
* Copyright (c) 2004-2005 The Regents of the University of California.
* All rights reserved.
* Copyright (c) 2010 Cisco Systems, Inc. All rights reserved.
* Copyright (c) 2010-2012 Cisco Systems, Inc. All rights reserved.
* $COPYRIGHT$
*
* Additional copyrights may follow
@ -69,7 +69,8 @@ enum {
OPAL_ERR_MULTIPLE_AFFINITIES = (OPAL_ERR_BASE - 40),
OPAL_ERR_SLOT_LIST_RANGE = (OPAL_ERR_BASE - 41),
OPAL_ERR_NETWORK_NOT_PARSEABLE = (OPAL_ERR_BASE - 42),
OPAL_ERR_SILENT = (OPAL_ERR_BASE - 43)
OPAL_ERR_SILENT = (OPAL_ERR_BASE - 43),
OPAL_ERR_NOT_INITIALIZED = (OPAL_ERR_BASE - 44)
};
#define OPAL_ERR_MAX (OPAL_ERR_BASE - 100)

Просмотреть файл

@ -9,7 +9,7 @@
* University of Stuttgart. All rights reserved.
* Copyright (c) 2004-2005 The Regents of the University of California.
* All rights reserved.
* Copyright (c) 2006-2010 Cisco Systems, Inc. All rights reserved.
* Copyright (c) 2006-2012 Cisco Systems, Inc. All rights reserved.
*
* $COPYRIGHT$
*
@ -173,7 +173,7 @@ static int module_set(opal_paffinity_base_cpu_set_t mask)
/* bozo check */
if (NULL == opal_hwloc_topology) {
return OPAL_ERR_NOT_SUPPORTED;
return OPAL_ERR_NOT_INITIALIZED;
}
t = &opal_hwloc_topology;
@ -202,7 +202,7 @@ static int module_get(opal_paffinity_base_cpu_set_t *mask)
/* bozo check */
if (NULL == opal_hwloc_topology) {
return OPAL_ERR_NOT_SUPPORTED;
return OPAL_ERR_NOT_INITIALIZED;
}
t = &opal_hwloc_topology;
@ -248,7 +248,7 @@ static int module_map_to_processor_id(int socket, int core, int *processor_id)
/* bozo check */
if (NULL == opal_hwloc_topology) {
return OPAL_ERR_NOT_SUPPORTED;
return OPAL_ERR_NOT_INITIALIZED;
}
t = &opal_hwloc_topology;
@ -305,7 +305,7 @@ static int module_map_to_socket_core(int processor_id, int *socket, int *core)
/* bozo check */
if (NULL == opal_hwloc_topology) {
return OPAL_ERR_NOT_SUPPORTED;
return OPAL_ERR_NOT_INITIALIZED;
}
t = &opal_hwloc_topology;
@ -363,7 +363,7 @@ static int module_get_processor_info(int *num_processors)
/* bozo check */
if (NULL == opal_hwloc_topology) {
return OPAL_ERR_NOT_SUPPORTED;
return OPAL_ERR_NOT_INITIALIZED;
}
t = &opal_hwloc_topology;
@ -396,7 +396,7 @@ static int module_get_socket_info(int *num_sockets)
/* bozo check */
if (NULL == opal_hwloc_topology) {
return OPAL_ERR_NOT_SUPPORTED;
return OPAL_ERR_NOT_INITIALIZED;
}
t = &opal_hwloc_topology;
@ -430,7 +430,7 @@ static int module_get_core_info(int socket, int *num_cores)
/* bozo check */
if (NULL == opal_hwloc_topology) {
return OPAL_ERR_NOT_SUPPORTED;
return OPAL_ERR_NOT_INITIALIZED;
}
t = &opal_hwloc_topology;
@ -469,7 +469,7 @@ static int module_get_physical_processor_id(int logical_processor_id,
/* bozo check */
if (NULL == opal_hwloc_topology) {
return OPAL_ERR_NOT_SUPPORTED;
return OPAL_ERR_NOT_INITIALIZED;
}
t = &opal_hwloc_topology;
@ -521,7 +521,7 @@ static int module_get_physical_socket_id(int logical_socket_id,
/* bozo check */
if (NULL == opal_hwloc_topology) {
return OPAL_ERR_NOT_SUPPORTED;
return OPAL_ERR_NOT_INITIALIZED;
}
t = &opal_hwloc_topology;
@ -547,7 +547,7 @@ static int module_get_physical_core_id(int physical_socket_id,
/* bozo check */
if (NULL == opal_hwloc_topology) {
return OPAL_ERR_NOT_SUPPORTED;
return OPAL_ERR_NOT_INITIALIZED;
}
t = &opal_hwloc_topology;

Просмотреть файл

@ -9,7 +9,7 @@
* University of Stuttgart. All rights reserved.
* Copyright (c) 2004-2005 The Regents of the University of California.
* All rights reserved.
* Copyright (c) 2007-2010 Cisco Systems, Inc. All rights reserved.
* Copyright (c) 2007-2012 Cisco Systems, Inc. All rights reserved.
* Copyright (c) 2009 Sun Microsystems, Inc. All rights reserved.
* Copyright (c) 2010 IBM Corporation. All rights reserved.
* $COPYRIGHT$
@ -67,6 +67,14 @@
* priority (for the unlikely event where there are multiple
* components available on a given platform).
*
* Note that the only real paffinity module that matters these days is
* hwloc. Its module functions will return OPAL_ERR_NOT_INITIALIZED
* if the underlying hwloc system has not yet been initialized (which
* may not have occured yet since we tend to only initialize hwloc
* if/when necessary -- it's not nice to have N processes on a server
* all initialize hwloc simultaneously, because they might all
* simultaneously bang on /proc and /syst, etc.).
*
* The module has the following functions:
*
* - module_init: initialze the module

Просмотреть файл

@ -9,7 +9,7 @@
* University of Stuttgart. All rights reserved.
* Copyright (c) 2004-2005 The Regents of the University of California.
* All rights reserved.
* Copyright (c) 2007-2011 Cisco Systems, Inc. All rights reserved.
* Copyright (c) 2007-2012 Cisco Systems, Inc. All rights reserved.
* Copyright (c) 2007 Sun Microsystems, Inc. All rights reserved.
* Copyright (c) 2009 Oak Ridge National Labs. All rights reserved.
* Copyright (c) 2010 Los Alamos National Security, LLC.
@ -208,6 +208,9 @@ opal_err2str(int errnum, const char **errmsg)
case OPAL_ERR_SILENT:
retval = NULL;
break;
case OPAL_ERR_NOT_INITIALIZED:
retval = "Not initialized";
break;
default:
retval = NULL;
}