Intel® MPI Library
Get help with building, analyzing, optimizing, and scaling high-performance computing (HPC) applications.
2218 Discussions

mpiifx: use_f08 lacks support of integer(8)

foxtran
New Contributor I
1,558 Views

Dear, 

I have written the following code for testing MPI ILP64 mode:

 

program main
  use mpi_f08
  implicit none
  integer, parameter :: is = 8
  integer(is) :: ierror
  call mpi_init(ierror)
  call mpi_finalize(ierror)
end program main

 

 Then, I tried to compile it as follows:

 

$ mpiifx test_mpi_ILP64.f90 -ilp64

 

And I got the following errors:

test_mpi_ILP64.f90(6): error #6285: There is no matching specific subroutine for this generic subroutine call.   [MPI_INIT]
  call mpi_init(ierror)
-------^
test_mpi_ILP64.f90(7): error #6285: There is no matching specific subroutine for this generic subroutine call.   [MPI_FINALIZE]
  call mpi_finalize(ierror)
-------^
compilation aborted for test_mpi_ILP64.f90 (code 1)

When I replace `use mpi_f08` with `use mpi` the compilation is success. Also, replacement `is = 8` with `is = 4` has the same behaviour.

How can I use mpi_f08 with ILP64 mode?

I'm using the following ifx from the corresponding oneAPI (so, the resulting binaries looks ok, when they are compiled):

$ ifx --version
ifx (IFX) 2023.2.0 20230622
Copyright (C) 1985-2023 Intel Corporation. All rights reserved.


Best regards,
Igor

 

0 Kudos
5 Replies
foxtran
New Contributor I
1,518 Views

I checked paths and noticed that mpi_f08.mod is presented only in `intel/oneapi/mpi/2021.10.0/include`, but not in `intel/oneapi/mpi/2021.10.0//include/ilp64` while mpi.mod is presented in both directories.

The same problem is for mpif.h, which is presented only for LP64 mode. 

0 Kudos
hakostra1
New Contributor II
1,488 Views

I did not bother to find the MPI standard document, but OpenMPI has good API documentation:

https://www.open-mpi.org/doc/v3.1/man3/MPI_Init.3.php

The 'ierror' argument is optional with MPI_f08, but when it is present, it must be of default kind (int32). In your example it is not and the compiler rightfully rejects it.

0 Kudos
foxtran
New Contributor I
1,475 Views

Dear hakostra,

MPI standard (for example 3.1: https://www.mpi-forum.org/docs/mpi-3.1/mpi31-report.pdf) does not say anything about integer size in API except several modern routines, so, when one compiles MPI application with -i8 flag, one expects that the whole application will use ILP64 mode (in the case of x86_64).

Moreover, the large data (>2Gb for MPI_BYTE) can be send at one time only using ILP64 mode. That is why I would like to know how can I use mpi_f08 with ILP64 mode


0 Kudos
JohnNichols
Valued Contributor III
1,451 Views

mpi_f08 throws an error, should it?

0 Kudos
foxtran
New Contributor I
1,360 Views

Dear John,

Yep,  mpi_f08 throws an error while mpi does not.

0 Kudos
Reply