Skip to content

Commit 522c567

Browse files
author
Ralph Castain
authored
Merge pull request #14 from rhc54/topic/sync
Sync to upstream
2 parents c5e2ab3 + 61f0d26 commit 522c567

25 files changed

Lines changed: 639 additions & 95 deletions

File tree

.gitignore

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -300,6 +300,12 @@ opal/mca/hwloc/base/static-components.h.new.struct
300300

301301
opal/mca/installdirs/config/install_dirs.h
302302

303+
opal/mca/pmix/ext2x/ext2x.c
304+
opal/mca/pmix/ext2x/ext2x.h
305+
opal/mca/pmix/ext2x/ext2x_client.c
306+
opal/mca/pmix/ext2x/ext2x_component.c
307+
opal/mca/pmix/ext2x/ext2x_server_north.c
308+
opal/mca/pmix/ext2x/ext2x_server_south.c
303309
opal/mca/pmix/pmix*/pmix/include/pmix/autogen/config.h
304310
opal/mca/pmix/pmix*/pmix/include/pmix/autogen/config.h.in
305311
opal/mca/pmix/pmix*/pmix/src/include/private/autogen/config.h.in

config/opal_check_libnl.m4

Lines changed: 119 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@ dnl
33
dnl Copyright (c) 2015-2017 Research Organization for Information Science
44
dnl and Technology (RIST). All rights reserved.
55
dnl Copyright (c) 2017 Intel, Inc. All rights reserved.
6+
dnl Copyright (c) 2017 Cisco Systems, Inc. All rights reserved.
67
dnl $COPYRIGHT$
78
dnl
89
dnl Additional copyrights may follow
@@ -19,7 +20,7 @@ dnl libnl-3.so.200 and friends, so if libnl3-devel packages are not
1920
dnl installed, but libnl-devel are, Open MPI should not try to use libnl.
2021
dnl
2122
dnl GROSS: libnl wants us to either use pkg-config (which we
22-
dnl can't assume is always present) or we need to look in a
23+
dnl cannot assume is always present) or we need to look in a
2324
dnl particular directory for the right libnl3 include files. For
2425
dnl now, just hard code the special path into this logic.
2526
dnl
@@ -68,46 +69,128 @@ AC_DEFUN([OPAL_LIBNL_SANITY_INIT], [
6869
esac
6970
])
7071

