1
1

Remove deprecated function - this was incorporated into the paffinity framework a long time ago. Fortunately, nobody was actually using it!

This commit was SVN r18990.
Этот коммит содержится в:
Ralph Castain 2008-07-23 03:43:31 +00:00
родитель f32e24ab86
Коммит 83e7c19d33
5 изменённых файлов: 5 добавлений и 137 удалений

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

@ -38,7 +38,6 @@
#include "opal/util/argv.h"
#include "opal/util/error.h"
#include "opal/util/stacktrace.h"
#include "opal/util/num_procs.h"
#include "opal/util/show_help.h"
#include "opal/runtime/opal.h"
#include "opal/event/event.h"
@ -756,43 +755,17 @@ int ompi_mpi_init(int argc, char **argv, int requested, int *provided)
that code. */
opal_progress_event_users_decrement();
/* see if the user specified yield_when_idle - if so, use it */
/* see if yield_when_idle was specified - if so, use it */
param = mca_base_param_find("mpi", NULL, "yield_when_idle");
mca_base_param_lookup_int(param, &value);
if (value < 0) {
/* TEMPORARY FIX - RIGHT NOW, WE DO NOT HAVE ACCESS TO
* INFO ON THE NUMBER OF LOCAL PROCS. THE ORTED IS SETTING
* THE MCA PARAM (OR THE PLS WILL, DEPENDING ON SYSTEM) SO
* THE FOLLOWING CODE WILL **NEVER** BE EXECUTED *EXCEPT*
* POSSIBLY BY SINGLETONS IN THE ABSENCE OF AN ENVIRO MCA PARAM
*/
#if 0
/* nope - so let's figure out what we can/should do...
* first, get the number of processors - if we can't then
* we can't do anything but set conservative values
*/
if (OPAL_SUCCESS == opal_get_num_processors(&num_processors)) {
/* got the num_processors - compare that to the number of
* local procs in this job to decide if we are oversubscribed
*/
if (ompi_proc_local_proc->num_local_procs > num_processors) {
/* oversubscribed - better yield */
opal_progress_set_yield_when_idle(true);
} else {
/* not oversubscribed - go ahead and be a hog! */
opal_progress_set_yield_when_idle(false);
}
} else {
/* couldn't get num_processors - be conservative */
opal_progress_set_yield_when_idle(true);
}
#endif
/* always just default to conservative */
/* if no info is provided, just default to conservative */
opal_progress_set_yield_when_idle(true);
} else {
/* yep, they specified it - so set idle accordingly */
/* info was provided, so set idle accordingly */
opal_progress_set_yield_when_idle(value == 0 ? false : true);
}
param = mca_base_param_find("mpi", NULL, "event_tick_rate");
mca_base_param_lookup_int(param, &value);
/* negative value means use default - just don't do anything */

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

@ -42,7 +42,6 @@ headers = \
malloc.h \
net.h \
numtostr.h \
num_procs.h \
opal_environ.h \
opal_getcwd.h \
opal_pty.h \
@ -76,7 +75,6 @@ libopalutil_la_SOURCES = \
malloc.c \
net.c \
numtostr.c \
num_procs.c \
opal_environ.c \
opal_getcwd.c \
opal_pty.c \

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

@ -1,60 +0,0 @@
/*
* Copyright (c) 2007 The University of Tennessee and The University
* of Tennessee Research Foundation. All rights
* reserved.
* Copyright (c) 2007 Cisco Systems, Inc. All rights reserved.
* $COPYRIGHT$
*
* Additional copyrights may follow
*
* $HEADER$
*/
#include "opal_config.h"
#if HAVE_UNISTD_H
#include <unistd.h>
#endif /* HAVE_UNISTD_H */
#include "opal/constants.h"
#include "opal/util/num_procs.h"
#if defined(HAVE_SYS_SYSCTL_H)
#include <sys/sysctl.h>
#endif
/*
* Simple wrapper to get the number of processors on the local host
*/
int opal_get_num_processors(int *num_procs)
{
#ifdef __WINDOWS__
SYSTEM_INFO sys_info;
GetSystemInfo( &sys_info );
*num_procs = sys_info.dwNumberOfProcessors;
return OPAL_SUCCESS;
#else
/* POSIX environments */
#if defined(__APPLE__)
/* OSX has a special function for this */
size_t size = sizeof(*num_procs) ;
if (0 == sysctlbyname( "hw.ncpu", num_procs, &size, NULL, 0)) {
return OPAL_SUCCESS;
}
#elif OPAL_HAVE__SC_NPROCESSORS_ONLN
/* Other POSIX'es can use sysconf() */
int count = sysconf(_SC_NPROCESSORS_ONLN);
if (-1 != count) {
*num_procs = count;
return OPAL_SUCCESS;
}
#endif
/* Default case if we don't know how to get the processor number or if
something fails. */
return OPAL_ERR_NOT_FOUND;
#endif
}

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

@ -1,42 +0,0 @@
/*
* Copyright (c) 2007 Cisco Systems, Inc. All rights reserved.
* $COPYRIGHT$
*
* Additional copyrights may follow
*
* $HEADER$
*/
/**
* @file
*
* This function is a simple wrapper to have an OS-independent
* mechanism to get the number of processors on a local host.
*/
#ifndef OPAL_NUM_PROCS_H
#define OPAL_NUM_PROCS_H
#include "opal_config.h"
#if defined(c_plusplus) || defined(__cplusplus)
extern "C" {
#endif
/**
* Provide a portable method for getting the number of processors on
* the local machine. In POSIX environments, this is a simple wrapper
* around sysconf().
*
* @retval OPAL_SUCCESS If successful, indicating that num_procs
* has a meaningful value.
* @retval OPAL_ERR_NOT_IMPLEMENTED on platforms that are not yet
* supported.
*/
OPAL_DECLSPEC int opal_get_num_processors(int *num_procs);
#if defined(c_plusplus) || defined(__cplusplus)
}
#endif
#endif

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

@ -38,7 +38,6 @@
#include "opal/util/opal_environ.h"
#include "opal/util/argv.h"
#include "opal/util/os_path.h"
#include "opal/util/num_procs.h"
#include "opal/util/sys_limits.h"
#include "opal/class/opal_pointer_array.h"
#include "opal/dss/dss.h"
@ -639,7 +638,7 @@ static int odls_base_default_setup_fork(orte_app_context_t *context,
opal_setenv(param, orte_process_info.my_hnp_uri, true, environ_copy);
free(param);
/* setup yield schedule */
/* setup yield schedule - do not override any user-supplied directive! */
if (oversubscribed) {
param = mca_base_param_environ_variable("mpi", NULL, "yield_when_idle");
opal_setenv(param, "1", false, environ_copy);