1
1

Updates to r25652 -- put this MCA param in the shmem/mmap component.

No need for it to be in the base (we mistakenly thought it was used in
multiple shmem components).

This commit was SVN r25662.

The following SVN revision numbers were found above:
  r25652 --> open-mpi/ompi@7e223b5799
Этот коммит содержится в:
Jeff Squyres 2011-12-15 20:41:14 +00:00
родитель 3fecac10a9
Коммит 9cef715194
8 изменённых файлов: 45 добавлений и 78 удалений

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

@ -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-2011 Cisco Systems, Inc. All rights reserved.
* Copyright (c) 2010-2011 Los Alamos National Security, LLC.
* All rights reserved.
* $COPYRIGHT$
@ -56,17 +56,6 @@ opal_shmem_unlink(opal_shmem_ds_t *ds_buf);
* Global functions for MCA overall shmem open and close
*/
/**
* Register MCA params for the shmem base.
*
* @retval OPAL_SUCCESS Upon success
*
* This function is invoked by opal_shmem_base_register_params(). It registers
* some shmem-wide MCA parameters.
*/
OPAL_DECLSPEC int
opal_shmem_base_register_params(void);
/**
* Performs a run-time query across all available shmem components. Similar to
* mca_base_select, but take into consideration environment hints provided by
@ -195,8 +184,6 @@ OPAL_DECLSPEC extern opal_list_t opal_shmem_base_components_opened;
*/
OPAL_DECLSPEC extern int opal_shmem_base_output;
OPAL_DECLSPEC extern bool opal_mmap_on_nfs_warning;
END_C_DECLS
#endif /* OPAL_BASE_SHMEM_H */

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

