Skip to content
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

Add support for the new mpi_f08 module #678

Merged
merged 3 commits into from
Jul 4, 2023
Merged

Conversation

fstein93
Copy link
Contributor

The MPI 3.0 standard introduces the mpi_f08 module. This solves most issues arising with the old Fortran module (strong typing, non-blocking communication, allocation of memory, etc.). This PR enables this feature within DBCSR.

Because of experiences with its implementation in CP2K, its use must be explicitly requested by the user by adding the flag -DUSE_MPI_F08=<ON|OFF> while calling CMake. It is known that this feature requires more recent compilers (GCC version>10 or Intel compiler) and suitable MPI implementations (OpenMPI and IntelMPI seem to work well, MPICH has issues with Gfortran 11/12). Some of the admins should add or adjust a suitable test for this feature, as this is apparently not possible for me.

Frederick Stein and others added 3 commits June 26, 2023 15:24
This PR adds support for the new mpi_f08 of the MPI 3.0 standard. This module solves several interface issues in the MPI backend (Type/Kind/Rank explosion, ASYNCHRONOUS, memory allocation, ...). Because not all MPI libraries in use support the mpi_f08 module properly, the use of the new interface is an opt-in solution, the old MPI interface remains the default until the support has improved (MPICH compiles but segfaults with certain versions of gfortran).
@jenkins-cscs
Copy link
Collaborator

Can one of the admins verify this patch?

@hfp
Copy link
Member

hfp commented Jun 26, 2023

@dev-zero @alazzaro Not sure if I can add an additional test for -DUSE_MPI_F08=ON. As noted above, the test may apply to OpenMPI and/or IntelMPI (not plain/stock MPICH). I guess, GCC/GFortran wise test requirements are fulfilled.

CMakeLists.txt Show resolved Hide resolved
@dev-zero
Copy link
Contributor

dev-zero commented Jul 4, 2023

wrt tests: I have no issue to hard enable it and stop testing the old wrapper. What is the issue with MPICH and gfortran 11/12?

@alazzaro alazzaro merged commit 28da2c1 into cp2k:develop Jul 4, 2023
21 checks passed
@fstein93
Copy link
Contributor Author

fstein93 commented Jul 4, 2023

wrt tests: I have no issue to hard enable it and stop testing the old wrapper. What is the issue with MPICH and gfortran 11/12?

It is related to this bug report. I first attempted to test it with MPICH/GFortran, too, when I implemented it into CP2K cp2k/cp2k#2486. The code compiles but then failes as soon as any kind of communication is initiated. I have never tested it again with later versions of GFortran.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants