-
Notifications
You must be signed in to change notification settings - Fork 901
Use mpi_f08 module in mpi_f08_ext module #6210
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
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@jsquyres (or someone) Could you check whether this is a sane fix? I'm not familiar with Fortran and Autoconf. I tested some build patterns and all worked fine. |
kawashima-fj
added a commit
to kawashima-fj/ompi
that referenced
this pull request
Dec 27, 2018
The latest two commits in this branch needs commits in the PR open-mpi#6210. To avoid compilation errors, the new datatypes are disabled in the use-mpi-f08 bindings until the PR is merged. After the PR is merged, this commit will be removed. Signed-off-by: KAWASHIMA Takahiro <[email protected]>
Merged
@jsquyres Ping. |
jsquyres
requested changes
Jan 15, 2019
Sorry for the huge delay. |
Including `mpiext_*_mpifh.h` in the source file of the `mpi_f08_ext` module is not always appropriate. For example, if you want to define a new datatype in an MPI extension, the `include 'mpif-ext.h'` binding defines the datatype as `integer` but the `use mpi_f08_ext` binding defines it as `type(mpi_datatype)`. They conflict. This commit allows each MPI extension to declare whether it wants to include its `mpiext_*_mpifh.h` in `mpi_f08` and `mpi_f08_ext` respectively. The default (no declaration) is 'want'. See `ompi/mpiext/example/configure.m4` for an example. Signed-off-by: KAWASHIMA Takahiro <[email protected]>
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 <[email protected]>
c81b3b2
to
b380dd5
Compare
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
I cannot add a new datatype in the
mpi_f08_ext
module without this change in PR #6205 .@jsquyres Could you review? I'm not familiar with Fortran and Autoconf. Please see commit messages for details.
I'll merge this PR after receiving review and doing more build tests.