Skip to content

Commit c66b0c7

Browse files
authored
Merge pull request #13254 from jsquyres/pr/fix-the-python-configury-tests
configury: always require Python for building Open MPI
2 parents de208bd + a0b7bd1 commit c66b0c7

File tree

12 files changed

+35
-49
lines changed

12 files changed

+35
-49
lines changed

config/ompi_setup_mpi_fortran.m4

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -138,7 +138,9 @@ AC_DEFUN([OMPI_SETUP_MPI_FORTRAN],[
138138
AC_DEFINE([ompi_fortran_bogus_type_t], [int],
139139
[A bogus type that allows us to have sentinel type values that are still valid])
140140

141-
OMPI_FORTRAN_GET_COMMON_ALIGNMENT([OMPI_FORTRAN_COMMON_ALIGNMENT])
141+
AS_IF([test $ompi_fortran_happy -eq 1],
142+
[OMPI_FORTRAN_GET_COMMON_ALIGNMENT([OMPI_FORTRAN_COMMON_ALIGNMENT])],
143+
[OMPI_FORTRAN_COMMON_ALIGNMENT=0])
142144
AC_SUBST([OMPI_FORTRAN_COMMON_ALIGNMENT])
143145

144146
# We want to set the #define's for all of these, so invoke the macros

configure.ac

Lines changed: 11 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -66,6 +66,11 @@ OAC_PUSH_PREFIX([OPAL])
6666

6767
OPAL_CAPTURE_CONFIGURE_CLI([OPAL_CONFIGURE_CLI])
6868

69+
#
70+
# Init automake
71+
#
72+
AM_INIT_AUTOMAKE([foreign dist-bzip2 subdir-objects no-define 1.13.4 tar-pax])
73+
6974
# Get our platform support file. This has to be done very, very early
7075
# because it twiddles random bits of autoconf
7176
OPAL_LOAD_PLATFORM
@@ -93,24 +98,12 @@ AC_PROG_SED
9398

9499
AC_CHECK_PROG([PERL],[perl],[perl],[no])
95100
AS_IF([test "X$PERL" = "Xno"],
96-
[AC_MSG_ERROR([Open MPI requires perl to build. Aborting.])])
97-
98-
# We need Python if any of these are true:
99-
# - you're building the MPI Fortran bindings
100-
# - you're in a git clone (i.e., not a distribution tarball that has
101-
# already been bootstrapped)
102-
AC_MSG_CHECKING([if we need Python])
103-
AS_IF([test "$enable_mpi_fortran" = "yes"], [need_python=yes],
104-
[test -d "${OMPI_TOP_SRCDIR}/.git"], [need_python=yes],
105-
[need_python=no])
106-
AC_MSG_RESULT([$need_python])
107-
108-
AS_IF([test "$need_python" = "yes"],
109-
[AM_PATH_PYTHON([$python_min_version],
110-
[have_good_python=1],
111-
[AC_MSG_ERROR([Open MPI requires Python >=$python_min_version to build. Aborting.])])],
112-
[have_good_python=0])
113-
AM_CONDITIONAL(OMPI_GENERATE_BINDINGS, [test $have_good_python -eq 1])
101+
[AC_MSG_ERROR([Open MPI requires Perl 5 to build. Aborting.])])
102+
103+
# Check to see that we have a "good" version of Python (i.e., >= the
104+
# version specified in the top-level VERSION file)
105+
AM_PATH_PYTHON([$python_min_version], [],
106+
[AC_MSG_ERROR([Open MPI requires Python >= v$python_min_version to build. Aborting.])])
114107

115108
#
116109
# Setup some things that must be done before AM-INIT-AUTOMAKE
@@ -126,11 +119,6 @@ AS_IF([test "$host" != "$target"],
126119
AC_MSG_WARN([Proceed at your own risk!])])
127120

128121

129-
#
130-
# Init automake
131-
#
132-
AM_INIT_AUTOMAKE([foreign dist-bzip2 subdir-objects no-define 1.13.4 tar-pax])
133-
134122
# SILENT_RULES is new in AM 1.11, but we require 1.11 or higher via
135123
# autogen. Limited testing shows that calling SILENT_RULES directly
136124
# works in more cases than adding "silent-rules" to INIT_AUTOMAKE

