ALL Fortran interface

There is still a lot of Fortran code in use and the low entry barrier to the language makes it an easy choice for beginning scientific programmers. To be able to utilize the features of the library in Fortran code this interface is provided. It provides basically the same functionality as the C++ interface.

Purpose of Module

This module is necessary for any Fortran developers trying to use this library.

It is currently in use by the Fortran Multi Particle Method written for the thesis of Stephan Schulz. This application of the interface is documented in the module MPM Integration.

Background Information

The interface is part of ALL which can be found at https://gitlab.version.fz-juelich.de/SLMS/loadbalancing in the src subdirectory. It is called ALL_module.F90. Additionally, an internal C wrapper is used for the C++ class, since Fortran can only interoperate with C.

Building and Testing

The Fortran module must be explicitly enabled when building the library. This is done by setting the CMake variable CM_ALL_FORTRAN to ON. The use of the mpi_f08 module can also be enabled with CM_ALL_USE_F08. Then the new MPI derived types can be used directly. The requisite compilers and MPI implementations must be present. Also note, that the ALL module must be compiled by the same Fortran compiler as the application (and MPI implementation if any MPI module is used). More information is available in the libraries documentation in the code’s repository in docs/Install.rst.

Source Code

The source code for this interface consists of the C wrapper src/ALL_fortran.cpp and the Fortran module ALL src/ALL_module.F90.