71-
dnl OPAL_LIBNL_SANITY_CHECK(lib, function, LIBS)
72+
dnl OPAL_LIBNL_SANITY_FAIL_MSG(lib)
73+
dnl
74+
dnl Helper to pring a big warning message when we detect a libnl conflict.
75+
dnl
76+
dnl --------------------------------------------------------------------
77+
AC_DEFUN([OPAL_LIBNL_SANITY_FAIL_MSG], [
78+
AC_MSG_WARN([This is a configuration that is *known* to cause run-time crashes.])
79+
AC_MSG_WARN([This is an error in lib$1 (not Open MPI).])
80+
AC_MSG_WARN([Open MPI will therefore skip using lib$1.])
81+
])
82+
83+
dnl OPAL_LIBNL_SANITY_CHECK(lib, function, LIBS, libnl_check_ok)
84+
dnl
85+
dnl This macro is invoked from OPAL_CHECK_PACKAGE to make sure that
86+
dnl new libraries that are added to LIBS do not pull in conflicting
87+
dnl versions of libnl. E.g., if we already have a library in LIBS
88+
dnl that pulls in libnl v3, if OPAL_CHECK_PACKAGE is later called that
89+
dnl pulls in a library that pulls in libnl v1, this macro will detect
90+
dnl the conflict and will abort configure.
91+
dnl
92+
dnl We abort rather than silently ignore this library simply because
93+
dnl we are now multiple levels deep in the M4 "call stack", and this
94+
dnl layer does not know the intent of the user. Hence, all we can do
95+
dnl is abort with a hopefully helpful error message (that we aborted
96+
dnl because Open MPI would have been built in a configuration that is
97+
dnl known to crash).
98+
dnl
7299
dnl --------------------------------------------------------------------
73100
AC_DEFUN([OPAL_LIBNL_SANITY_CHECK], [
101+
OPAL_VAR_SCOPE_PUSH([opal_libnl_sane])
102+
opal_libnl_sane=1
74103
case $host in
75104
*linux*)
76-
OPAL_VAR_SCOPE_PUSH([ldd_output libnl_version])
77-
AC_LANG_PUSH(C)
78-
cat > conftest_c.$ac_ext << EOF
105+
OPAL_LIBNL_SANITY_CHECK_LINUX($1, $2, $3, opal_libnl_sane)
106+
;;
107+
esac
108+
109+
$4=$opal_libnl_sane
110+
OPAL_VAR_SCOPE_POP([opal_libnl_sane])
111+
])
112+
113+
dnl
114+
dnl Simple helper for OPAL_LIBNL_SANITY_CHECK
115+
dnl $1: library name
116+
dnl $2: function
117+
dnl $3: LIBS
118+
dnl $4: output variable (1=ok, 0=not ok)
119+
dnl
120+
AC_DEFUN([OPAL_LIBNL_SANITY_CHECK_LINUX], [
121+
OPAL_VAR_SCOPE_PUSH([this_requires_v1 libnl_sane this_requires_v3 ldd_output result_msg])
122+
123+
AC_LANG_PUSH(C)
124+
125+
AC_MSG_CHECKING([if lib$1 requires libnl v1 or v3])
126+
cat > conftest_c.$ac_ext << EOF
79127
extern void $2 (void);
80128
int main(int argc, char *argv[[]]) {
81129
$2 ();
82130
return 0;
83131
}
84132
EOF
85-
OPAL_LOG_COMMAND([$CC -o conftest $CFLAGS $CPPFLAGS conftest_c.$ac_ext $LDFLAGS -l$1 $LIBS $3],
86-
[ldd_output=`ldd conftest`
87-
libnl_version=0
88-
AS_IF([echo $ldd_output | grep -q libnl.so],
89-
[AS_IF([test $opal_libnl_version -eq 3],
90-
[AC_MSG_WARN([lib nl version conflict: $opal_libnlv3_libs requires libnl-3 whereas $1 requires libnl])],
91-
[opal_libnlv1_libs="$opal_libnlv1_libs $1"
92-
OPAL_UNIQ([opal_libnlv1_libs])
93-
opal_libnl_version=1])
94-
libnl_version=1])
95-
AS_IF([echo $ldd_output | grep -q libnl-3.so],
96-
[AS_IF([test $libnl_version -eq 1],
97-
[AC_MSG_WARN([lib $1 requires both libnl v1 and libnl v3 -- yoinks!])
98-
AC_MSG_WARN([This is a configuration that is known to cause run-time crashes])
99-
AC_MSG_ERROR([Cannot continue])])
100-
AS_IF([test $opal_libnl_version -eq 1],
101-
[AC_MSG_WARN([lib nl version conflict: $opal_libnlv1_libs requires libnl whereas $1 requires libnl-3])],
102-
[opal_libnlv3_libs="$opal_libnlv3_libs $1"
103-
OPAL_UNIQ([opal_libnlv3_libs])
104-
opal_libnl_version=3])])
105-
rm -f conftest conftest_c.$ac_ext],
106-
[AC_MSG_WARN([Could not link a simple program with lib $1])])
107-
AC_LANG_POP(C)
108-
OPAL_VAR_SCOPE_POP([ldd_output libnl_version])
109-
;;
110-
esac
133+
134+
this_requires_v1=0
135+
this_requires_v3=0
136+
result_msg=
137+
OPAL_LOG_COMMAND([$CC -o conftest $CFLAGS $CPPFLAGS conftest_c.$ac_ext $LDFLAGS -l$1 $LIBS $3],
138+
[ldd_output=`ldd conftest`
139+
AS_IF([echo $ldd_output | grep -q libnl-3.so],
140+
[this_requires_v3=1
141+
result_msg="v3"])
142+
AS_IF([echo $ldd_output | grep -q libnl.so],
143+
[this_requires_v1=1
144+
result_msg="v1 $result_msg"])
145+
AC_MSG_RESULT([$result_msg])
146+
],
147+
[AC_MSG_WARN([Could not link a simple program with lib $1])
148+
])
149+
150+
# Assume that our configuration is sane; this may get reset below
151+
libnl_sane=1
152+
153+
# Note: in all the checks below, only add this library to the list
154+
# of libraries (for v1 or v3 as relevant) if we do not fail.
155+
# I.e., assume that a higher level will refuse to use this library
156+
# if we return failure.
157+
158+
# Does this library require both v1 and v3? If so, fail.
159+
AS_IF([test $this_requires_v1 -eq 1 && test $this_requires_v3 -eq 1],
160+
[AC_MSG_WARN([Unfortunately, lib$1 links to both libnl and libnl-3.])
161+
OPAL_LIBNL_SANITY_FAIL_MSG($1)
162+
libnl_sane=0])
163+
164+
# Does this library require v1, but some prior library required
165+
# v3? If so, fail.
166+
AS_IF([test $libnl_sane -eq 1 && test $this_requires_v1 -eq 1],
167+
[AS_IF([test $opal_libnl_version -eq 3],
168+
[AC_MSG_WARN([libnl version conflict: $opal_libnlv3_libs requires libnl-3 whereas $1 requires libnl])
169+
OPAL_LIBNL_SANITY_FAIL_MSG($1)
170+
libnl_sane=0],
171+
[opal_libnlv1_libs="$opal_libnlv1_libs $1"
172+
OPAL_UNIQ([opal_libnlv1_libs])
173+
opal_libnl_version=1])
174+
])
175+
176+
# Does this library require v3, but some prior library required
177+
# v1? If so, fail.
178+
AS_IF([test $libnl_sane -eq 1 && test $this_requires_v3 -eq 1],
179+
[AS_IF([test $opal_libnl_version -eq 1],
180+
[AC_MSG_WARN([libnl version conflict: $opal_libnlv1_libs requires libnl whereas lib$1 requires libnl-3])
181+
OPAL_LIBNL_SANITY_FAIL_MSG($1)
182+
libnl_sane=0],
183+
[opal_libnlv3_libs="$opal_libnlv3_libs $1"
184+
OPAL_UNIQ([opal_libnlv3_libs])
185+
opal_libnl_version=3])
186+
])
187+
188+
AC_LANG_POP(C)
189+
rm -f conftest conftest_c.$ac_ext
190+
191+
$4=$libnl_sane
192+
193+
OPAL_VAR_SCOPE_POP([ldd_output libnl_sane this_requires_v1 this_requires_v3 result_msg])
111194
])
112195

