Skip to content
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
4 changes: 4 additions & 0 deletions config/ompi_config_files.m4
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
# -*- shell-script -*-
#
# Copyright (c) 2009-2014 Cisco Systems, Inc. All rights reserved.
# Copyright (c) 2017 Research Organization for Information Science
# and Technology (RIST). All rights reserved.
# $COPYRIGHT$
#
# Additional copyrights may follow
Expand Down Expand Up @@ -32,7 +34,9 @@ AC_DEFUN([OMPI_CONFIG_FILES],[
ompi/mpi/fortran/use-mpi-ignore-tkr/mpi-ignore-tkr-interfaces.h
ompi/mpi/fortran/use-mpi-ignore-tkr/mpi-ignore-tkr-file-interfaces.h
ompi/mpi/fortran/use-mpi-f08/Makefile
ompi/mpi/fortran/use-mpi-f08/mod/Makefile
ompi/mpi/fortran/use-mpi-f08-desc/Makefile
ompi/mpi/fortran/use-mpi-f08-desc/mod/Makefile
ompi/mpi/fortran/mpiext/Makefile
ompi/mpi/tool/Makefile
ompi/mpi/tool/profile/Makefile
Expand Down
8 changes: 2 additions & 6 deletions config/ompi_configure_options.m4
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ dnl Copyright (c) 2009 Los Alamos National Security, LLC. All rights
dnl reserved.
dnl Copyright (c) 2009 Oak Ridge National Labs. All rights reserved.
dnl Copyright (c) 2013 Intel, Inc. All rights reserved.
dnl Copyright (c) 2015-2016 Research Organization for Information Science
dnl Copyright (c) 2015-2017 Research Organization for Information Science
dnl and Technology (RIST). All rights reserved.
dnl
dnl $COPYRIGHT$
Expand Down Expand Up @@ -244,11 +244,7 @@ OMPI_BUILD_FORTRAN_F08_SUBARRAYS=0
AS_IF([test $OMPI_TRY_FORTRAN_BINDINGS -lt $OMPI_FORTRAN_USEMPIF08_BINDINGS],
[AC_MSG_RESULT([none (use mpi_f08 disabled)])],
[AS_IF([test "$enable_mpi_f08_subarray_prototype" = "yes"],
[OMPI_BUILD_FORTRAN_F08_SUBARRAYS=1
AC_MSG_RESULT([extra crispy (subarray prototype)])
AC_MSG_WARN([Sorry, the subarray prototype is no longer available])
AC_MSG_WARN([Contact your favorite OMPI developer and ask for it to be re-enabled])
AC_MSG_ERROR([Cannot continue])],
[OMPI_BUILD_FORTRAN_F08_SUBARRAYS=1],
[AC_MSG_RESULT([regular (no subarray support)])])
])
AC_DEFINE_UNQUOTED([OMPI_BUILD_FORTRAN_F08_SUBARRAYS],
Expand Down
5 changes: 2 additions & 3 deletions config/ompi_ext.m4
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ dnl University Research and Technology
dnl Corporation. All rights reserved.
dnl Copyright (c) 2009-2015 Cisco Systems, Inc. All rights reserved.
dnl Copyright (c) 2011-2012 Oak Ridge National Labs. All rights reserved.
dnl Copyright (c) 2015 Research Organization for Information Science
dnl Copyright (c) 2015-2017 Research Organization for Information Science
dnl and Technology (RIST). All rights reserved.
dnl Copyright (c) 2017 The University of Tennessee and The University
dnl of Tennessee Research Foundation. All rights
Expand Down Expand Up @@ -216,8 +216,7 @@ EOF

# Only build this mpi_f08_ext module if we're building the "use
# mpi_f08" module *and* it's the non-descriptor one.
AS_IF([test $OMPI_BUILD_FORTRAN_BINDINGS -ge $OMPI_FORTRAN_USEMPIF08_BINDINGS && \
test $OMPI_BUILD_FORTRAN_F08_SUBARRAYS -eq 0],
AS_IF([test $OMPI_BUILD_FORTRAN_BINDINGS -ge $OMPI_FORTRAN_USEMPIF08_BINDINGS]
[OMPI_BUILD_FORTRAN_USEMPIF08_EXT=1],
[OMPI_BUILD_FORTRAN_USEMPIF08_EXT=0])
AM_CONDITIONAL(OMPI_BUILD_FORTRAN_USEMPIF08_EXT,
Expand Down
6 changes: 5 additions & 1 deletion config/ompi_setup_mpi_fortran.m4
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ dnl Copyright (c) 2006-2008 Sun Microsystems, Inc. All rights reserved.
dnl Copyright (c) 2006-2007 Los Alamos National Security, LLC. All rights
dnl reserved.
dnl Copyright (c) 2009 Oak Ridge National Labs. All rights reserved.
dnl Copyright (c) 2014-2016 Research Organization for Information Science
dnl Copyright (c) 2014-2017 Research Organization for Information Science
dnl and Technology (RIST). All rights reserved.
dnl Copyright (c) 2016 IBM Corporation. All rights reserved.
dnl $COPYRIGHT$
Expand All @@ -35,6 +35,7 @@ AC_DEFUN([OMPI_SETUP_MPI_FORTRAN],[
OMPI_FORTRAN_USEMPI_LIB=

OMPI_FORTRAN_USEMPIF08_DIR=
OMPI_FORTRAN_USEMPIF08_MOD=
OMPI_FORTRAN_USEMPIF08_LIB=

OMPI_FORTRAN_MAX_ARRAY_RANK=0
Expand Down Expand Up @@ -543,12 +544,14 @@ end type test_mpi_handle],
AS_IF([test $OMPI_BUILD_FORTRAN_F08_SUBARRAYS -eq 1],
[ # Case a) partial/prototype implementation
OMPI_FORTRAN_USEMPIF08_DIR=mpi/fortran/use-mpi-f08-desc
OMPI_FORTRAN_USEMPIF08_MOD=$OMPI_FORTRAN_USEMPIF08_DIR/mod
OMPI_FORTRAN_SUBARRAYS_SUPPORTED=.TRUE.
OMPI_FORTRAN_NEED_WRAPPER_ROUTINES=0
AC_MSG_RESULT([array subsections (partial/experimental)])
],
[ # Both cases b) and c)
OMPI_FORTRAN_USEMPIF08_DIR=mpi/fortran/use-mpi-f08
OMPI_FORTRAN_USEMPIF08_MOD=$OMPI_FORTRAN_USEMPIF08_DIR/mod
OMPI_FORTRAN_SUBARRAYS_SUPPORTED=.FALSE.
AS_IF([test $OMPI_FORTRAN_HAVE_OPTIONAL_ARGS -eq 1],
[ # Case b) "good compiler"
Expand Down Expand Up @@ -701,6 +704,7 @@ end type test_mpi_handle],

# This goes into ompi/Makefile.am
AC_SUBST(OMPI_FORTRAN_USEMPIF08_DIR)
AC_SUBST(OMPI_FORTRAN_USEMPIF08_MOD)
# This goes into mpifort-wrapper-data.txt
AC_SUBST(OMPI_FORTRAN_USEMPIF08_LIB)

Expand Down
5 changes: 4 additions & 1 deletion ompi/Makefile.am
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
# Copyright (c) 2013-2015 Los Alamos National Security, LLC. All rights
# reserved.
# Copyright (c) 2015-2017 Intel, Inc. All rights reserved.
# Copyright (c) 2015 Research Organization for Information Science
# Copyright (c) 2015-2017 Research Organization for Information Science
# and Technology (RIST). All rights reserved.
# Copyright (c) 2016 IBM Corporation. All rights reserved.
# $COPYRIGHT$
Expand Down Expand Up @@ -90,6 +90,7 @@ SUBDIRS = \
mpi/fortran/mpif-h \
$(OMPI_MPIEXT_USEMPI_DIR) \
$(OMPI_FORTRAN_USEMPI_DIR) \
$(OMPI_FORTRAN_USEMPIF08_MOD) \
$(OMPI_MPIEXT_USEMPIF08_DIRS) \
$(OMPI_FORTRAN_USEMPIF08_DIR) \
mpi/fortran/mpiext \
Expand Down Expand Up @@ -119,7 +120,9 @@ DIST_SUBDIRS = \
mpi/fortran/use-mpi-tkr \
mpi/fortran/use-mpi-ignore-tkr \
mpi/fortran/use-mpi-f08 \
mpi/fortran/use-mpi-f08/mod \
mpi/fortran/use-mpi-f08-desc \
mpi/fortran/use-mpi-f08-desc/mod \
mpi/fortran/mpiext \
mpi/java \
$(OMPI_MPIEXT_ALL_SUBDIRS) \
Expand Down
7 changes: 5 additions & 2 deletions ompi/mpi/fortran/mpiext/Makefile.am
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
#
# Copyright (c) 2012 Cisco Systems, Inc. All rights reserved.
# Copyright (c) 2012 Cisco Systems, Inc. All rights reserved.
# Copyright (c) 2017 Research Organization for Information Science
# and Technology (RIST). All rights reserved.
# $COPYRIGHT$
#
# Additional copyrights may follow
Expand All @@ -18,6 +20,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/$(OMPI_FORTRAN_USEMPIF08_MOD) \
-I$(top_srcdir) $(FCFLAGS_f90)

flibs =
Expand Down Expand Up @@ -61,7 +64,7 @@ libforce_usempif08_module_to_be_built_la_SOURCES = mpi-f08-ext-module.F90
# manually here. Bummer!
#

mpi_f08_ext.lo: $(top_builddir)/ompi/mpi/fortran/use-mpi-f08/mpi-f08-types.lo
mpi_f08_ext.lo: $(top_builddir)/ompi/mpi/fortran/use-mpi-f08-modules/mpi-f08-types.lo
mpi_f08_ext.lo: mpi-f08-ext-module.F90
endif

Expand Down
15 changes: 6 additions & 9 deletions ompi/mpi/fortran/use-mpi-f08-desc/Makefile.am
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# -*- makefile -*-
#
# Copyright (c) 2006-2012 Cisco Systems, Inc. All rights reserved.
# Copyright (c) 2015 Research Organization for Information Science
# Copyright (c) 2015-2017 Research Organization for Information Science
# and Technology (RIST). All rights reserved.
# Copyright (c) 2016 IBM Corporation. All rights reserved.
#
Expand All @@ -17,10 +17,12 @@
if OMPI_BUILD_FORTRAN_USEMPIF08_BINDINGS

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

lib_LTLIBRARIES = lib@OMPI_LIBMPI_NAME@_usempif08.la

module_sentinel_file = \
mod/libforce_usempif08_internal_modules_to_be_built.la
#
# This list is a subset of the full MPI API used for testing Fortran
# descriptors usage in MPI-3
Expand All @@ -38,8 +40,6 @@ mpi_api_files = \

lib@OMPI_LIBMPI_NAME@_usempif08_la_SOURCES = \
$(mpi_api_files) \
mpi-f08-types.f90 \
mpi-f08-interfaces.F90 \
mpi-f-interfaces-bind.h \
mpi-f08.f90 \
ISO_Fortran_binding.h \
Expand All @@ -59,9 +59,7 @@ MOSTLYCLEANFILES = *.mod
# manually here. Bummer!
#

mpi-f08-types.lo: mpi-f08-types.f90
mpi-f08-interfaces.lo: mpi-f08-interfaces.F90 mpi-f08-types.lo
OMPI_Fortran_binding.lo: OMPI_Fortran_binding.f90 mpi-f08-types.lo
OMPI_Fortran_binding.lo: OMPI_Fortran_binding.f90 mod/mpi-f08-types.lo


#
Expand All @@ -73,9 +71,8 @@ mpi_api_lo_files = $(mpi_api_files:.f90=.lo)

$(mpi_api_lo_files): mpi-f08.lo

mpi-f08.lo: mpi-f08-types.lo
mpi-f08.lo: $(module_sentinel_file)
mpi-f08.lo: OMPI_Fortran_binding.lo
mpi-f08.lo: mpi-f08-interfaces.lo
mpi-f08.lo: mpi-f-interfaces-bind.h
mpi-f08.lo: mpi-f08.f90

Expand Down
1 change: 1 addition & 0 deletions ompi/mpi/fortran/use-mpi-f08-desc/OMPI_Fortran_binding_c.c
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@

#include "ompi_config.h"
#include "ISO_Fortran_binding.h"
#include <malloc.h>
#include <stdio.h>

#define DEBUG_PRINT 0
Expand Down
69 changes: 69 additions & 0 deletions ompi/mpi/fortran/use-mpi-f08-desc/mod/Makefile.am
Original file line number Diff line number Diff line change
@@ -0,0 +1,69 @@
# -*- makefile -*-
#
# Copyright (c) 2006-2012 Cisco Systems, Inc. All rights reserved.
# Copyright (c) 2015 Research Organization for Information Science
# and Technology (RIST). All rights reserved.
# Copyright (c) 2016 IBM Corporation. All rights reserved.
#
# $COPYRIGHT$
#
# Additional copyrights may follow
#
# $HEADER$
#

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

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

module_sentinel_file = \
libforce_usempif08_internal_modules_to_be_built.la

noinst_LTLIBRARIES = $(module_sentinel_file)

# f08 support modules

libforce_usempif08_internal_modules_to_be_built_la_SOURCES = \
mpi-f08-types.f90 \
mpi-f08-interfaces.F90

#
# Clean up all F90 module files
#

MOSTLYCLEANFILES = *.mod

#
# Automake doesn't do Fortran dependency analysis, so must list them
# manually here. Bummer!
#

mpi-f08-types.lo: mpi-f08-types.f90
mpi-f08-interfaces.lo: mpi-f08-interfaces.F90 mpi-f08-types.lo


install-exec-hook:
@ for file in `ls *.mod`; do \
echo $(INSTALL) $$file $(DESTDIR)$(libdir); \
$(INSTALL) $$file $(DESTDIR)$(libdir); \
done

uninstall-local:
@ for file in `ls *.mod`; do \
echo rm -f $(DESTDIR)$(libdir)/$$file; \
rm -f $(DESTDIR)$(libdir)/$$file; \
done

else

# Need to have empty targets because AM can't handle having an
# AM_CONDITIONAL was targets in the "if" statement but not in the
# "else". :-(

install-exec-hook:
uninstall-local:

endif
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
! Copyright (c) 2009 Cisco Systems, Inc. All rights reserved.
! Copyright (c) 2009-2012 Los Alamos National Security, LLC.
! All rights reserved.
! Copyright (c) 2015 Research Organization for Information Science
! Copyright (c) 2015-2017 Research Organization for Information Science
! and Technology (RIST). All rights reserved.
!
! This file creates mappings between MPI C types (e.g., MPI_Comm) and
Expand Down Expand Up @@ -153,6 +153,6 @@ module mpi_f08_types
!
! STATUS/STATUSES_IGNORE
!
#include "mpif-f08-types.h"
include 'mpif-f08-types.h'

end module mpi_f08_types
43 changes: 3 additions & 40 deletions ompi/mpi/fortran/use-mpi-f08/Makefile.am
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
# Copyright (c) 2012-2013 Inria. All rights reserved.
# Copyright (c) 2013 Los Alamos National Security, LLC. All rights
# reserved.
# Copyright (c) 2015-2016 Research Organization for Information Science
# Copyright (c) 2015-2017 Research Organization for Information Science
# and Technology (RIST). All rights reserved.
# Copyright (c) 2016 IBM Corporation. All rights reserved.
#
Expand All @@ -27,7 +27,7 @@ if OMPI_BUILD_FORTRAN_USEMPIF08_BINDINGS
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). \
$(OMPI_FC_MODULE_FLAG)mod \
-I$(top_srcdir) $(FCFLAGS_f90)

MOSTLYCLEANFILES = *.mod
Expand All @@ -37,9 +37,7 @@ CLEANFILES += *.i90
lib_LTLIBRARIES = lib@OMPI_LIBMPI_NAME@_usempif08.la

module_sentinel_file = \
libforce_usempif08_internal_modules_to_be_built.la

noinst_LTLIBRARIES = $(module_sentinel_file)
mod/libforce_usempif08_internal_modules_to_be_built.la

mpi-f08.lo: $(module_sentinel_file)
mpi-f08.lo: mpi-f08.F90
Expand Down Expand Up @@ -843,41 +841,6 @@ mpi-f08.lo: mpi-f-interfaces-bind.h pmpi-f-interfaces-bind.h

###########################################################################

# f08 support modules

libforce_usempif08_internal_modules_to_be_built_la_SOURCES = \
mpi-f08-types.F90 \
mpi-f08-interfaces.F90 \
mpi-f08-interfaces-callbacks.F90 \
mpi-f08-callbacks.F90 \
pmpi-f08-interfaces.F90

config_h = \
$(top_builddir)/ompi/mpi/fortran/configure-fortran-output.h \
$(top_srcdir)/ompi/mpi/fortran/configure-fortran-output-bottom.h

#
# Automake doesn't do Fortran dependency analysis, so must list them
# manually here. Bummer!
#

mpi-f08-types.lo: $(config_h)
mpi-f08-types.lo: mpi-f08-types.F90
mpi-f08-interfaces.lo: $(config_h)
mpi-f08-interfaces.lo: mpi-f08-interfaces.F90
mpi-f08-interfaces.lo: mpi-f08-interfaces-callbacks.lo
mpi-f08-interfaces-callbacks.lo: $(config_h)
mpi-f08-interfaces-callbacks.lo: mpi-f08-interfaces-callbacks.F90
mpi-f08-interfaces-callbacks.lo: mpi-f08-types.lo
mpi-f08-callbacks.lo: $(config_h)
mpi-f08-callbacks.lo: mpi-f08-callbacks.F90
mpi-f08-callbacks.lo: mpi-f08-types.lo
pmpi-f08-interfaces.lo: $(config_h)
pmpi-f08-interfaces.lo: pmpi-f08-interfaces.F90
pmpi-f08-interfaces.lo: mpi-f08-interfaces-callbacks.lo

###########################################################################

# Install the generated .mod files. Unfortunately, each F90 compiler
# may generate different filenames, so we have to use a glob. :-(

Expand Down
Loading