MPI calls do not expect INTEGER(4)
nor INTEGER(8)
, they expect just INTEGER
. And, as always, remember what those (4)
and (8)
actually mean Fortran: integer*4 vs integer(4) vs integer(kind=4)
With -i8
you are changing what INTEGER
means, to which kind it corresponds. You can do that, but you have to compile the MPI library with the same settings. The library may or may not be prepared to be compiled that way, but theoretically it should be possible.
You could also try passing integer(int32)
instead of integer
to MPI. If it is the correct kind which correspond to the default kind of the MPI library, the TKR checks and all other checks should pass OK. But it is not recommended.
To stay strictly within the Fortran standard, when you promote the default integer kind, you should also promote the default real and logical kind.
To stay portable use integers that correspond to the API of the library you use and make sure the library is meant to be used with that particular compiler and with that particular compiler configuration.
Usually, for portability one should not rely on promoting the default kinds but one should use specific kinds which suit the given purpose in the specific part of the code.