113196
dnl
@@ -219,7 +302,11 @@ AC_DEFUN([OPAL_CHECK_LIBNL_V3],[
219302
AS_IF([test $opal_libnlv3_happy -eq 1],
220303
[$2_LIBS="-lnl-3 -lnl-route-3"
221304
OPAL_HAVE_LIBNL3=1],
222-
[$2_LIBS=""])
305+
[# OPAL_CHECK_PACKAGE(...,nl_recvmsgs_report,...) might have set the variables below
306+
# so reset them if libnl v3 cannot be used
307+
$2_CPPFLAGS=""
308+
$2_LDFLAGS=""
309+
$2_LIBS=""])
223310

224311
OPAL_VAR_SCOPE_POP
225312
])

config/opal_check_package.m4

Lines changed: 12 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -10,9 +10,9 @@ dnl Copyright (c) 2004-2005 High Performance Computing Center Stuttgart,
1010
dnl University of Stuttgart. All rights reserved.
1111
dnl Copyright (c) 2004-2005 The Regents of the University of California.
1212
dnl All rights reserved.
13-
dnl Copyright (c) 2012-2015 Cisco Systems, Inc. All rights reserved.
13+
dnl Copyright (c) 2012-2017 Cisco Systems, Inc. All rights reserved.
1414
dnl Copyright (c) 2012 Oracle and/or its affiliates. All rights reserved.
15-
dnl Copyright (c) 2014 Intel, Inc. All rights reserved.
15+
dnl Copyright (c) 2014-2017 Intel, Inc. All rights reserved.
1616
dnl Copyright (c) 2015-2016 Research Organization for Information Science
1717
dnl and Technology (RIST). All rights reserved.
1818
dnl $COPYRIGHT$
@@ -132,16 +132,22 @@ AC_DEFUN([_OPAL_CHECK_PACKAGE_LIB], [
132132
$1_LDFLAGS="$opal_check_package_$1_orig_LDFLAGS"
133133
unset opal_Lib])])])])
134134

