Support mpi_f08 and legacy MPI interfaces through macros file

Through the use of a macros file, both the legacy and the 'mpi_f08' MPI fortran interfaces can be supported.

The file (Src/MPI/mpi_macros.f) contains preprocessor statements such as:

#if defined(MPI_INTERFACE_F08)
#define MPI_COMM_TYPE           TYPE(MPI_Comm)
...
#else
#define MPI_COMM_TYPE           INTEGER
...
#endif

The mpi_f08 interfaces are to be preferred, and are automatically enabled by CMake by default if the underlying MPI library has been compiled with them. Users can control this behavior through the variable

SIESTA_WITH_MPI_INTERFACES [f08|legacy|none]

As a fallback, the legacy MPI interfaces can be compiled. If a compiler/MPI library combination cannot use the f08 interfaces nor the legacy interfaces, the value none should be chosen for the variable.

Details

Please detail what this MR introduces

  • Describe in details what this MR does? (link to the issue by writing # here)
  • Does this MR change the behaviour of any fdf-flags? If so, ensure this is documented in the manual
  • If new fdf-flags are added, please add thorough descriptions to the manual
  • add a summary sentence in the ReleaseNotes.md file
  • if this breaks compatibility, add mentions to the Docs/compatibility.tex

Why is it needed

The modern mpi_f08 interfaces provide more checks.

Authors

Co-authored-by: Rogeli Grima rogeli.grima@bsc.es Co-authored-by: Isidre Mas Magre isidre.masmagre@bsc.es Co-authored-by: Federico Pedron fedekbe@gmail.com Co-authored-by: Alberto Garcia albertog@icmab.es

Edited by Alberto Garcia

Merge request reports

Loading