Skip to content

Fortran fixes #7265

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

Merged
merged 2 commits into from
Feb 4, 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
3 changes: 2 additions & 1 deletion config/ompi_config_files.m4
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# -*- shell-script -*-
#
# Copyright (c) 2009-2017 Cisco Systems, Inc. All rights reserved
# Copyright (c) 2009-2019 Cisco Systems, Inc. All rights reserved
# Copyright (c) 2017-2018 Research Organization for Information Science
# and Technology (RIST). All rights reserved.
# Copyright (c) 2018 Los Alamos National Security, LLC. All rights
Expand Down Expand Up @@ -38,6 +38,7 @@ AC_DEFUN([OMPI_CONFIG_FILES],[
ompi/mpi/fortran/use-mpi-ignore-tkr/mpi-ignore-tkr-file-interfaces.h
ompi/mpi/fortran/use-mpi-ignore-tkr/mpi-ignore-tkr-removed-interfaces.h
ompi/mpi/fortran/use-mpi-f08/Makefile
ompi/mpi/fortran/use-mpi-f08/base/Makefile
ompi/mpi/fortran/use-mpi-f08/bindings/Makefile
ompi/mpi/fortran/use-mpi-f08/mod/Makefile
ompi/mpi/fortran/mpiext-use-mpi/Makefile
Expand Down
4 changes: 3 additions & 1 deletion ompi/Makefile.am
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
# University of Stuttgart. All rights reserved.
# Copyright (c) 2004-2005 The Regents of the University of California.
# All rights reserved.
# Copyright (c) 2008-2017 Cisco Systems, Inc. All rights reserved
# Copyright (c) 2008-2019 Cisco Systems, Inc. All rights reserved
# Copyright (c) 2008 Sun Microsystems, Inc. All rights reserved.
# Copyright (c) 2010-2011 Sandia National Laboratories. All rights reserved.
# Copyright (c) 2013-2015 Los Alamos National Security, LLC. All rights
Expand Down Expand Up @@ -92,6 +92,7 @@ SUBDIRS = \
$(OMPI_MPIEXT_USEMPI_DIR) \
$(OMPI_FORTRAN_USEMPI_DIR) \
mpi/fortran/mpiext-use-mpi \
mpi/fortran/use-mpi-f08/base \
mpi/fortran/use-mpi-f08/mod \
mpi/fortran/use-mpi-f08/bindings \
$(OMPI_MPIEXT_USEMPIF08_DIRS) \
Expand Down Expand Up @@ -124,6 +125,7 @@ DIST_SUBDIRS = \
mpi/fortran/use-mpi-ignore-tkr \
mpi/fortran/mpiext-use-mpi \
mpi/fortran/use-mpi-f08 \
mpi/fortran/use-mpi-f08/base \
mpi/fortran/use-mpi-f08/mod \
mpi/fortran/use-mpi-f08/bindings \
mpi/fortran/mpiext-use-mpi-f08 \
Expand Down
11 changes: 9 additions & 2 deletions ompi/mpi/fortran/mpiext-use-mpi-f08/Makefile.am
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#
# Copyright (c) 2012 Cisco Systems, Inc. All rights reserved.
# Copyright (c) 2012-2019 Cisco Systems, Inc. All rights reserved.
# Copyright (c) 2017 Research Organization for Information Science
# and Technology (RIST). All rights reserved.
# Copyright (c) 2018 FUJITSU LIMITED. All rights reserved.
Expand All @@ -10,6 +10,13 @@
# $HEADER$
#

# Note that Automake's Fortran-buidling rules uses CPPFLAGS and
# AM_CPPFLAGS. This can cause weirdness (e.g.,
# https://github.com/open-mpi/ompi/issues/7253). Let's just zero
# those out and rely on AM_FCFLAGS.
CPPFLAGS =
AM_CPPFLAGS =

#
# Only do the stuff in this file if we're going to build
# the mpi_f08 ext modules.
Expand All @@ -23,7 +30,7 @@ AM_FCFLAGS = -I$(top_builddir)/ompi/include -I$(top_srcdir)/ompi/include \
$(OMPI_FC_MODULE_FLAG)$(top_builddir)/ompi/mpi/fortran/base \
$(OMPI_FC_MODULE_FLAG)$(top_builddir)/ompi/mpi/fortran/use-mpi-f08/mod \
$(OMPI_FC_MODULE_FLAG)$(top_builddir)/ompi/mpi/fortran/use-mpi-f08 \
-I$(top_srcdir) $(FCFLAGS_f90)
-I$(top_srcdir) -I$(top_builddir) $(FCFLAGS_f90)

flibs =

Expand Down
11 changes: 9 additions & 2 deletions ompi/mpi/fortran/mpiext-use-mpi/Makefile.am
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#
# Copyright (c) 2012 Cisco Systems, Inc. All rights reserved.
# Copyright (c) 2012-2019 Cisco Systems, Inc. All rights reserved.
# Copyright (c) 2017 Research Organization for Information Science
# and Technology (RIST). All rights reserved.
# Copyright (c) 2018 FUJITSU LIMITED. All rights reserved.
Expand All @@ -10,6 +10,13 @@
# $HEADER$
#

# Note that Automake's Fortran-buidling rules uses CPPFLAGS and
# AM_CPPFLAGS. This can cause weirdness (e.g.,
# https://github.com/open-mpi/ompi/issues/7253). Let's just zero
# those out and rely on AM_FCFLAGS.
CPPFLAGS =
AM_CPPFLAGS =

#
# Only do the stuff in this file if we're going to build
# the mpi ext modules.
Expand All @@ -22,7 +29,7 @@ if OMPI_BUILD_FORTRAN_USEMPI_OR_USEMPIF08_EXT
AM_FCFLAGS = -I$(top_builddir)/ompi/include -I$(top_srcdir)/ompi/include \
$(OMPI_FC_MODULE_FLAG)$(top_builddir)/ompi/mpi/fortran/base \
$(OMPI_FC_MODULE_FLAG)$(top_builddir)/ompi/mpi/fortran/use-mpi-ignore-tkr \
-I$(top_srcdir) $(FCFLAGS_f90)
-I$(top_srcdir) -I$(top_builddir) $(FCFLAGS_f90)

flibs =

Expand Down
21 changes: 16 additions & 5 deletions ompi/mpi/fortran/use-mpi-f08/Makefile.am
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# -*- makefile.am -*-
#
# Copyright (c) 2006-2015 Cisco Systems, Inc. All rights reserved.
# Copyright (c) 2006-2019 Cisco Systems, Inc. All rights reserved.
# Copyright (c) 2012-2013 The University of Tennessee and The University
# of Tennessee Research Foundation. All rights
# reserved.
Expand All @@ -23,6 +23,13 @@

include $(top_srcdir)/Makefile.ompi-rules

# Note that Automake's Fortran-buidling rules uses CPPFLAGS and
# AM_CPPFLAGS. This can cause weirdness (e.g.,
# https://github.com/open-mpi/ompi/issues/7253). Let's just zero
# those out and rely on AM_FCFLAGS.
CPPFLAGS =
AM_CPPFLAGS =

# This Makefile is only relevant if we're building the "use mpi_f08"
# MPI bindings.
if OMPI_BUILD_FORTRAN_USEMPIF08_BINDINGS
Expand All @@ -32,7 +39,7 @@ AM_FCFLAGS = -I$(top_builddir)/ompi/include \
$(OMPI_FC_MODULE_FLAG)$(top_builddir)/ompi/$(OMPI_FORTRAN_USEMPI_DIR) \
$(OMPI_FC_MODULE_FLAG)mod \
$(OMPI_FC_MODULE_FLAG)bindings \
-I$(top_srcdir) $(FCFLAGS_f90)
-I$(top_srcdir) -I$(top_builddir) $(FCFLAGS_f90)

MOSTLYCLEANFILES = *.mod

Expand Down Expand Up @@ -801,8 +808,7 @@ pmpi_api_files = \
lib@OMPI_LIBMPI_NAME@_usempif08_la_SOURCES = \
$(mpi_api_files) \
$(pmpi_api_files) \
mpi-f08.F90 \
buffer_detach.c
mpi-f08.F90

# These are generated; do not ship them
nodist_lib@OMPI_LIBMPI_NAME@_usempif08_la_SOURCES =
Expand All @@ -818,12 +824,17 @@ endif
#
# Include the mpi_f08-based MPI extensions in libmpi_usempif08, too.
#
# Also include the one .c file that we need in this library -- because
# we zero out CPPFLAGS and AM_CPPFLAGS in this Makefile.am, we have to
# compile that .c file in a separate directory / Makefile.
#

lib@OMPI_LIBMPI_NAME@_usempif08_la_LIBADD = \
$(OMPI_MPIEXT_USEMPIF08_LIBS) \
$(top_builddir)/ompi/mpi/fortran/mpif-h/lib@OMPI_LIBMPI_NAME@_mpifh.la \
$(top_builddir)/ompi/lib@[email protected] \
mod/libusempif08_internal_modules.la
mod/libusempif08_internal_modules.la \
base/libusempif08_ccode.la
lib@OMPI_LIBMPI_NAME@_usempif08_la_DEPENDENCIES = $(module_sentinel_files)
lib@OMPI_LIBMPI_NAME@_usempif08_la_LDFLAGS = -version-info $(libmpi_usempif08_so_version)

Expand Down
34 changes: 34 additions & 0 deletions ompi/mpi/fortran/use-mpi-f08/base/Makefile.am
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
# -*- makefile -*-
#
# Copyright (c) 2019 Cisco Systems, Inc. All rights reserved.
#
# $COPYRIGHT$
#
# Additional copyrights may follow
#
# $HEADER$
#

include $(top_srcdir)/Makefile.ompi-rules

# This Makefile is only relevant if we're building the "use mpi_f08"
# MPI bindings.
if OMPI_BUILD_FORTRAN_USEMPIF08_BINDINGS

# This directory only exists so that we can separate C compilation
# from Fortran compilation. Specifically: note that Automake's
# Fortran-buidling rules uses CPPFLAGS and AM_CPPFLAGS. This can
# cause weirdness (e.g.,
# https://github.com/open-mpi/ompi/issues/7253). So when compiling
# Fortran, we should zero out CPPFLAGS and AM_CPPFLAGS.

# HOWEVER, we have one .c file in the use-mpi-f08 library. So we have
# to split it out to its own directory / Makefile.am where CPPFLAGS /
# AM_CPPFLAGS are *not* zeroed out.

noinst_LTLIBRARIES = libusempif08_ccode.la

libusempif08_ccode_la_SOURCES = \
buffer_detach.c

endif
11 changes: 9 additions & 2 deletions ompi/mpi/fortran/use-mpi-f08/bindings/Makefile.am
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# -*- makefile -*-
#
# Copyright (c) 2006-2015 Cisco Systems, Inc. All rights reserved.
# Copyright (c) 2006-2019 Cisco Systems, Inc. All rights reserved.
# Copyright (c) 2012-2013 The University of Tennessee and The University
# of Tennessee Research Foundation. All rights
# reserved.
Expand All @@ -20,6 +20,13 @@

include $(top_srcdir)/Makefile.ompi-rules

# Note that Automake's Fortran-buidling rules uses CPPFLAGS and
# AM_CPPFLAGS. This can cause weirdness (e.g.,
# https://github.com/open-mpi/ompi/issues/7253). Let's just zero
# those out and rely on AM_FCFLAGS.
CPPFLAGS =
AM_CPPFLAGS =

# This Makefile is only relevant if we're building the "use mpi_f08"
# MPI bindings.
if OMPI_BUILD_FORTRAN_USEMPIF08_BINDINGS
Expand All @@ -29,7 +36,7 @@ AM_FCFLAGS = -I$(top_builddir)/ompi/include \
$(OMPI_FC_MODULE_FLAG)$(top_builddir)/ompi/$(OMPI_FORTRAN_USEMPI_DIR) \
$(OMPI_FC_MODULE_FLAG). \
$(OMPI_FC_MODULE_FLAG)../mod \
-I$(top_srcdir) $(FCFLAGS_f90)
-I$(top_srcdir) -I$(top_builddir) $(FCFLAGS_f90)

MOSTLYCLEANFILES = *.mod

Expand Down
11 changes: 9 additions & 2 deletions ompi/mpi/fortran/use-mpi-f08/mod/Makefile.am
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# -*- makefile -*-
#
# Copyright (c) 2006-2015 Cisco Systems, Inc. All rights reserved.
# Copyright (c) 2006-2019 Cisco Systems, Inc. All rights reserved.
# Copyright (c) 2012-2013 The University of Tennessee and The University
# of Tennessee Research Foundation. All rights
# reserved.
Expand All @@ -20,6 +20,13 @@

include $(top_srcdir)/Makefile.ompi-rules

# Note that Automake's Fortran-buidling rules uses CPPFLAGS and
# AM_CPPFLAGS. This can cause weirdness (e.g.,
# https://github.com/open-mpi/ompi/issues/7253). Let's just zero
# those out and rely on AM_FCFLAGS.
CPPFLAGS =
AM_CPPFLAGS =

# This Makefile is only relevant if we're building the "use mpi_f08"
# MPI bindings.
if OMPI_BUILD_FORTRAN_USEMPIF08_BINDINGS
Expand All @@ -28,7 +35,7 @@ AM_FCFLAGS = -I$(top_builddir)/ompi/include \
-I$(top_srcdir)/ompi/include \
$(OMPI_FC_MODULE_FLAG)$(top_builddir)/ompi/$(OMPI_FORTRAN_USEMPI_DIR) \
$(OMPI_FC_MODULE_FLAG). \
-I$(top_srcdir) $(FCFLAGS_f90)
-I$(top_srcdir) -I$(top_builddir) $(FCFLAGS_f90)

MOSTLYCLEANFILES = *.mod

Expand Down
11 changes: 8 additions & 3 deletions ompi/mpi/fortran/use-mpi-ignore-tkr/Makefile.am
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# -*- makefile -*-
#
# Copyright (c) 2006-2015 Cisco Systems, Inc. All rights reserved.
# Copyright (c) 2006-2019 Cisco Systems, Inc. All rights reserved.
# Copyright (c) 2015-2018 Research Organization for Information Science
# and Technology (RIST). All rights reserved.
# Copyright (c) 2016 IBM Corporation. All rights reserved.
Expand All @@ -15,12 +15,17 @@

include $(top_srcdir)/Makefile.ompi-rules

# Note that Automake's Fortran-buidling rules uses CPPFLAGS and
# AM_CPPFLAGS. This can cause weirdness (e.g.,
# https://github.com/open-mpi/ompi/issues/7253). Let's just zero
# those out and rely on AM_FCFLAGS.
CPPFLAGS =
AM_CPPFLAGS =

# This Makefile is only relevant if we're building the ignore-TKR "use
# mpi" MPI bindings.
if OMPI_BUILD_FORTRAN_USEMPI_IGNORE_TKR_BINDINGS

AM_CPPFLAGS = -DOMPI_PROFILE_LAYER=0 -DOMPI_COMPILING_FORTRAN_WRAPPERS=1

AM_FCFLAGS = -I$(top_builddir)/ompi/include -I$(top_srcdir)/ompi/include \
-I$(top_builddir) -I$(top_srcdir) $(FCFLAGS_f90)

Expand Down
11 changes: 9 additions & 2 deletions ompi/mpi/fortran/use-mpi-tkr/Makefile.am
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
# University of Stuttgart. All rights reserved.
# Copyright (c) 2004-2005 The Regents of the University of California.
# All rights reserved.
# Copyright (c) 2006-2018 Cisco Systems, Inc. All rights reserved
# Copyright (c) 2006-2019 Cisco Systems, Inc. All rights reserved
# Copyright (c) 2007 Los Alamos National Security, LLC. All rights
# reserved.
# Copyright (c) 2014-2016 Research Organization for Information Science
Expand All @@ -32,6 +32,13 @@ include $(top_srcdir)/Makefile.ompi-rules
# this directory -- instead, they compile
# ompi/fortran/use-mpi-ignore-tkr.

# Note that Automake's Fortran-buidling rules uses CPPFLAGS and
# AM_CPPFLAGS. This can cause weirdness (e.g.,
# https://github.com/open-mpi/ompi/issues/7253). Let's just zero
# those out and rely on AM_FCFLAGS.
CPPFLAGS =
AM_CPPFLAGS =

if OMPI_BUILD_FORTRAN_USEMPI_TKR_BINDINGS

########################################################################
Expand All @@ -41,7 +48,7 @@ if OMPI_BUILD_FORTRAN_USEMPI_TKR_BINDINGS
# current directory) because it is generated.

AM_FCFLAGS = -I$(top_builddir)/ompi/include -I$(top_srcdir)/ompi/include \
$(OMPI_FC_MODULE_FLAG). -I$(srcdir) -I. \
$(OMPI_FC_MODULE_FLAG). -I$(top_srcdir) -I$(top_builddir) -I. \
-I$(top_builddir)/ompi/mpi/fortran/use-mpi-tkr $(FCFLAGS_f90)

# Do different things if the top-level configure decided that we're
Expand Down
13 changes: 10 additions & 3 deletions ompi/mpiext/pcollreq/use-mpi-f08/Makefile.am
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#
# Copyright (c) 2011-2012 Cisco Systems, Inc. All rights reserved.
# Copyright (c) 2017-2018 Research Organization for Information Science
# and Technology (RIST). All rights reserved.
# Copyright (c) 2017-2019 Research Organization for Information Science
# and Technology (RIST). All rights reserved.
# Copyright (c) 2018 FUJITSU LIMITED. All rights reserved.
# $COPYRIGHT$
#
Expand All @@ -13,10 +13,17 @@
# This file builds the use_mpi_f08-based bindings for MPI extensions. It
# is optional in MPI extensions.

# Note that Automake's Fortran-buidling rules uses CPPFLAGS and
# AM_CPPFLAGS. This can cause weirdness (e.g.,
# https://github.com/open-mpi/ompi/issues/7253). Let's just zero
# those out and rely on AM_FCFLAGS.
CPPFLAGS =
AM_CPPFLAGS =

# We must set these #defines and include paths so that the inner OMPI
# MPI prototype header files do the Right Thing.
AM_FCFLAGS = $(OMPI_FC_MODULE_FLAG)$(top_builddir)/ompi/mpi/fortran/use-mpi-f08/mod \
-I$(top_srcdir) $(FCFLAGS_f90)
-I$(top_builddir) -I$(top_srcdir) $(FCFLAGS_f90)

# Note that the mpi_f08-based bindings are optional -- they can only
# be built if OMPI is also building the Fortran-based bindings. So we
Expand Down