@ -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) 2008-2010 Cisco Systems, Inc. All rights reserved.
* Copyright (c) 2008-2011 Cisco Systems, Inc. All rights reserved.
* Copyright (c) 2010-2011 Los Alamos National Security, LLC.
* All rights reserved.
* $COPYRIGHT$
@ -42,21 +42,21 @@
OPAL_DECLSPEC int opal_shmem_base_output = -1;
bool opal_shmem_base_components_opened_valid = false;
opal_list_t opal_shmem_base_components_opened;
bool opal_mmap_on_nfs_warning;
/* ////////////////////////////////////////////////////////////////////////// */
/**
* Register some shmem-wide MCA params
* Function for finding and opening either all MCA components, or the one
* that was specifically requested via a MCA parameter.
*/
int
opal_shmem_base_register_params(void)
opal_shmem_base_open(void)
{
int value;
/* debugging/verbose output */
mca_base_param_reg_int_name("shmem", "base_verbose",
"Verbosity level of the shmem framework",
false, false, 0, &value);
/* register an INTERNAL parameter used to provide a component selection
* hint to the shmem framework.
*/
@ -75,34 +75,6 @@ opal_shmem_base_register_params(void)
opal_shmem_base_output = -1;
}
/*
* Do we want the "warning: your mmap file is on NFS!" message? Per a
* thread on the OMPI devel list
* (http://www.open-mpi.org/community/lists/devel/2011/12/10054.php),
* on some systems, it doesn't seem to matter. But per older threads,
* it definitely does matter on some systems. Perhaps newer kernels
* are smarter about this kind of stuff...? Regardless, we should
* provide the ability to turn off this message for systems where the
* effect doesn't matter.
*/
mca_base_param_reg_int_name("opal",
"enable_shmem_on_nfs_warning",
"Enable the warning emitted when Open MPI detects that its shared memory backing file is located on a network filesystem (1 = enabled, 0 = disabled).",
false, false,
(int)true, &value);
opal_mmap_on_nfs_warning = OPAL_INT_TO_BOOL(value);
return OPAL_SUCCESS;
}
/* ////////////////////////////////////////////////////////////////////////// */
/**
* Function for finding and opening either all MCA components, or the one
* that was specifically requested via a MCA parameter.
*/
int
opal_shmem_base_open(void)
{
opal_shmem_base_components_opened_valid = false;
/* open up all available components */

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

@ -39,3 +39,6 @@ the MCA parameter "orte_no_session_dir".
Local host: %s
Fileame: %s
You can set the MCA paramter shmem_mmap_enable_nfs_warning to 0 to
disable this message.

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

@ -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 Cisco Systems, Inc. All rights reserved.
* Copyright (c) 2007-2011 Cisco Systems, Inc. All rights reserved.
* Copyright (c) 2010-2011 Los Alamos National Security, LLC.
* All rights reserved.
* $COPYRIGHT$
@ -31,6 +31,7 @@ BEGIN_C_DECLS
extern int opal_shmem_mmap_relocate_backing_file;
extern char *opal_shmem_mmap_backing_file_base_dir;
extern bool opal_shmem_mmap_nfs_warning;
/**
* globally exported variable to hold the mmap component.

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

@ -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-2011 Cisco Systems, Inc. All rights reserved.
* Copyright (c) 2010-2011 Los Alamos National Security, LLC.
* All rights reserved.
* $COPYRIGHT$
@ -39,10 +39,12 @@ const char *opal_shmem_mmap_component_version_string =
int opal_shmem_mmap_relocate_backing_file = 0;
char *opal_shmem_mmap_backing_file_base_dir = NULL;
bool opal_shmem_mmap_nfs_warning = true;
/**
* local functions
*/
static int mmap_register(void);
static int mmap_open(void);
static int mmap_close(void);
static int mmap_query(mca_base_module_t **module, int *priority);
@ -76,7 +78,9 @@ opal_shmem_mmap_component_t mca_shmem_mmap_component = {
/* component close */
mmap_close,
/* component query */
mmap_query
mmap_query,
/* component register */
mmap_register,
},
/* MCA v2.0.0 component meta data */
{
@ -105,6 +109,31 @@ mmap_runtime_query(mca_base_module_t **module,
return OPAL_SUCCESS;
}
static int mmap_register(void)
{
int value;
/*
* Do we want the "warning: your mmap file is on NFS!" message? Per a
* thread on the OMPI devel list
* (http://www.open-mpi.org/community/lists/devel/2011/12/10054.php),
* on some systems, it doesn't seem to matter. But per older threads,
* it definitely does matter on some systems. Perhaps newer kernels
* are smarter about this kind of stuff...? Regardless, we should
* provide the ability to turn off this message for systems where the
* effect doesn't matter.
*/
mca_base_param_reg_int(&mca_shmem_mmap_component.super.base_version,
"enable_nfs_warning",
"Enable the warning emitted when Open MPI detects that its shared memory backing file is located on a network filesystem (1 = enabled, 0 = disabled).",
false, false,
(int) true, &value);
opal_shmem_mmap_nfs_warning = OPAL_INT_TO_BOOL(value);
return OPAL_SUCCESS;
}
/* ////////////////////////////////////////////////////////////////////////// */
static int
mmap_open(void)

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

@ -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-2011 Cisco Systems, Inc. All rights reserved.
* Copyright (c) 2008 Sun Microsystems, Inc. All rights reserved.
* Copyright (c) 2010-2011 Los Alamos National Security, LLC.
* All rights reserved.
@ -306,7 +306,7 @@ segment_create(opal_shmem_ds_t *ds_buf,
* this is an important check because if the backing store is located on
* a network filesystem, the user will see a shared memory performance hit.
*/
if (opal_mmap_on_nfs_warning && opal_path_nfs(real_file_name)) {
if (opal_shmem_mmap_nfs_warning && opal_path_nfs(real_file_name)) {
char hn[MAXHOSTNAMELEN];
gethostname(hn, MAXHOSTNAMELEN - 1);
hn[MAXHOSTNAMELEN - 1] = '\0';

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

@ -21,21 +21,3 @@ experience performance degradation.
System call: %s %s
Error: %s (errno %d)
#
[mmap on nfs]
WARNING: Open MPI will create a shared memory backing file in a
directory that appears to be mounted on a network filesystem.
Creating the shared memory backup file on a network file system, such
as NFS or Lustre is not recommended -- it may cause excessive network
traffic to your file servers and/or cause shared memory traffic in
Open MPI to be much slower than expected.
You may want to check what the typical temporary directory is on your
node. Possible sources of the location of this temporary directory
include the $TEMPDIR, $TEMP, and $TMP environment variables.
Note, too, that system administrators can set a list of filesystems
where Open MPI is disallowed from creating temporary files by setting
the MCA parameter "orte_no_session_dir".
Local host: %s
Fileame: %s

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

@ -11,7 +11,7 @@
* All rights reserved.
* Copyright (c) 2006 Los Alamos National Security, LLC. All rights
* reserved.
* Copyright (c) 2008-2010 Cisco Systems, Inc. All rights reserved.
* Copyright (c) 2008-2011 Cisco Systems, Inc. All rights reserved.
* Copyright (c) 2009 Oak Ridge National Labs. All rights reserved.
* Copyright (c) 2010 Los Alamos National Security, LLC.
* All rights reserved.
@ -36,7 +36,6 @@
#include "opal/threads/mutex.h"
#include "opal/threads/threads.h"
#include "opal/mca/paffinity/base/base.h"
#include "opal/mca/shmem/base/base.h"
int opal_register_params(void)
{
@ -109,12 +108,6 @@ int opal_register_params(void)
return ret;
}
/* shmem base also has a few parameters */
ret = opal_shmem_base_register_params();
if (OPAL_SUCCESS != ret) {
return ret;
}
/* Paffinity base also has some parameters */
return opal_paffinity_base_register_params();
}