Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Rework how Open MPI integrates with 3rd party packages #8069

Merged
merged 7 commits into from
Oct 1, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
21 changes: 16 additions & 5 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,15 @@

Makefile
Makefile.in

# hwloc and pmix have been de-modularized, but still uses parts of the
# MCA system due to the amount of glue code that ended up in the
# framework base. Until that is cleaned up, do not ignore the
# hard-coded static-components.h file.
static-components.h
!opal/mca/hwloc/base/static-components.h
!opal/mca/pmix/base/static-components.h

*\\#
config.cache
aclocal.m4
Expand Down Expand Up @@ -90,6 +98,14 @@ ltsugar.m4
ltversion.m4
ltoptions.m4

# Libevent and hwloc are included as a tarball. Ignore any expanded
# tarballs, since they are not included in git. Do not ignore the
# tarballs themselves, and those are artifacts we will store in git.
3rd-party/libevent-*
!3rd-party/libevent-*.tar.*
3rd-party/hwloc-*
!3rd-party/hwloc-*.tar.*

config/project_list.m4
config/autogen_found_items.m4
config/opal_get_version.sh
Expand Down Expand Up @@ -367,11 +383,6 @@ opal/mca/event/libevent*/libevent/libevent_openssl.pc
opal/mca/event/libevent*/libevent/libevent_pthreads.pc
opal/mca/event/libevent*/libevent/include/event2/event-config.h

opal/mca/hwloc/hwloc*/hwloc/include/hwloc/autogen/config.h
opal/mca/hwloc/hwloc*/hwloc/include/private/autogen/config.h
opal/mca/hwloc/base/static-components.h.new.extern
opal/mca/hwloc/base/static-components.h.new.struct

opal/mca/installdirs/config/install_dirs.h

!opal/mca/pmix/pmix*/openpmix/AUTHORS
Expand Down
7 changes: 2 additions & 5 deletions .gitmodules
Original file line number Diff line number Diff line change
@@ -1,11 +1,8 @@
[submodule "hwloc-20x"]
path = opal/mca/hwloc/hwloc2/hwloc
url = https://github.com/open-mpi/hwloc.git
[submodule "prrte"]
path = prrte
path = 3rd-party/prrte
url = https://github.com/openpmix/prrte
branch = master
[submodule "openpmix"]
path = opal/mca/pmix/pmix4x/openpmix
path = 3rd-party/openpmix
url = https://github.com/openpmix/openpmix.git
branch = master
28 changes: 28 additions & 0 deletions 3rd-party/Makefile.am
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
#
# Copyright (c) 2020 Amazon.com, Inc. or its affiliates.
# All Rights reserved.
# $COPYRIGHT$
#
# Additional copyrights may follow
#
# $HEADER$
#
# This Makefile exists (as opposed to being part of the top level
# Makefile) solely to have a blank check-recursive rule. Otherwise, the
# stability of Open MPI's ability to run "make check" or "make
# distcheck" is dependent on the ability of our 3rd-party packages to
# do the same. Libevent's tests are not stable enough for that kind
# of choice.

SUBDIRS = $(OPAL_3RDPARTY_SUBDIRS)
DIST_SUBDIRS = $(OPAL_3RDPARTY_DIST_SUBDIRS)
EXTRA_DIST = $(OPAL_3RDPARTY_EXTRA_DIST)

distclean-local:
rm -rf $(OPAL_3RDPARTY_DISTCLEAN_DIRS)

check:
@echo "auto-recursing into 3rd-party packages for check disabled"

