diff --git a/opal/mca/paffinity/osx/.ompi_ignore b/opal/mca/paffinity/osx/.ompi_ignore deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/opal/mca/paffinity/osx/.ompi_unignore b/opal/mca/paffinity/osx/.ompi_unignore deleted file mode 100644 index 97b20ffb20..0000000000 --- a/opal/mca/paffinity/osx/.ompi_unignore +++ /dev/null @@ -1 +0,0 @@ -rhc diff --git a/opal/mca/paffinity/osx/Makefile.am b/opal/mca/paffinity/posix/Makefile.am similarity index 71% rename from opal/mca/paffinity/osx/Makefile.am rename to opal/mca/paffinity/posix/Makefile.am index bcfde120a0..87f9c8b7d0 100644 --- a/opal/mca/paffinity/osx/Makefile.am +++ b/opal/mca/paffinity/posix/Makefile.am @@ -17,27 +17,27 @@ # sources = \ - paffinity_osx.h \ - paffinity_osx_component.c \ - paffinity_osx_module.c + paffinity_posix.h \ + paffinity_posix_component.c \ + paffinity_posix_module.c # Make the output library in this directory, and name it either # mca__.la (for DSO builds) or libmca__.la # (for static builds). -if OMPI_BUILD_paffinity_osx_DSO +if OMPI_BUILD_paffinity_posix_DSO component_noinst = -component_install = mca_paffinity_osx.la +component_install = mca_paffinity_posix.la else -component_noinst = libmca_paffinity_osx.la +component_noinst = libmca_paffinity_posix.la component_install = endif mcacomponentdir = $(pkglibdir) mcacomponent_LTLIBRARIES = $(component_install) -mca_paffinity_osx_la_SOURCES = $(sources) -mca_paffinity_osx_la_LDFLAGS = -module -avoid-version +mca_paffinity_posix_la_SOURCES = $(sources) +mca_paffinity_posix_la_LDFLAGS = -module -avoid-version noinst_LTLIBRARIES = $(component_noinst) -libmca_paffinity_osx_la_SOURCES =$(sources) -libmca_paffinity_osx_la_LDFLAGS = -module -avoid-version +libmca_paffinity_posix_la_SOURCES =$(sources) +libmca_paffinity_posix_la_LDFLAGS = -module -avoid-version diff --git a/opal/mca/paffinity/osx/configure.m4 b/opal/mca/paffinity/posix/configure.m4 similarity index 91% rename from opal/mca/paffinity/osx/configure.m4 rename to opal/mca/paffinity/posix/configure.m4 index 6bd6fc71e1..fe711797e1 100644 --- a/opal/mca/paffinity/osx/configure.m4 +++ b/opal/mca/paffinity/posix/configure.m4 @@ -19,9 +19,9 @@ # $HEADER$ # -# MCA_paffinity_osx_CONFIG([action-if-found], [action-if-not-found]) +# MCA_paffinity_posix_CONFIG([action-if-found], [action-if-not-found]) # ----------------------------------------------------------- -AC_DEFUN([MCA_paffinity_osx_CONFIG],[ +AC_DEFUN([MCA_paffinity_posix_CONFIG],[ #check to see if we have AC_CHECK_HEADER([unistd.h], [happy=yes], [happy=no]) diff --git a/opal/mca/paffinity/osx/configure.params b/opal/mca/paffinity/posix/configure.params similarity index 100% rename from opal/mca/paffinity/osx/configure.params rename to opal/mca/paffinity/posix/configure.params diff --git a/opal/mca/paffinity/osx/paffinity_osx.h b/opal/mca/paffinity/posix/paffinity_posix.h similarity index 81% rename from opal/mca/paffinity/osx/paffinity_osx.h rename to opal/mca/paffinity/posix/paffinity_posix.h index c7f2233d0b..0c40924e50 100644 --- a/opal/mca/paffinity/osx/paffinity_osx.h +++ b/opal/mca/paffinity/posix/paffinity_posix.h @@ -17,8 +17,8 @@ * $HEADER$ */ -#ifndef MCA_PAFFINITY_OSX_EXPORT_H -#define MCA_PAFFINITY_OSX_EXPORT_H +#ifndef MCA_PAFFINITY_POSIX_EXPORT_H +#define MCA_PAFFINITY_POSIX_EXPORT_H #include "opal_config.h" @@ -31,11 +31,11 @@ BEGIN_C_DECLS * Globally exported variable */ -OPAL_DECLSPEC extern const opal_paffinity_base_component_1_1_0_t mca_paffinity_osx_component; +OPAL_DECLSPEC extern const opal_paffinity_base_component_1_1_0_t mca_paffinity_posix_component; /* query function */ -int opal_paffinity_osx_component_query(mca_base_module_t **module, int *priority); +int opal_paffinity_posix_component_query(mca_base_module_t **module, int *priority); END_C_DECLS -#endif /* MCA_PAFFINITY_OSX_EXPORT_H */ +#endif /* MCA_PAFFINITY_POSIX_EXPORT_H */ diff --git a/opal/mca/paffinity/osx/paffinity_osx_component.c b/opal/mca/paffinity/posix/paffinity_posix_component.c similarity index 82% rename from opal/mca/paffinity/osx/paffinity_osx_component.c rename to opal/mca/paffinity/posix/paffinity_posix_component.c index fbcfc6d416..f1ce790257 100644 --- a/opal/mca/paffinity/osx/paffinity_osx_component.c +++ b/opal/mca/paffinity/posix/paffinity_posix_component.c @@ -27,25 +27,25 @@ #include "opal/constants.h" #include "opal/mca/paffinity/paffinity.h" -#include "paffinity_osx.h" +#include "paffinity_posix.h" /* - * Public string showing the paffinity ompi_osx component version number + * Public string showing the paffinity ompi_posix component version number */ -const char *opal_paffinity_osx_component_version_string = - "OPAL osx paffinity MCA component version " OPAL_VERSION; +const char *opal_paffinity_posix_component_version_string = + "OPAL posix paffinity MCA component version " OPAL_VERSION; /* * Local function */ -static int osx_open(void); +static int posix_open(void); /* * Instantiate the public struct with all of our public information * and pointers to our public functions in it */ -const opal_paffinity_base_component_1_1_0_t mca_paffinity_osx_component = { +const opal_paffinity_base_component_1_1_0_t mca_paffinity_posix_component = { /* First, the mca_component_t struct containing meta information about the component itself */ @@ -58,16 +58,16 @@ const opal_paffinity_base_component_1_1_0_t mca_paffinity_osx_component = { /* Component name and version */ - "osx", + "posix", OPAL_MAJOR_VERSION, OPAL_MINOR_VERSION, OPAL_RELEASE_VERSION, /* Component open and close functions */ - osx_open, + posix_open, NULL, - opal_paffinity_osx_component_query + opal_paffinity_posix_component_query }, /* Next the MCA v1.0.0 component meta data */ { @@ -77,7 +77,7 @@ const opal_paffinity_base_component_1_1_0_t mca_paffinity_osx_component = { }; -static int osx_open(void) +static int posix_open(void) { return OPAL_SUCCESS; } diff --git a/opal/mca/paffinity/osx/paffinity_osx_module.c b/opal/mca/paffinity/posix/paffinity_posix_module.c similarity index 58% rename from opal/mca/paffinity/osx/paffinity_osx_module.c rename to opal/mca/paffinity/posix/paffinity_posix_module.c index 63e0a61bb6..6efb007519 100644 --- a/opal/mca/paffinity/osx/paffinity_osx_module.c +++ b/opal/mca/paffinity/posix/paffinity_posix_module.c @@ -33,41 +33,44 @@ #include "opal/mca/paffinity/base/base.h" #include "opal/util/output.h" -#include "paffinity_osx.h" +#include "paffinity_posix.h" /* * Local functions */ -static int osx_module_init(void); -static int osx_module_set(opal_paffinity_base_cpu_set_t cpumask); -static int osx_module_get(opal_paffinity_base_cpu_set_t *cpumask); -static int osx_module_finalize(void); -static int osx_module_map_to_processor_id(int socket, int core, int *processor_id); -static int osx_module_map_to_socket_core(int processor_id, int *socket, int *core); -static int osx_module_get_processor_info(int *num_processors, int *max_processor_id); -static int osx_module_get_socket_info(int *num_sockets, int *max_socket_num); -static int osx_module_get_core_info(int socket, int *num_cores, int *max_core_num); +static int posix_module_init(void); +static int posix_module_set(opal_paffinity_base_cpu_set_t cpumask); +static int posix_module_get(opal_paffinity_base_cpu_set_t *cpumask); +static int posix_module_finalize(void); +static int posix_module_map_to_processor_id(int socket, int core, int *processor_id); +static int posix_module_map_to_socket_core(int processor_id, int *socket, int *core); +static int posix_module_get_processor_info(int *num_processors, int *max_processor_id); +static int posix_module_get_socket_info(int *num_sockets, int *max_socket_num); +static int posix_module_get_core_info(int socket, int *num_cores, int *max_core_num); /* * Solaris paffinity module */ static const opal_paffinity_base_module_1_1_0_t loc_module = { /* Initialization function */ - osx_module_init, + posix_module_init, /* Module function pointers */ - osx_module_set, - osx_module_get, - osx_module_map_to_processor_id, - osx_module_map_to_socket_core, - osx_module_get_processor_info, - osx_module_get_socket_info, - osx_module_get_core_info, - osx_module_finalize + posix_module_set, + posix_module_get, + posix_module_map_to_processor_id, + posix_module_map_to_socket_core, + posix_module_get_processor_info, + posix_module_get_socket_info, + posix_module_get_core_info, + posix_module_finalize }; -int opal_paffinity_osx_component_query(mca_base_module_t **module, int *priority) +int opal_paffinity_posix_component_query(mca_base_module_t **module, int *priority) { + /* set this priority really low so we will be overridden by any + * other component such as linux or solaris if they can build + */ *priority = 2; *module = (mca_base_module_t *)&loc_module; @@ -75,36 +78,36 @@ int opal_paffinity_osx_component_query(mca_base_module_t **module, int *priority } /* do nothing here. both mpirun and processes would run init(), but - * only processes would run the osx_module_set function */ -static int osx_module_init(void) + * only processes would run the posix_module_set function */ +static int posix_module_init(void) { return OPAL_SUCCESS; } /* this gives us a cpumask which tells which CPU to bind */ -static int osx_module_set(opal_paffinity_base_cpu_set_t cpumask) +static int posix_module_set(opal_paffinity_base_cpu_set_t cpumask) { return OPAL_ERR_NOT_SUPPORTED; } /* This get function returns the CPU id that's currently binded, * and then sets the cpumask. */ -static int osx_module_get(opal_paffinity_base_cpu_set_t *cpumask) +static int posix_module_get(opal_paffinity_base_cpu_set_t *cpumask) { return OPAL_ERR_NOT_SUPPORTED; } -static int osx_module_map_to_processor_id(int socket, int core, int *processor_id) +static int posix_module_map_to_processor_id(int socket, int core, int *processor_id) { return OPAL_ERR_NOT_SUPPORTED; } -static int osx_module_map_to_socket_core(int processor_id, int *socket, int *core) +static int posix_module_map_to_socket_core(int processor_id, int *socket, int *core) { return OPAL_ERR_NOT_SUPPORTED; } -static int osx_module_get_processor_info(int *num_processors, int *max_processor_id) +static int posix_module_get_processor_info(int *num_processors, int *max_processor_id) { int rc; @@ -124,18 +127,18 @@ static int osx_module_get_processor_info(int *num_processors, int *max_processor return OPAL_SUCCESS; } -static int osx_module_get_socket_info(int *num_sockets, int *max_socket_num) +static int posix_module_get_socket_info(int *num_sockets, int *max_socket_num) { return OPAL_ERR_NOT_SUPPORTED; } -static int osx_module_get_core_info(int socket, int *num_cores, int *max_core_num) +static int posix_module_get_core_info(int socket, int *num_cores, int *max_core_num) { return OPAL_ERR_NOT_SUPPORTED; } -static int osx_module_finalize(void) +static int posix_module_finalize(void) { return OPAL_SUCCESS; } diff --git a/orte/mca/odls/base/odls_base_default_fns.c b/orte/mca/odls/base/odls_base_default_fns.c index adbb9bcb4a..a44bb613d2 100644 --- a/orte/mca/odls/base/odls_base_default_fns.c +++ b/orte/mca/odls/base/odls_base_default_fns.c @@ -811,7 +811,11 @@ int orte_odls_base_default_launch_local(orte_jobid_t job, */ oversubscribed = true; } else { - if (opal_list_get_size(&orte_odls_globals.children) > (size_t)num_processors) { + /* don't typecast the num_processors to a size_t as the value could be < 0! + * Instead, force the opal_list_get_size value to be an int as we surely + * won't have a #children bigger than that! + */ + if ((int)opal_list_get_size(&orte_odls_globals.children) > num_processors) { /* if the #procs > #processors, declare us oversubscribed. This * covers the case where the user didn't tell us anything about the * number of available slots, so we defaulted to a value of 1