From 8a8cf96b6ce3266df5dfb2257aff6d73e6d1edd3 Mon Sep 17 00:00:00 2001 From: Brian Barrett Date: Thu, 4 Dec 2008 01:51:44 +0000 Subject: [PATCH] Provide configure parameter to allow the disabling of reading parameters and components from the home directory for platforms that are bad at reading in files from home directory at scale (like Red Storm) This commit was SVN r20069. --- config/ompi_configure_options.m4 | 15 +++++++++++++++ opal/mca/base/mca_base_open.c | 4 ++++ opal/mca/base/mca_base_param.c | 6 ++++++ 3 files changed, 25 insertions(+) diff --git a/config/ompi_configure_options.m4 b/config/ompi_configure_options.m4 index c8a2bb03a0..804b915ab4 100644 --- a/config/ompi_configure_options.m4 +++ b/config/ompi_configure_options.m4 @@ -639,6 +639,20 @@ AM_CONDITIONAL([OMPI_WANT_SCRIPT_WRAPPER_COMPILERS], [test "$enable_script_wrapper_compilers" = "yes"]) AC_CONFIG_FILES([ompi/tools/wrappers/ompi_wrapper_script], [chmod +x ompi/tools/wrappers/ompi_wrapper_script]) +# +# Support per-user config files? +# +AC_ARG_ENABLE([per-user-config-files], + [AC_HELP_STRING([--enable-per-user-config-files], + [Disable per-user configuration files, to save disk accesses during job strart-up. This is likely desirable for large jobs. Note that this can also be acheived by environment variables at run-time. (default: enabled)])]) +if test "$enable_per_user_config_files" = "no" ; then + result=0 +else + result=1 +fi +AC_DEFINE_UNQUOTED([OMPI_WANT_HOME_CONFIG_FILES], [$result], + [Enable per-user config files]) + # # Do we want to disable IPv6 support? # @@ -709,4 +723,5 @@ AC_DEFINE_UNQUOTED([OPAL_IDENT_STRING], ["$with_ident_string"], [ident string for Open MPI]) AC_MSG_RESULT([$with_ident_string]) + ]) diff --git a/opal/mca/base/mca_base_open.c b/opal/mca/base/mca_base_open.c index d8134b0a2e..0019b9d380 100644 --- a/opal/mca/base/mca_base_open.c +++ b/opal/mca/base/mca_base_open.c @@ -66,7 +66,11 @@ int mca_base_open(void) } /* Register some params */ +#if OMPI_WANT_HOME_CONFIG_FILES asprintf(&value, "%s%c%s"OPAL_PATH_SEP".openmpi"OPAL_PATH_SEP"components", opal_install_dirs.pkglibdir, OPAL_ENV_SEP, opal_home_directory() ); +#else + asprintf(&value, "%s", opal_install_dirs.pkglibdir); +#endif mca_base_param_component_path = mca_base_param_reg_string_name("mca", "component_path", diff --git a/opal/mca/base/mca_base_param.c b/opal/mca/base/mca_base_param.c index 5c8ce015f0..5d712fa1de 100644 --- a/opal/mca/base/mca_base_param.c +++ b/opal/mca/base/mca_base_param.c @@ -193,9 +193,15 @@ int mca_base_param_recache_files(bool rel_path_search) } } +#if OMPI_WANT_HOME_CONFIG_FILES asprintf(&files, "%s"OPAL_PATH_SEP".openmpi"OPAL_PATH_SEP"mca-params.conf%c%s"OPAL_PATH_SEP"openmpi-mca-params.conf", home, OPAL_ENV_SEP, opal_install_dirs.sysconfdir); +#else + asprintf(&files, + "%s"OPAL_PATH_SEP"openmpi-mca-params.conf", + opal_install_dirs.sysconfdir); +#endif /* Initialize a parameter that says where MCA param files can be found */