Skip to content

Commit 05852a7

Browse files
authored
Merge pull request #2243 from rhc54/topic/hwl
Require a hardware topology library at configure
2 parents 86ee7c6 + f6ad64d commit 05852a7

File tree

6 files changed

+38
-57
lines changed

6 files changed

+38
-57
lines changed

.github/actions/mlnx/Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ FROM centos:7.6.1810
33
RUN \
44
yum install -y epel-release; \
55
yum install -y perl perl-Data-Dumper \
6-
automake libtool flex make bzip2 git which rpm-build libevent-devel pandoc
6+
automake libtool flex make bzip2 git which rpm-build libevent-devel pandoc hwloc hwloc-devel
77

88
COPY entrypoint.sh /entrypoint.sh
99

src/mca/ploc/base/help-ploc.txt

Lines changed: 11 additions & 45 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
# -*- text -*-
22
#
33
# Copyright (c) 2018-2020 Intel, Inc. All rights reserved.
4+
# Copyright (c) 2021 Nanook Consulting. All rights reserved.
45
# $COPYRIGHT$
56
#
67
# Additional copyrights may follow
@@ -9,48 +10,13 @@
910
#
1011
# This is a US/English help file
1112
#
12-
[reqd-not-found]
13-
The plog_base_order MCA parameter included a required logging
14-
channel that is not available:
15-
16-
Channel: %s
17-
18-
Please update the parameter and try again.
19-
#
20-
[syslog:unrec-level]
21-
An unrecognized syslog level was given:
22-
23-
Level: %s
24-
25-
Please see "man syslog" for a list of defined levels. Input
26-
parameter strings and their corresponding syslog levels
27-
recognized by PMIx include:
28-
29-
Parameter Level
30-
err LOG_ERR (default)
31-
alert LOG_ALERT
32-
crit LOG_CRIT
33-
emerg LOG_EMERG
34-
warn LOG_WARNING
35-
not LOG_NOTICE
36-
info LOG_INFO
37-
debug LOG_DEBUG
38-
39-
Please redefine the MCA parameter and try again.
40-
#
41-
[syslog:unrec-facility]
42-
An unsupported or unrecognized value was given for the
43-
syslog facility (i.e., the type of program calling syslog):
44-
45-
Value: %s
46-
47-
Please see "man syslog" for a list of defined facility values.
48-
PMIx currently supports only the following designations:
49-
50-
Parameter Level
51-
auth LOG_AUTH
52-
priv LOG_AUTHPRIV
53-
daemon LOG_DAEMON
54-
user LOG_USER (default)
55-
56-
Please redefine the MCA parameter and try again.
13+
[no-actives]
14+
PMIx was not able to find any usable hardware topology
15+
components. This could be due to not finding a suitable
16+
supporting library such as HWLOC. PMIx requires access
17+
to topology information due to its increased role in
18+
providing information on critical areas such as device
19+
distances and fabric interfaces.
20+
21+
Please reconfigure PMIx with a hardware topology library
22+
of your choice.

src/mca/ploc/base/ploc_base_frame.c

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -46,8 +46,8 @@
4646

4747
/* Instantiate the global vars */
4848
pmix_ploc_globals_t pmix_ploc_globals = {{0}};
49-
pmix_ploc_API_module_t pmix_ploc
50-
= {.setup_topology = pmix_ploc_base_setup_topology,
49+
pmix_ploc_API_module_t pmix_ploc = {
50+
.setup_topology = pmix_ploc_base_setup_topology,
5151
.load_topology = pmix_ploc_base_load_topology,
5252
.generate_cpuset_string = pmix_ploc_base_generate_cpuset_string,
5353
.parse_cpuset_string = pmix_ploc_base_parse_cpuset_string,
@@ -66,7 +66,8 @@ pmix_ploc_API_module_t pmix_ploc
6666
.copy_topology = pmix_ploc_base_copy_topology,
6767
.print_topology = pmix_ploc_base_print_topology,
6868
.destruct_topology = pmix_ploc_base_destruct_topology,
69-
.release_topology = pmix_ploc_base_release_topology};
69+
.release_topology = pmix_ploc_base_release_topology
70+
};
7071

