Fortran: Enable using LOGICAL
parameter in MPI extensions.
If a subroutine of the Fortran `use-mpi-f08` binding in an MPI extension have a `LOGICAL` parameter and no `TYPE(MPI_Status)` parameter, it needs to use the `mpi_ext` module and call its corresponding subroutine in the `mpif-h` directory, as explained in `ompi/mpi/fortran/use-mpi-f08/mpi-f-interfaces-bind.h`. However, as shown in the figure below, the required directories are dependent on each other, and "Can't open module file" error occurs at build time. ompi/mpiext/{extension name}/use-mpi-f08 A | | | | V ompi/mpi/fortran/use-mpi-f08 <--- ompi/mpi/fortran/mpiext (mpi_ext.mod) In order to solve this problem, change the configuration and the build order. - divide Fortran extension directory (`ompi/mpi/fortran/mpiext`) into the directories for `use-mpi` and for `use-mpi-08` - `ompi/mpi/fortran/mpiext-use-mpi` : for `use-mpi` (mpi_ext.mod) - `ompi/mpi/fortran/mpiext-use-mpi-f08` : for `use-mpi-08` (mpi_f08_ext.mod) - change to the following build order about Fortran `use-mpi` and `use-mpi-f08` bindings in `ompi` 1. mpi_ext bindings of MPI extensions (`mpiext/{extension name}/use-mpi` directory) 2. Fortran use-mpi (`mpi/fortran/use-mpi-[ignore-]tkr` directory) 3. Fortran extension for use-mpi (`mpi/fortran/mpiext-use-mpi` directory) 4. Fortran use-mpi-f08 modules only (`mpi/fortran/use-mpi-f08/mod` directory) 5. mpi_f08_ext bindings of MPI extensions (`mpiext/{extension name}/use-mpi-f08` directory) 6. Fortran use-mpi-f08 (`mpi/fortran/use-mpi-f08` directory) 7. Fortran extension for use-mpi-f08 (`mpi/fortran/mpiext-use-mpi-f08` directory) Signed-off-by: Kurita, Takehiro <fj6370fp@aa.jp.fujitsu.com>
Этот коммит содержится в:
родитель
64a5baaa28
Коммит
f9ae932bfd
@ -5,6 +5,7 @@
|
||||
# and Technology (RIST). All rights reserved.
|
||||
# Copyright (c) 2018 Los Alamos National Security, LLC. All rights
|
||||
# reserved.
|
||||
# Copyright (c) 2018 FUJITSU LIMITED. All rights reserved.
|
||||
# $COPYRIGHT$
|
||||
#
|
||||
# Additional copyrights may follow
|
||||
@ -38,7 +39,8 @@ AC_DEFUN([OMPI_CONFIG_FILES],[
|
||||
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/mod/Makefile
|
||||
ompi/mpi/fortran/mpiext/Makefile
|
||||
ompi/mpi/fortran/mpiext-use-mpi/Makefile
|
||||
ompi/mpi/fortran/mpiext-use-mpi-f08/Makefile
|
||||
ompi/mpi/tool/Makefile
|
||||
ompi/mpi/tool/profile/Makefile
|
||||
|
||||
|
@ -10,6 +10,7 @@ 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
|
||||
dnl reserved.
|
||||
dnl Copyright (c) 2018 FUJITSU LIMITED. All rights reserved.
|
||||
dnl $COPYRIGHT$
|
||||
dnl
|
||||
dnl Additional copyrights may follow
|
||||
@ -154,7 +155,7 @@ EOF
|
||||
# modules it needs are already built).
|
||||
|
||||
# remove any previously generated #include files
|
||||
outdir=ompi/mpi/fortran/mpiext
|
||||
outdir=ompi/mpi/fortran/mpiext-use-mpi
|
||||
mkdir -p $outdir
|
||||
mpiusempi_ext_h=$outdir/mpi-ext-module.F90
|
||||
rm -f $mpiusempi_ext_h
|
||||
@ -191,9 +192,11 @@ EOF
|
||||
###############
|
||||
|
||||
# See note above: we generate the mpi_f08_ext module in
|
||||
# ompi/mpi/fortran/mpiext
|
||||
# ompi/mpi/fortran/mpiext-use-mpi-f08
|
||||
|
||||
# remove any previously generated #include files
|
||||
outdir=ompi/mpi/fortran/mpiext-use-mpi-f08
|
||||
mkdir -p $outdir
|
||||
mpiusempif08_ext_h=$outdir/mpi-f08-ext-module.F90
|
||||
rm -f $mpiusempif08_ext_h
|
||||
|
||||
|
@ -18,6 +18,7 @@
|
||||
# Copyright (c) 2015-2017 Research Organization for Information Science
|
||||
# and Technology (RIST). All rights reserved.
|
||||
# Copyright (c) 2016 IBM Corporation. All rights reserved.
|
||||
# Copyright (c) 2018 FUJITSU LIMITED. All rights reserved.
|
||||
# $COPYRIGHT$
|
||||
#
|
||||
# Additional copyrights may follow
|
||||
@ -90,10 +91,11 @@ SUBDIRS = \
|
||||
mpi/fortran/mpif-h \
|
||||
$(OMPI_MPIEXT_USEMPI_DIR) \
|
||||
$(OMPI_FORTRAN_USEMPI_DIR) \
|
||||
mpi/fortran/mpiext-use-mpi \
|
||||
mpi/fortran/use-mpi-f08/mod \
|
||||
$(OMPI_MPIEXT_USEMPIF08_DIRS) \
|
||||
mpi/fortran/use-mpi-f08 \
|
||||
mpi/fortran/mpiext \
|
||||
mpi/fortran/mpiext-use-mpi-f08 \
|
||||
$(MCA_ompi_FRAMEWORK_COMPONENT_DSO_SUBDIRS) \
|
||||
$(OMPI_CONTRIB_SUBDIRS)
|
||||
|
||||
@ -119,9 +121,10 @@ DIST_SUBDIRS = \
|
||||
mpi/fortran/mpif-h \
|
||||
mpi/fortran/use-mpi-tkr \
|
||||
mpi/fortran/use-mpi-ignore-tkr \
|
||||
mpi/fortran/mpiext-use-mpi \
|
||||
mpi/fortran/use-mpi-f08 \
|
||||
mpi/fortran/use-mpi-f08/mod \
|
||||
mpi/fortran/mpiext \
|
||||
mpi/fortran/mpiext-use-mpi-f08 \
|
||||
mpi/java \
|
||||
$(OMPI_MPIEXT_ALL_SUBDIRS) \
|
||||
$(MCA_ompi_FRAMEWORKS_SUBDIRS) \
|
||||
|
@ -2,6 +2,7 @@
|
||||
# Copyright (c) 2012 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.
|
||||
# $COPYRIGHT$
|
||||
#
|
||||
# Additional copyrights may follow
|
||||
@ -10,8 +11,8 @@
|
||||
#
|
||||
|
||||
#
|
||||
# Only do the stuff in this file if we're going to build one/both of
|
||||
# the mpi/mpi_f08 ext modules.
|
||||
# Only do the stuff in this file if we're going to build
|
||||
# the mpi_f08 ext modules.
|
||||
#
|
||||
|
||||
if OMPI_BUILD_FORTRAN_USEMPI_OR_USEMPIF08_EXT
|
||||
@ -25,33 +26,13 @@ AM_FCFLAGS = -I$(top_builddir)/ompi/include -I$(top_srcdir)/ompi/include \
|
||||
|
||||
flibs =
|
||||
|
||||
#
|
||||
# "use mpi" ext module
|
||||
#
|
||||
# If we're building the Fortran "use mpi" bindings, compile and
|
||||
# generate the mpi_ext module file. Do this by compiling a fake
|
||||
# library; the modulefile will be created as a side-effect of
|
||||
# compiling usempi-ext.f90.
|
||||
#
|
||||
|
||||
if OMPI_BUILD_FORTRAN_USEMPI_EXT
|
||||
flibs += libforce_usempi_module_to_be_built.la
|
||||
|
||||
libforce_usempi_module_to_be_built_la_SOURCES = mpi-ext-module.F90
|
||||
|
||||
#
|
||||
# Automake doesn't do Fortran dependency analysis, so must list them
|
||||
# manually here. Bummer!
|
||||
#
|
||||
|
||||
mpi_ext.lo: mpi-ext-module.F90
|
||||
endif
|
||||
|
||||
#
|
||||
# "use mpi_f08" ext module
|
||||
#
|
||||
# Similar to above: if we're building the mpi_f08 module, also build
|
||||
# the mpi_f08_ext module.
|
||||
# If we're building the Fortran "use mpi_f08" bindings, compile and
|
||||
# generate the mpi_f08_ext module file. Do this by compiling a fake
|
||||
# library; the modulefile will be created as a side-effect of
|
||||
# compiling usempif08-ext.f90.
|
||||
#
|
||||
|
||||
if OMPI_BUILD_FORTRAN_USEMPIF08_EXT
|
||||
@ -105,5 +86,5 @@ endif
|
||||
|
||||
# Remove the auto-generated files (they are generated by configure)
|
||||
distclean-local:
|
||||
rm -f mpi-ext-module.F90 mpi-f08-ext-module.F90
|
||||
rm -f mpi-f08-ext-module.F90
|
||||
|
88
ompi/mpi/fortran/mpiext-use-mpi/Makefile.am
Обычный файл
88
ompi/mpi/fortran/mpiext-use-mpi/Makefile.am
Обычный файл
@ -0,0 +1,88 @@
|
||||
#
|
||||
# Copyright (c) 2012 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.
|
||||
# $COPYRIGHT$
|
||||
#
|
||||
# Additional copyrights may follow
|
||||
#
|
||||
# $HEADER$
|
||||
#
|
||||
|
||||
#
|
||||
# Only do the stuff in this file if we're going to build
|
||||
# the mpi ext modules.
|
||||
#
|
||||
|
||||
if OMPI_BUILD_FORTRAN_USEMPI_OR_USEMPIF08_EXT
|
||||
|
||||
# Setup
|
||||
|
||||
AM_FCFLAGS = -I$(top_builddir)/ompi/include -I$(top_srcdir)/ompi/include \
|
||||
$(OMPI_FC_MODULE_FLAG)$(top_builddir)/ompi/mpi/fortran/base \
|
||||
-I$(top_srcdir) $(FCFLAGS_f90)
|
||||
|
||||
flibs =
|
||||
|
||||
#
|
||||
# "use mpi" ext module
|
||||
#
|
||||
# If we're building the Fortran "use mpi" bindings, compile and
|
||||
# generate the mpi_ext module file. Do this by compiling a fake
|
||||
# library; the modulefile will be created as a side-effect of
|
||||
# compiling usempi-ext.f90.
|
||||
#
|
||||
|
||||
if OMPI_BUILD_FORTRAN_USEMPI_EXT
|
||||
flibs += libforce_usempi_module_to_be_built.la
|
||||
|
||||
libforce_usempi_module_to_be_built_la_SOURCES = mpi-ext-module.F90
|
||||
|
||||
#
|
||||
# Automake doesn't do Fortran dependency analysis, so must list them
|
||||
# manually here. Bummer!
|
||||
#
|
||||
|
||||
mpi_ext.lo: mpi-ext-module.F90
|
||||
endif
|
||||
|
||||
noinst_LTLIBRARIES = $(flibs)
|
||||
|
||||
#
|
||||
# Clean up all F90 module files and all generated files
|
||||
#
|
||||
|
||||
MOSTLYCLEANFILES = *.mod
|
||||
CLEANFILES += *.i90
|
||||
|
||||
#
|
||||
# Install the generated .mod files. Unfortunately, each F90 compiler
|
||||
# may generate different filenames, so we have to use a glob. :-(
|
||||
#
|
||||
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
|
||||
|
||||
# If we're not building either of the modules, we still need stubs for
|
||||
# install-exec-hook and uninstall-local, due to a bug in automake. :-(
|
||||
|
||||
install-exec-hook:
|
||||
uninstall-local:
|
||||
|
||||
endif
|
||||
|
||||
# Remove the auto-generated files (they are generated by configure)
|
||||
distclean-local:
|
||||
rm -f mpi-ext-module.F90
|
||||
|
Загрузка…
x
Ссылка в новой задаче
Block a user