check-recursive:
@echo "auto-recursing into 3rd-party packages for check disabled"
Binary file added 3rd-party/hwloc-2.2.0.tar.gz
Binary file not shown.
Binary file added 3rd-party/libevent-2.1.12-stable.tar.gz
Binary file not shown.
1 change: 1 addition & 0 deletions 3rd-party/openpmix
Submodule openpmix added at 952a98
1 change: 1 addition & 0 deletions 3rd-party/prrte
Submodule prrte added at 545863
2 changes: 1 addition & 1 deletion LICENSE
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ Copyright (c) 2014-2015 Hewlett-Packard Development Company, LP. All
rights reserved.
Copyright (c) 2013-2017 Research Organization for Information Science (RIST).
All rights reserved.
Copyright (c) 2017-2018 Amazon.com, Inc. or its affiliates. All Rights
Copyright (c) 2017-2020 Amazon.com, Inc. or its affiliates. All Rights
reserved.
Copyright (c) 2018 DataDirect Networks. All rights reserved.
Copyright (c) 2018-2019 Triad National Security, LLC. All rights reserved.
Expand Down
16 changes: 5 additions & 11 deletions Makefile.am
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
# Copyright (c) 2006-2016 Cisco Systems, Inc. All rights reserved.
# Copyright (c) 2012-2015 Los Alamos National Security, Inc. All rights reserved.
# Copyright (c) 2014-2019 Intel, Inc. All rights reserved.
# Copyright (c) 2017-2018 Amazon.com, Inc. or its affiliates.
# Copyright (c) 2017-2020 Amazon.com, Inc. or its affiliates.
# All Rights reserved.
# Copyright (c) 2020 IBM Corporation. All rights reserved.
# $COPYRIGHT$
Expand All @@ -22,15 +22,8 @@
# $HEADER$
#

SUBDIRS = config contrib $(MCA_PROJECT_SUBDIRS) test
if OMPI_WANT_PRRTE
SUBDIRS += prrte
endif

DIST_SUBDIRS = config contrib $(MCA_PROJECT_DIST_SUBDIRS) test
if OMPI_WANT_PRRTE
DIST_SUBDIRS += prrte
endif
SUBDIRS = config contrib 3rd-party $(MCA_PROJECT_SUBDIRS) test
DIST_SUBDIRS = config contrib 3rd-party $(MCA_PROJECT_DIST_SUBDIRS) test
EXTRA_DIST = README INSTALL VERSION Doxyfile LICENSE autogen.pl README.JAVA.txt AUTHORS

include examples/Makefile.include
Expand All @@ -50,7 +43,8 @@ install-exec-hook:
--brief \
--top_builddir=$(top_builddir) \
--top_srcdir=$(top_srcdir) \
--objext=$(OBJEXT); \
--objext=$(OBJEXT) \
--skipdir=3rd-party ; \
fi

ACLOCAL_AMFLAGS = -I config
Expand Down
99 changes: 88 additions & 11 deletions autogen.pl
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,8 @@
# Copyright (c) 2015-2019 Research Organization for Information Science
# and Technology (RIST). All rights reserved.
# Copyright (c) 2015-2020 IBM Corporation. All rights reserved.
# Copyright (c) 2020 Amazon.com, Inc. or its affiliates.
# All Rights reserved.
#
# $COPYRIGHT$
#
Expand Down Expand Up @@ -49,6 +51,7 @@
my $no_orte_arg = 0;
my $no_prrte_arg = 0;
my $no_oshmem_arg = 0;
my $no_3rdparty_arg = "";
my $quiet_arg = 0;
my $debug_arg = 0;
my $help_arg = 0;
Expand All @@ -72,6 +75,10 @@
my $ompi_automake_search = "automake";
my $ompi_libtoolize_search = "libtoolize;glibtoolize";

# version of packages we ship as tarballs
my $libevent_version="2.1.12-stable";
my $hwloc_version="2.2.0";

