My system is Ubuntu Bash shell on Windows.
I use gfortran GNU Fortran (Ubuntu 5.4.0-6ubuntu1~16.04.5) 5.4.0 20160609 and gcc version 5.4.0 20160609 (Ubuntu 5.4.0-6ubuntu1~16.04.5). and OpenMPI to compile a file.
The flag is:
mpifort -ffree-form -g -fbacktrace -UREPSOILM -UNLDAS2 -c test-mpi.f90
PROGRAM test
USE MPI
IMPLICIT NONE
REAL, DIMENSION(2) :: xcug2m
INTEGER :: NODID, NUMPROCS, IERROR, COMM, DISPLS
REAL, DIMENSION(1) :: cug2m
INTEGER :: NPROCS=2, root
INTEGER :: SENDCOUNTS=1
INTEGER :: i
CALL MPI_INIT(IERROR)
CALL MPI_COMM_RANK(COMM, NODID, IERROR)
CALL MPI_COMM_SIZE(COMM, NUMPROCS, IERROR)
xcug2m = (/1,2/)
do i = 1,2
CALL MPI_SCATTERV(xcug2m(i), SENDCOUNTS, DISPLS, MPI_REAL, &
cug2m, SENDCOUNTS, MPI_REAL, root, COMM, IERROR)
end do
END PROGRAM test
The error is:
CALL MPI_SCATTERV(xc(:,i,j ), SCOUNT, DISPLS, MPI_REAL, c(:,i ),
SCOUNT, MPI_REAL, 0, MPI_COMM_WORLD, IER)
1
Error: There is no specific subroutine for the generic ‘mpi_scatterv’ at (1).
I have read MPI_scatterv 's manual but found nothing. The syntax is OK. I used to compile in server with ifort and OpenMPI. There is no error and runs good.
Could you help me to solve this problem? I searched for several days.