You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I have some sample code that does not compile with MPICH 4.1.2:
program hello_world
use mpi
implicit noneinteger:: status
call MPI_Init(ierror=status)
call MPI_Finalize(ierror=status)
end program hello_world
With MPICH:
$ mpifort init_status.F90
init_status.F90:5:24:
5 | call MPI_Init(ierror=status)
| 1
Error: Keyword argument 'ierror' at (1) is not in the procedure; did you mean 'ierr'?
init_status.F90:6:28:
6 | call MPI_Finalize(ierror=status)
| 1
Error: Keyword argument 'ierror' at (1) is not in the procedure; did you mean 'ierr'?
Every other stack I try supports this. Per the MPI Standard, I'm pretty sure the Fortran interfaces say the final argument will be IERROR.
Per a colleague of mine (@tclune) on the Fortran Standards Committee:
Explicit interfaces for Fortran procedures include the keywords, i.e., the spelling of the procedure arguments. The use mpi mechanism is intended to provide explicit interfaces to MPI procedures. The MPI standard specifies the final argument is spelled "IERROR", not "IERR".
Note, that this works:
program hello_world
use mpi
implicit noneinteger:: ierror
call MPI_Init(ierror)
call MPI_Finalize(ierror)
end program hello_world
works because you aren't using keywords. Also, the first program works if you use mpi_f08 because it seems to handle ierror keyword correctly. But the Fortran 90 bindings seem to have been constructed such that it thinks the last argument is called ierr (as in C) and not ierror (as it should be in Fortran).
The text was updated successfully, but these errors were encountered:
I have some sample code that does not compile with MPICH 4.1.2:
With MPICH:
Every other stack I try supports this. Per the MPI Standard, I'm pretty sure the Fortran interfaces say the final argument will be
IERROR
.Per a colleague of mine (@tclune) on the Fortran Standards Committee:
Note, that this works:
works because you aren't using keywords. Also, the first program works if you
use mpi_f08
because it seems to handleierror
keyword correctly. But the Fortran 90 bindings seem to have been constructed such that it thinks the last argument is calledierr
(as in C) and notierror
(as it should be in Fortran).The text was updated successfully, but these errors were encountered: