I read that is recommended to use the MPI module rather than include mpif.h file. However, I get the following error
Error: There is no specific subroutine for the generic ‘mpi_comm_split’
when I run this program
program hello_world
use mpi_f08
implicit none
! include 'mpif.h'
integer :: ierr, num_procs, my_id,newcomm
integer :: color,key
call MPI_INIT ( ierr )
color =1; key=0
call MPI_COMM_RANK (MPI_COMM_WORLD, my_id, ierr)
call MPI_COMM_SIZE (MPI_COMM_WORLD, num_procs, ierr)
call MPI_Comm_split(MPI_COMM_WORLD, color,key,newcomm, ierr)
call MPI_FINALIZE ( ierr )
end
The error disappears if I include 'mpif.h' instead of using the MPI module. Why is that?
type(MPI_comm)
fornewcomm
... – Lionessinclude
approach lets all sorts of nonsense happen at run time. – Teletype