There are 2 scenarios I tried to test,
- using a single line command to compile an executable directly, mpiifort -o test.exe -i8 test.f90
- using a CmakeLists file to compile the test with necessary Fortran 64 bit "-i8" option and find_package(MPI). I made sure MPI libraries are picked (impi.lib, libmpi_ilp64.lib) and MPI_Fortran_Compiler points to mpiifort
I use a test of determining the size of MPI_INTEGER using an API MPI_Type_size( ) to check if 64 bit environment is enabled for Fortran/MPI setup.
call MPI_Type_size(MPI_INTEGER, sz, ierrsiz) print *, 'sizeof(MPI_INTEGER) ', sz
Scenario 1 prints correct size of 8 bytes (64 bit) Scenario 2 prints incorrect size of 4 bytes ( 32 bit)
I do use "-i8" option in Cmake build system to enable 64 bit environment. But MPI still seems to be 32 bit.
Attached files/build logs.