135+
AS_IF([test "$opal_check_package_lib_happy" = "yes"],
136+
[ # libnl v1 and libnl3 are known to *not* coexist
137+
# harmoniously in the same process. Check to see if this
138+
# new package will introduce such a conflict.
139+
OPAL_LIBNL_SANITY_CHECK([$2], [$3], [$$1_LIBS],
140+
[opal_check_package_libnl_check_ok])
141+
AS_IF([test $opal_check_package_libnl_check_ok -eq 0],
142+
[opal_check_package_lib_happy=no])
143+
])
144+
135145
AS_IF([test "$opal_check_package_lib_happy" = "yes"],
136146
[ # The result of AC SEARCH_LIBS is cached in $ac_cv_search_[function]
137147
AS_IF([test "$ac_cv_search_$3" != "no" &&
138148
test "$ac_cv_search_$3" != "none required"],
139149
[$1_LIBS="$ac_cv_search_$3 $4"],
140150
[$1_LIBS="$4"])
141-
# libnl v1 and libnl3 are known *not* to coexist
142-
# for each library, figure out whether it depends on libnl or libnl3 or none
143-
# so conflicts can be reported and/or prevented
144-
OPAL_LIBNL_SANITY_CHECK([$2], [$3], [$$1_LIBS])
145151
$7],
146152
[$8])
147153

config/opal_configure_options.m4

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -264,8 +264,8 @@ AC_ARG_ENABLE([dlopen],
264264
Disabling dlopen implies --disable-mca-dso.
265265
(default: enabled)])])
266266
if test "$enable_dlopen" = "no" ; then
267-
enable_mca_dso="no"
268-
enable_mca_static="yes"
267+
enable_mca_dso=no
268+
enable_mca_static=yes
269269
OPAL_ENABLE_DLOPEN_SUPPORT=0
270270
AC_MSG_RESULT([no])
271271
else

