Open Simkern opened 2 months ago
The present simple implementation makes LightKrylov
aware of parallelism.
LightKrylov_Constants
provides MPI initialisation and finalisation routinesLightKrylov_Constants
, namely nid
, nio
and comm_size
, respectively. They are accessible via getter/setter routines only.nio
.mpi_f08
which must be present and linked as an external module in fpm.toml
. From what I see, there is no 'serial' version of the library in the sense that it would be natively compatible with serial compilation. Therefore, I have added preprocessor macros that disable the MPI related code and imports in serial cases. The variables nid
, com_size
and nio
are then set to the default value of 1.
The current version of
LightKrylov
is serial, which is not a big problem as most of the heavy lifting computationally is done by the call tomatvec
, the implementation of which is external toLightKrylov
. Nevertheless, if one wants to have information messages at runtime to check what is happening withinLightKrylov
, it is useful to make the toolbox MPI aware such that these messages can be written by one rank only to not clutter the logfile.