# One-time setup
my $username;
my $hostname;
Expand Down Expand Up @@ -1125,6 +1132,7 @@ sub in_tarball {
"no-orte" => \$no_orte_arg,
"no-prrte" => \$no_prrte_arg,
"no-oshmem" => \$no_oshmem_arg,
"no-3rdparty=s" => \$no_3rdparty_arg,
"quiet|q" => \$quiet_arg,
"debug|d" => \$debug_arg,
"help|h" => \$help_arg,
Expand All @@ -1143,6 +1151,7 @@ sub in_tarball {
--no-orte | -no-orte Do not build Open MPI's runtime support (alias for --no-prrte)
--no-prrte | -no-prrte Do not build Open MPI's runtime support
--no-oshmem | -no-oshmem Do not build the OSHMEM layer
--no-3rdparty <package> Do not build the listed 3rd-party package (comma separtated list)
--quiet | -q Do not display normal verbose output
--debug | -d Output lots of debug information
--help | -h This help list
Expand Down Expand Up @@ -1170,10 +1179,6 @@ sub in_tarball {
$no_ompi_arg = 1;
debug "No ompi subdirectory found - will not build MPI layer\n";
}
if (! -e "prrte") {
$no_prrte_arg = 1;
debug "No prrte subdirectory found - will not build PRRTE\n";
}
if (! -e "oshmem") {
$no_oshmem_arg = 1;
debug "No oshmem subdirectory found - will not build OSHMEM\n";
Expand Down Expand Up @@ -1406,9 +1411,6 @@ sub in_tarball {
foreach my $p (@$projects) {
$m4 .= "m4_define([project_$p->{name}], [1])\n";
}
if (!$no_prrte_arg) {
$m4 .= "m4_define([project_prrte], [1])\n";
}

$m4 .= "\ndnl Project names
m4_define([project_name_long], [$project_name_long])
Expand All @@ -1419,6 +1421,85 @@ sub in_tarball {

#---------------------------------------------------------------------------

# Handle 3rd-party packages
++$step;
verbose "\n$step. Setup for 3rd-party packages\n";

my @enabled_3rdparty_packages = ();
my @disabled_3rdparty_packages = split(/,/, $no_3rdparty_arg);
if ($no_prrte_arg) {
push(@disabled_3rdparty_packages, "prrte");
}

$m4 .= "\n$dnl_line
$dnl_line
$dnl_line

dnl 3rd-party package information\n";

# these are fairly one-off, so we did not try to do anything
# generic. Sorry :).

verbose "=== Libevent\n";
if ("libevent" ~~ @disabled_3rdparty_packages) {
verbose "--- Libevent disabled\n";
} else {
my $libevent_directory = "libevent-" . $libevent_version;
my $libevent_tarball = $libevent_directory . ".tar.gz";
if (! -f "3rd-party/" . $libevent_tarball) {
my_die("Could not find libevent tarball\n");
}
$m4 .= "m4_define([package_libevent], [1])\n";
$m4 .= "m4_define([libevent_tarball], [" . $libevent_tarball . "])\n";
$m4 .= "m4_define([libevent_directory], [" . $libevent_directory . "])\n";
verbose "--- Libevent enabled (" . $libevent_version . ")\n";
}

verbose "=== hwloc\n";
if ("hwloc" ~~ @disabled_3rdparty_packages) {
verbose "--- hwloc disabled\n";
} else {
my $hwloc_directory = "hwloc-" . $hwloc_version;
my $hwloc_tarball = $hwloc_directory . ".tar.gz";
if (! -f "3rd-party/" . $hwloc_tarball) {
my_die("Could not find hwloc tarball\n");
}
$m4 .= "m4_define([package_hwloc], [1])\n";
$m4 .= "m4_define([hwloc_tarball], [" . $hwloc_tarball . "])\n";
$m4 .= "m4_define([hwloc_directory], [" . $hwloc_directory . "])\n";
verbose "--- hwloc enabled\n";
}

verbose "=== PMIx\n";
if ("pmix" ~~ @disabled_3rdparty_packages) {
verbose "--- PMIx disabled\n";
} else {
# sanity check pmix files exist
if (! -f "3rd-party/openpmix/configure.ac") {
my_die("Could not find pmix files\n");
}
push(@subdirs, "3rd-party/openpmix/");
$m4 .= "m4_define([package_pmix], [1])\n";
verbose "--- PMIx enabled\n";
}

verbose "=== PRRTE\n";
if ("prrte" ~~ @disabled_3rdparty_packages) {
verbose "--- PRRTE disabled\n";
} else {
# sanity check prrte files exist
if (! -f "3rd-party/prrte/configure.ac") {
my_die("Could not find pmix files\n");
}
push(@subdirs, "3rd-party/prrte/");
$m4 .= "m4_define([package_prrte], [1])\n";
verbose "--- PRRTE enabled\n";
}

$m4 .= "\n";

#---------------------------------------------------------------------------

# Find MPI extensions and contribs
if (!$no_ompi_arg) {
++$step;
Expand All @@ -1436,10 +1517,6 @@ sub in_tarball {
++$step;
verbose "\n$step. Processing autogen.subdirs directories\n";

if (!$no_prrte_arg) {
process_autogen_subdirs(".");
}

if ($#subdirs >= 0) {
foreach my $d (@subdirs) {
process_subdir($d);
Expand Down
Loading