config/opal_mca.m4

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ dnl University of Stuttgart. All rights reserved.
1111
dnl Copyright (c) 2004-2005 The Regents of the University of California.
1212
dnl All rights reserved.
1313
dnl Copyright (c) 2010-2016 Cisco Systems, Inc. All rights reserved.
14-
dnl Copyright (c) 2013-2014 Intel, Inc. All rights reserved.
14+
dnl Copyright (c) 2013-2017 Intel, Inc. All rights reserved.
1515
dnl $COPYRIGHT$
1616
dnl
1717
dnl Additional copyrights may follow
@@ -173,6 +173,7 @@ AC_DEFUN([OPAL_MCA],[
173173
elif test "$enable_mca_dso" = "no"; then
174174
DSO_all=0
175175
msg=none
176+
enable_dlopen=no
176177
else
177178
DSO_all=0
178179
ifs_save="$IFS"

contrib/platform/intel/bend/linux

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@ enable_cxx_exceptions=no
1818
enable_mpi_java=no
1919
enable_io_romio=no
2020
enable_contrib_no_build=libnbc
21+
enable_install_libpmix=yes
2122
with_memory_manager=no
2223
with_tm=no
2324
with_psm=no

contrib/scaling/scaling.pl

Lines changed: 23 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -17,17 +17,17 @@
1717
my $useaprun = 0;
1818
my $useaprun = 0;
1919
my $myapp;
20-
my $runall = 0;
20+
my $runall = 1;
2121
my $rawoutput = 0;
2222
my $myresults = "myresults";
2323
my $ppn = 1;
2424
my @csvrow;
2525

2626
my @tests = qw(/bin/true ./orte_no_op ./mpi_no_op ./mpi_no_op ./mpi_no_op);
27-
my @options = ("", "", "", "--fwd-mpirun-port -mca mpi_add_procs_cutoff 0 -mca pmix_base_async_modex 1", "--fwd-mpirun-port -mca mpi_add_procs_cutoff 0 -mca pmix_base_async_modex 1 -mca async_mpi_init 1 -mca async_mpi_finalize 1");
28-
my @starterlist = qw(mpirun orterun srun aprun);
27+
my @options = ("", "", "", "-mca mpi_add_procs_cutoff 0 -mca pmix_base_async_modex 1", "-mca mpi_add_procs_cutoff 0 -mca pmix_base_async_modex 1 -mca async_mpi_init 1 -mca async_mpi_finalize 1");
28+
my @starterlist = qw(mpirun prun srun aprun);
2929
my @starteroptionlist = ("--novm",
30-
"--hnp file:dvm_uri",
30+
"",
3131
"--distribution=cyclic -N",
3232
"-N");
3333

@@ -49,7 +49,6 @@
4949
"aprun" => \$useaprun,
5050
"mpirun" => \$usempirun,
5151
"myapp=s" => \$myapp,
52-
"all" => \$runall,
5352
"results=s" => \$myresults,
5453
"rawout" => \$rawoutput,
5554
"ppn=s" => \$ppn,
@@ -67,8 +66,7 @@
6766
--srun Use srun (if available) to execute the test
6867
--arpun Use aprun (if available) to execute the test
6968
--myapp=s In addition to the standard tests, run this specific application (including any args)
70-
--all Use all available start commands [default]
71-
--results=file File where results are to stored in comma-separated value format
69+
--results=file File where results are to be stored in comma-separated value format
7270
--rawout Provide raw timing output to the file
7371
--ppn=n Run n procs/node
7472
";
@@ -90,7 +88,13 @@
9088
my @starters;
9189
my @starteroptions;
9290

93-
# if they asked for all, then set all starters to requested
91+
# if they explicitly requested specific starters, then
92+
# only use those
93+
if ($useaprun || $usempirun || $usesrun || $usedvm) {
94+
$runall = 0
95+
}
96+
97+
# if they didn't specify something, then set all starters to requested
9498
if ($runall) {
9599
$useaprun = 1;
96100
$usempirun = 1;
@@ -112,7 +116,7 @@
112116
}
113117
}
114118
if ($exists) {
115-
if ($usedvm && $starter eq "orterun") {
119+
if ($usedvm && $starter eq "prun") {
116120
push @starters, $starter;
117121
$opt = $starteroptionlist[$idx] . " --npernode " . $ppn;
118122
push @starteroptions, $opt;
@@ -261,23 +265,18 @@ ()
261265
foreach $starter (@starters) {
262266
print "STARTER: $starter\n";
263267
# if we are going to use the dvm, then we
264-
if ($starter eq "orterun") {
268+
if ($starter eq "prun") {
265269
# need to start it
266-
if (-e "dvm_uri") {
267-
system("rm -f dvm_uri");
268-
}
269-
$cmd = "orte-dvm --report-uri dvm_uri 2>&1 &";
270+
$cmd = "orte-dvm -mca pmix_system_server 1 2>&1 &";
270271
if ($myresults) {
271272
print FILE "\n\n$cmd\n";
272273
}
273274
if (!$SHOWME) {
274275
system($cmd);
275-
# wait for the rendezvous file to appear
276-
while (! -e "dvm_uri") {
277-
sleep(1);
278-
}
279276
$havedvm = 1;
280277
}
278+
# give it a couple of seconds to start
279+
sleep 2;
281280
}
282281

283282
if ($myresults) {
@@ -298,7 +297,11 @@ ()
298297
$n = 1;
299298
while ($n <= $num_nodes) {
300299
push @csvrow,$n;
301-
$cmd = "time " . $starter . " " . $starteroptions[$index] . " $option $test 2>&1";
300+
if ($starter eq "prun" or $starter eq "mpirun") {
301+
$cmd = "time " . $starter . " " . $starteroptions[$index] . " $option -n $n $test 2>&1";
302+
} else {
303+
$cmd = "time " . $starter . " " . $starteroptions[$index] . " $option -N $n $test 2>&1";
304+
}
302305
print $cmd . "\n";
303306
if (!$SHOWME) {
304307
runcmd();
@@ -321,12 +324,9 @@ ()
321324
}
322325
if ($havedvm) {
323326
if (!$SHOWME) {
324-
$cmd = "orterun --hnp file:dvm_uri --terminate";
327+
$cmd = "prun --terminate";
325328
system($cmd);
326329
}
327-
if (-e "dvm_uri") {
328-
system("rm -f dvm_uri");
329-
}
330330
}
331331
$index = $index + 1;
332332
}

0 commit comments

Comments
 (0)