config/ompi_ext: use mpi module in mpi_ext module
If MPI extensions are enabled, all `ompi/mpiext/pcollreq/use-mpi/mpiext_*_usempi.h` are included in `ompi/mpi/fortran/mpiext-use-mpi/mpi-ext-module.F90` and all `ompi/mpiext/pcollreq/use-mpi/mpiext_*_usempif08.h` are included in `ompi/mpi/fortran/mpiext-use-mpi-f08/mpi-f08-ext-module.F90` using `#include` directives. In `mpiext_*_usempi.h` and `mpiext_*_usempif08.h`, some MPI extension may want to use constants or handles defined in the `mpi` module and the `mpi_f08` module. For example, if you want to define a new datatype in `mpi_f08_ext`, you'll need the definition of `type(mpi_datatype)`. However, putting `use mpi_f08` line in thier `mpiext_*_usempif08.h` may cause a compilation error if more than one MPI extensions are enabled because the `use` statement must be put prior to any variable declarations. To resolve this problem, this commit puts `use mpi` and `use mpi_f08` as first lines of `mpi-ext-module.F90` and `mpi-f08-ext-module.F90` respectively. Signed-off-by: KAWASHIMA Takahiro <t-kawashima@jp.fujitsu.com>
Этот коммит содержится в:
родитель
2220623f34
Коммит
b380dd58b5
@ -171,6 +171,9 @@ EOF
|
||||
#include "ompi/mpi/fortran/configure-fortran-output.h"
|
||||
|
||||
module mpi_ext
|
||||
! Some mpi_ext extensions may require the mpi module.
|
||||
use mpi
|
||||
!
|
||||
! Even though this is not a useful parameter (cannot be used as a
|
||||
! preprocessor catch) define it to keep the linker from complaining
|
||||
! during the build.
|
||||
@ -213,6 +216,9 @@ EOF
|
||||
#include "ompi/mpi/fortran/configure-fortran-output.h"
|
||||
|
||||
module mpi_f08_ext
|
||||
! Some mpi_f08_ext extensions may require the mpi_f08 module.
|
||||
use mpi_f08
|
||||
!
|
||||
! Even though this is not a useful parameter (cannot be used as a
|
||||
! preprocessor catch) define it to keep the linker from complaining
|
||||
! during the build.
|
||||
|
@ -22,6 +22,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-f08/mod \
|
||||
$(OMPI_FC_MODULE_FLAG)$(top_builddir)/ompi/mpi/fortran/use-mpi-f08 \
|
||||
-I$(top_srcdir) $(FCFLAGS_f90)
|
||||
|
||||
flibs =
|
||||
|
@ -21,6 +21,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)
|
||||
|
||||
flibs =
|
||||
|
Загрузка…
x
Ссылка в новой задаче
Block a user