Skip to content

Commit 7d31a99

Browse files
authored
Merge pull request #7589 from rhc54/topic/env
Update PMIx and PRRTE, plus PRRTE config integration
2 parents 7907f5e + 44c97e3 commit 7d31a99

File tree

5 files changed

+44
-29
lines changed

5 files changed

+44
-29
lines changed

config/ompi_setup_prrte.m4

Lines changed: 28 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@
2424
#
2525

2626
AC_DEFUN([OMPI_SETUP_PRRTE],[
27-
OPAL_VAR_SCOPE_PUSH([opal_prrte_save_CPPFLAGS opal_prrte_save_CFLAGS opal_prrte_save_LDFLAGS opal_prrte_save_LIBS opal_prrte_args opal_prrte_save_enable_dlopen opal_prrte_save_enable_mca_dso opal_prrte_save_enable_mca_static opal_prrte_extra_libs opal_prrte_extra_ltlibs opal_prrte_extra_ldflags])
27+
OPAL_VAR_SCOPE_PUSH([opal_prrte_save_CPPFLAGS opal_prrte_save_CFLAGS opal_prrte_save_LDFLAGS opal_prrte_save_LIBS opal_prrte_args opal_prrte_save_enable_dlopen opal_prrte_save_enable_mca_dso opal_prrte_save_enable_mca_static opal_prrte_extra_libs opal_prrte_extra_ltlibs opal_prrte_extra_ldflags opal_prrte_save_with_libevent opal_prrte_save_with_hwloc opal_prrte_save_with_pmix])
2828

2929
opal_prrte_save_CFLAGS=$CFLAGS
3030
opal_prrte_save_CPPFLAGS=$CPPFLAGS
@@ -33,6 +33,9 @@ AC_DEFUN([OMPI_SETUP_PRRTE],[
3333
opal_prrte_save_enable_dlopen=enable_dlopen
3434
opal_prrte_save_enable_mca_dso=enable_mca_dso
3535
opal_prrte_save_enable_mca_static=enable_mca_static
36+
opal_prrte_save_with_libevent=with_libevent
37+
opal_prrte_save_with_hwloc=with_hwloc
38+
opal_prrte_save_with_pmix=with_pmix
3639

3740
AC_ARG_ENABLE([internal-rte],
3841
[AC_HELP_STRING([--enable-internal-rte],
@@ -62,26 +65,35 @@ AC_DEFUN([OMPI_SETUP_PRRTE],[
6265
opal_prrte_extra_libs=$OMPI_TOP_BUILDDIR/opal/libopen-pal.la
6366
opal_prrte_extra_ltlibs=$OMPI_TOP_BUILDDIR/opal/libopen-pal.la
6467

65-
if test "$opal_event_external_support" = "yes"; then
66-
opal_prrte_extra_libs="$opal_prrte_extra_libs $opal_event_external_LIBS"
67-
opal_prrte_extra_ltlibs="$opal_prrte_extra_ltlibs $opal_event_external_LIBS"
68+
if test -z $with_libevent || test "$with_libevent" = "internal" || test "$with_libevent" = "yes"; then
69+
opal_prrte_libevent_arg="--with-libevent-header=$OMPI_TOP_SRCDIR/opal/mca/event/event.h"
70+
else
71+
if test "$with_libevent" = "external"; then
72+
opal_prrte_libevent_arg="--with-libevent"
73+
else
74+
opal_prrte_libevent_arg="--with-libevent=$with_libevent"
75+
fi
6876
fi
69-
# specifying --with-libevent-header causes prrte to ignore the with_libevent and with_libevent_libdir options
70-
opal_prrte_libevent_arg="--with-libevent-header=$OMPI_TOP_SRCDIR/opal/mca/event/event.h"
7177

72-
if test "$opal_hwloc_external_support" = "yes"; then
73-
opal_prrte_extra_libs="$opal_prrte_extra_libs $opal_hwloc_external_LIBS"
74-
opal_prrte_extra_ltlibs="$opal_prrte_extra_ltlibs $opal_hwloc_external_LIBS"
78+
if test -z $with_hwloc || test "$with_hwloc" = "internal" || test "$with_hwloc" = "yes"; then
79+
opal_prrte_hwloc_arg="--with-hwloc-header=$OMPI_TOP_SRCDIR/opal/mca/hwloc/hwloc-internal.h"
80+
else
81+
if test "$with_hwloc" = "external"; then
82+
opal_prrte_hwloc_arg="--with-hwloc"
83+
else
84+
opal_prrte_hwloc_arg="--with-hwloc=$with_hwloc"
85+
fi
7586
fi
76-
# specifying --with-hwloc-header causes prrte to ignore the with_hwloc and with_hwloc_libdir options
77-
opal_prrte_hwloc_arg="--with-hwloc-header=$OMPI_TOP_SRCDIR/opal/mca/hwloc/hwloc-internal.h"
7887

79-
if test "$opal_external_pmix_happy" = "yes"; then
80-
opal_prrte_extra_libs="$opal_prrte_extra_libs $opal_pmix_external_LIBS"
81-
opal_prrte_extra_ltlibs="$opal_prrte_extra_ltlibs $opal_pmix_external_LIBS"
88+
if test -z $with_pmix || test "$with_pmix" = "internal" || test "$with_pmix" = "yes"; then
89+
opal_prrte_pmix_arg="--with-pmix-header=$OMPI_TOP_SRCDIR/opal/mca/pmix/pmix-internal.h"
90+
else
91+
if test "$with_pmix" = "external"; then
92+
opal_prrte_pmix_arg="--with-pmix"
93+
else
94+
opal_prrte_pmix_arg="--with-pmix=$with_pmix"
95+
fi
8296
fi
83-
# specifying --with-pmix-header causes prrte to ignore the with_pmix and with_pmix_libdir options
84-
opal_prrte_pmix_arg="--with-pmix-header=$OMPI_TOP_SRCDIR/opal/mca/pmix/pmix-internal.h"
8597

8698
if test -z $enable_prte_prefix_by_default || test "$enable_prte_prefix_by_default" = "yes" ||
8799
test "$enable_orterun_prefix_given" = "yes"; then

config/opal_config_asm.m4

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@ dnl reserved.
1818
dnl Copyright (c) 2017 Amazon.com, Inc. or its affiliates. All Rights
1919
dnl reserved.
2020
dnl Copyright (c) 2020 Google, LLC. All rights reserved.
21+
dnl Copyright (c) 2020 Intel, Inc. All rights reserved.
2122
dnl $COPYRIGHT$
2223
dnl
2324
dnl Additional copyrights may follow
@@ -833,7 +834,7 @@ AC_DEFUN([OPAL_CHECK_ASM_GNU_STACKEXEC], [
833834
int testfunc() {return 0; }
834835
EOF
835836
OPAL_LOG_COMMAND([$CC $CFLAGS -c conftest.c -o conftest.$OBJEXT],
836-
[$OBJDUMP -x conftest.$OBJEXT | $GREP '\.note\.GNU-stack' > /dev/null && opal_cv_asm_gnu_stack_result=yes],
837+
[$OBJDUMP -x conftest.$OBJEXT 2>&1 | $GREP '\.note\.GNU-stack' &> /dev/null && opal_cv_asm_gnu_stack_result=yes],
837838
[OPAL_LOG_MSG([the failed program was:], 1)
838839
OPAL_LOG_FILE([conftest.c])
839840
opal_cv_asm_gnu_stack_result=no])

opal/mca/base/mca_base_var.c

Lines changed: 12 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
* Copyright (c) 2008-2018 Cisco Systems, Inc. All rights reserved
1414
* Copyright (c) 2012-2018 Los Alamos National Security, LLC. All rights
1515
* reserved.
16-
* Copyright (c) 2014-2016 Intel, Inc. All rights reserved.
16+
* Copyright (c) 2014-2020 Intel, Inc. All rights reserved.
1717
* Copyright (c) 2015 Research Organization for Information Science
1818
* and Technology (RIST). All rights reserved.
1919
* Copyright (c) 2017 IBM Corporation. All rights reserved.
@@ -290,6 +290,13 @@ int mca_base_var_init(void)
290290
return ret;
291291
}
292292

293+
/* We may need this later */
294+
home = (char*)opal_home_directory();
295+
if (NULL == home) {
296+
opal_output(0, "Error: Unable to get the user home directory\n");
297+
return OPAL_ERROR;
298+
}
299+
293300
/* Set this before we register the parameter, below */
294301

295302
mca_base_var_initialized = true;
@@ -412,16 +419,11 @@ int mca_base_var_cache_files(bool rel_path_search)
412419
}
413420

414421
#if OPAL_WANT_HOME_CONFIG_FILES
415-
/* We may need this later */
416-
home = (char*)opal_home_directory();
417-
if (NULL == home) {
418-
opal_output(0, "Error: Unable to get the user home directory\n");
419-
return OPAL_ERROR;
422+
if (NULL == getenv("OPAL_USER_PARAMS_GIVEN")) {
423+
opal_asprintf(&mca_base_var_files, "%s"OPAL_PATH_SEP".openmpi" OPAL_PATH_SEP
424+
"mca-params.conf%c%s" OPAL_PATH_SEP "openmpi-mca-params.conf",
425+
home, ',', opal_install_dirs.sysconfdir);
420426
}
421-
422-
opal_asprintf(&mca_base_var_files, "%s"OPAL_PATH_SEP".openmpi" OPAL_PATH_SEP
423-
"mca-params.conf%c%s" OPAL_PATH_SEP "openmpi-mca-params.conf",
424-
home, ',', opal_install_dirs.sysconfdir);
425427
#else
426428
opal_asprintf(&mca_base_var_files, "%s" OPAL_PATH_SEP "openmpi-mca-params.conf",
427429
opal_install_dirs.sysconfdir);

0 commit comments

Comments
 (0)