docs/developers/prerequisites.rst

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -82,6 +82,11 @@ Open MPI still uses Perl for a few of its build scripts (most notably,
8282
Generally speaking, any recent-ish release of Perl 5 should be
8383
sufficient to correctly execute Open MPI's Perl scripts.
8484

85+
.. note:: The Open MPI community is slowly converting its Perl scripts
86+
to Python; it is expected (hoped) that we'll someday have no
87+
more Perl in the build process for official distribution
88+
tarballs or Git clones.
89+
8590
Flex
8691
----
8792

docs/installing-open-mpi/supported-systems.rst

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -31,9 +31,12 @@ systems to test these on, we probably will only claim to
3131
Perl and Python
3232
^^^^^^^^^^^^^^^
3333

34-
Open MPI requires Perl while building. If you are building the
35-
Fortran MPI bindings, or if you are building from a Git clone, Open
36-
MPI also requires Python >= |python_min_version| while building.
34+
Open MPI requires Perl 5 and Python >= |python_min_version| while
35+
building.
36+
37+
.. note:: Note that these requirements are only for *building* Open
38+
MPI itself. Open MPI does not require Perl or Python to
39+
build or run MPI or OSHMEM applications.
3740

3841
.. note:: The Open MPI community is slowly converting its Perl scripts
3942
to Python; it is expected (hoped) that we'll someday have no

ompi/include/Makefile.am

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -86,7 +86,7 @@ sizeof_py=$(top_srcdir)/ompi/mpi/fortran/base/gen-mpi-sizeof.py
8686
mpif-sizeof.h: $(top_builddir)/config.status
8787
mpif-sizeof.h: $(sizeof_py)
8888
mpif-sizeof.h:
89-
$(OMPI_V_GEN) $(python) $(sizeof_py) \
89+
$(OMPI_V_GEN) $(PYTHON) $(sizeof_py) \
9090
--header=$@ --ierror=mandatory \
9191
--maxrank=$(OMPI_FORTRAN_MAX_ARRAY_RANK) \
9292
--generate=$(OMPI_FORTRAN_BUILD_SIZEOF) \
@@ -107,7 +107,7 @@ mpif_mangling_py=$(top_srcdir)/ompi/mpi/fortran/base/gen-mpi-mangling.py
107107
mpif-c-constants-decl.h: $(top_builddir)/config.status
108108
mpif-c-constants-decl.h: $(mpif_mangling_py)
109109
mpif-c-constants-decl.h:
110-
$(OMPI_V_GEN) $(python) $(mpif_mangling_py) \
110+
$(OMPI_V_GEN) $(PYTHON) $(mpif_mangling_py) \
111111
--caps $(OMPI_FORTRAN_CAPS) \
112112
--plain $(OMPI_FORTRAN_PLAIN) \
113113
--single $(OMPI_FORTRAN_SINGLE_UNDERSCORE) \

ompi/mpi/c/Makefile.am

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -539,7 +539,6 @@ libmpi_c_noprofile_la_SOURCES = $(interface_profile_sources)
539539
libmpi_c_noprofile_la_CPPFLAGS = -DOMPI_BUILD_MPI_PROFILING=0
540540

541541
# ABI generation rules
542-
if OMPI_GENERATE_BINDINGS
543542
%_generated.c: %.c.in
544543
$(OMPI_V_GEN) $(PYTHON) $(top_srcdir)/ompi/mpi/bindings/bindings.py \
545544
--builddir $(abs_top_builddir) \
@@ -550,6 +549,5 @@ if OMPI_GENERATE_BINDINGS
550549
ompi \
551550
$<
552551

553-
endif
554552
# Delete generated files on maintainer-clean
555553
MAINTAINERCLEANFILES = *_generated.c

ompi/mpi/fortran/mpif-h/Makefile.am

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -121,7 +121,7 @@ sizeof_py = $(top_srcdir)/ompi/mpi/fortran/base/gen-mpi-sizeof.py
121121
sizeof_f.f90: $(top_builddir)/config.status
122122
sizeof_f.f90: $(sizeof_py)
123123
sizeof_f.f90:
124-
$(OMPI_V_GEN) $(python) $(sizeof_py) \
124+
$(OMPI_V_GEN) $(PYTHON) $(sizeof_py) \
125125
--impl=$@ --ierror=mandatory --mpi \
126126
--maxrank=$(OMPI_FORTRAN_MAX_ARRAY_RANK) \
127127
--generate=$(OMPI_FORTRAN_BUILD_SIZEOF) \

ompi/mpi/fortran/mpif-h/profile/Makefile.am

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -492,7 +492,7 @@ sizeof_py=$(top_srcdir)/ompi/mpi/fortran/base/gen-mpi-sizeof.py
492492
psizeof_f.f90: $(top_builddir)/config.status
493493
psizeof_f.f90: $(sizeof_py)
494494
psizeof_f.f90:
495-
$(OMPI_V_GEN) $(python) $(sizeof_py) \
495+
$(OMPI_V_GEN) $(PYTHON) $(sizeof_py) \
496496
--impl=$@ --ierror=mandatory --pmpi \
497497
--maxrank=$(OMPI_FORTRAN_MAX_ARRAY_RANK) \
498498
--generate=$(OMPI_FORTRAN_BUILD_SIZEOF) \

ompi/mpi/fortran/use-mpi-f08/Makefile.am

Lines changed: 4 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ AM_CPPFLAGS =
4646
# involves a user supplied buffer(s), and hence the need to generate
4747
# either assumed rank or assumed shape arrays with possible async
4848
# attributes, the *.c.in method needs to be used. Otherwise a *.F90
49-
# file can be used. In addition, the mod/mpi-f08-rename.h file
49+
# file can be used. In addition, the mod/mpi-f08-rename.h file
5050
# will need to be updated to include a rename line for the new method.
5151
#
5252
if OMPI_BUILD_FORTRAN_USEMPIF08_BINDINGS
@@ -85,7 +85,7 @@ sizeof_py=$(top_srcdir)/ompi/mpi/fortran/base/gen-mpi-sizeof.py
8585
sizeof_f08.h: $(top_builddir)/config.status
8686
sizeof_f08.h: $(sizeof_py)
8787
sizeof_f08.h:
88-
$(OMPI_V_GEN) $(python) $(sizeof_py) \
88+
$(OMPI_V_GEN) $(PYTHON) $(sizeof_py) \
8989
--header=$@ --ierror=optional \
9090
--maxrank=$(OMPI_FORTRAN_MAX_ARRAY_RANK) \
9191
--generate=$(OMPI_FORTRAN_BUILD_SIZEOF) \
@@ -100,7 +100,7 @@ sizeof_f08.h:
100100
sizeof_f08.f90: $(top_builddir)/config.status
101101
sizeof_f08.f90: $(sizeof_py)
102102
sizeof_f08.f90:
103-
$(OMPI_V_GEN) $(python) $(sizeof_py) \
103+
$(OMPI_V_GEN) $(PYTHON) $(sizeof_py) \
104104
--impl=$@ --ierror=optional --mpi \
105105
--maxrank=$(OMPI_FORTRAN_MAX_ARRAY_RANK) \
106106
--generate=$(OMPI_FORTRAN_BUILD_SIZEOF) \
@@ -113,7 +113,7 @@ sizeof_f08.f90:
113113
psizeof_f08.f90: $(top_builddir)/config.status
114114
psizeof_f08.f90: $(sizeof_py)
115115
psizeof_f08.f90:
116-
$(OMPI_V_GEN) $(python) $(sizeof_py) \
116+
$(OMPI_V_GEN) $(PYTHON) $(sizeof_py) \
117117
--impl=$@ --ierror=optional --pmpi \
118118
--maxrank=$(OMPI_FORTRAN_MAX_ARRAY_RANK) \
119119
--generate=$(OMPI_FORTRAN_BUILD_SIZEOF) \
@@ -431,8 +431,6 @@ lib@OMPI_LIBMPI_NAME@_usempif08_profile_la_FCFLAGS = \
431431
# *.in template.
432432
#
433433

434-
if OMPI_GENERATE_BINDINGS
435-
436434
include Makefile.prototype_files
437435
template_files =${prototype_files:%=$(abs_top_srcdir)/ompi/mpi/fortran/use-mpi-f08/%}
438436

@@ -453,8 +451,6 @@ api_f08_generated.F90: $(template_files)
453451

454452
EXTRA_DIST = $(prototype_files)
455453

456-
endif
457-
458454
# Delete generated file on maintainer-clean
459455
MAINTAINERCLEANFILES = api_f08_generated.F90
460456

ompi/mpi/fortran/use-mpi-f08/base/Makefile.am

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,6 @@ endif
4646
# api_f08_generated.c should work with all compilers, supporting CFI or TS 29113 support
4747
# through macros in ts.h and ts.c.
4848
#
49-
if OMPI_GENERATE_BINDINGS
5049

5150
include ../Makefile.prototype_files
5251
template_files =${prototype_files:%=$(abs_top_srcdir)/ompi/mpi/fortran/use-mpi-f08/%}
@@ -61,8 +60,6 @@ api_f08_generated.c: $(template_files)
6160
--lang c \
6261
--prototype-files $(template_files)
6362

64-
endif
65-
6663
# Delete generated files on maintainer-clean
6764
MAINTAINERCLEANFILES = api_f08_generated.c
6865

ompi/mpi/fortran/use-mpi-f08/mod/Makefile.am

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,6 @@ config_h = \
7777
$(top_srcdir)/ompi/mpi/fortran/configure-fortran-output-bottom.h
7878

7979
# Generate the Fortran interfaces
80-
if OMPI_GENERATE_BINDINGS
8180

8281
include ../Makefile.prototype_files
8382
template_files =${prototype_files:%=$(abs_top_srcdir)/ompi/mpi/fortran/use-mpi-f08/%}
@@ -97,8 +96,6 @@ mpi-f08-interfaces-generated.h: $(template_files)
9796
interface \
9897
--prototype-files $(template_files)
9998

100-
endif
101-
10299
# Delete generated file on maintainer-clean
103100
MAINTAINERCLEANFILES = mpi-f08-interfaces-generated.h
104101

ompi/mpi/fortran/use-mpi-ignore-tkr/Makefile.am

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -99,7 +99,7 @@ sizeof_py=$(top_srcdir)/ompi/mpi/fortran/base/gen-mpi-sizeof.py
9999
mpi-ignore-tkr-sizeof.h: $(top_builddir)/config.status
100100
mpi-ignore-tkr-sizeof.h: $(sizeof_py)
101101
mpi-ignore-tkr-sizeof.h:
102-
$(OMPI_V_GEN) $(python) $(sizeof_py) \
102+
$(OMPI_V_GEN) $(PYTHON) $(sizeof_py) \
103103
--header=$@ --ierror=mandatory \
104104
--maxrank=$(OMPI_FORTRAN_MAX_ARRAY_RANK) \
105105
--generate=$(OMPI_FORTRAN_BUILD_SIZEOF) \
@@ -114,7 +114,7 @@ mpi-ignore-tkr-sizeof.h:
114114
mpi-ignore-tkr-sizeof.f90: $(top_builddir)/config.status
115115
mpi-ignore-tkr-sizeof.f90: $(sizeof_py)
116116
mpi-ignore-tkr-sizeof.f90:
117-
$(OMPI_V_GEN) $(python) $(sizeof_py) \
117+
$(OMPI_V_GEN) $(PYTHON) $(sizeof_py) \
118118
--impl=$@ --ierror=mandatory --mpi --pmpi \
119119
--maxrank=$(OMPI_FORTRAN_MAX_ARRAY_RANK) \
120120
--generate=$(OMPI_FORTRAN_BUILD_SIZEOF) \

0 commit comments

Comments
 (0)