7172
static pmix_status_t pmix_ploc_close(void)
7273
{

src/mca/ploc/base/ploc_base_select.c

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,7 @@
2727

2828
#include "src/mca/base/base.h"
2929
#include "src/mca/mca.h"
30+
#include "src/util/show_help.h"
3031

3132
#include "src/mca/ploc/base/base.h"
3233

@@ -118,6 +119,11 @@ int pmix_ploc_base_select(void)
118119
}
119120
}
120121

122+
/* there must be at least one active component */
123+
if (0 == pmix_list_get_size(&pmix_ploc_globals.actives)) {
124+
pmix_show_help("help-ploc.txt", "no-actives", true);
125+
return PMIX_ERR_NOT_SUPPORTED;
126+
}
127+
121128
return PMIX_SUCCESS;
122-
;
123129
}

src/mca/ploc/hwloc/configure.m4

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,17 @@ AC_DEFUN([MCA_pmix_ploc_hwloc_CONFIG],[
5656

5757
AS_IF([test $pmix_hwloc_support -eq 1],
5858
[AC_MSG_CHECKING([hwloc header])
59-
AC_MSG_RESULT([$PMIX_HWLOC_HEADER])])
59+
AC_MSG_RESULT([$PMIX_HWLOC_HEADER])],
60+
[AC_MSG_WARN([PMIx requires access to topology])
61+
AC_MSG_WARN([information due to its increased role])
62+
AC_MSG_WARN([in providing information on critical])
63+
AC_MSG_WARN([areas such as device distances and fabric])
64+
AC_MSG_WARN([interfaces. At this time, only the HWLOC])
65+
AC_MSG_WARN([library is supported - and an installation])
66+
AC_MSG_WARN([of that library was not found.])
67+
AC_MSG_WARN([Please reconfigure PMIx pointing to an HWLOC])
68+
AC_MSG_WARN([installation.])
69+
AC_MSG_ERROR([Cannot continue.])])
6070

6171
AC_DEFINE_UNQUOTED([PMIX_HWLOC_HEADER], [$PMIX_HWLOC_HEADER],
6272
[Location of hwloc.h])

src/server/pmix_server.c

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -656,9 +656,8 @@ PMIX_EXPORT pmix_status_t PMIx_server_init(pmix_server_module_t *module, pmix_in
656656
pmix_client_globals.myserver->info = pmix_globals.mypeer->info;
657657

658658
/* open the pmdl framework and select the active modules for this environment */
659-
if (PMIX_SUCCESS
660-
!= (rc = pmix_mca_base_framework_open(&pmix_pmdl_base_framework,
661-
PMIX_MCA_BASE_OPEN_DEFAULT))) {
659+
rc = pmix_mca_base_framework_open(&pmix_pmdl_base_framework, PMIX_MCA_BASE_OPEN_DEFAULT);
660+
if (PMIX_SUCCESS != rc) {
662661
PMIX_RELEASE_THREAD(&pmix_global_lock);
663662
return rc;
664663
}
@@ -680,9 +679,8 @@ PMIX_EXPORT pmix_status_t PMIx_server_init(pmix_server_module_t *module, pmix_in
680679
}
681680

682681
/* open the ploc framework */
683-
if (PMIX_SUCCESS
684-
!= (rc = pmix_mca_base_framework_open(&pmix_ploc_base_framework,
685-
PMIX_MCA_BASE_OPEN_DEFAULT))) {
682+
rc = pmix_mca_base_framework_open(&pmix_ploc_base_framework, PMIX_MCA_BASE_OPEN_DEFAULT);
683+
if (PMIX_SUCCESS != rc) {
686684
PMIX_RELEASE_THREAD(&pmix_global_lock);
687685
return rc;
688686
}

0 commit comments

Comments
 (0)