title: There is no specific subroutine for the generic ‘mpi_scatterv’ at (1)
body: <p>My system is Ubuntu Bash shell on Windows.</p>
  
  <p>I use gfortran GNU Fortran (<em>Ubuntu 5.4.0-6ubuntu1~16.04.5</em>) 5.4.0 20160609
  and gcc version 5.4.0 20160609 (<em>Ubuntu 5.4.0-6ubuntu1~16.04.5</em>).
  and OpenMPI to compile a file.</p>
  
  <p>The flag is: </p>
  
  <blockquote>
    <p>mpifort -ffree-form -g -fbacktrace -UREPSOILM -UNLDAS2 -c test-mpi.f90</p>
  </blockquote>
  
  <pre><code>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,  &amp;
                    cug2m,    SENDCOUNTS, MPI_REAL, root, COMM, IERROR)
  end do
  
  
  
  END PROGRAM test
  </code></pre>
  
  <p>The error is:</p>
  
  <pre><code>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).
  </code></pre>
  
  <p>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.</p>
  
  <p>Could you help me to solve this problem? I searched for several days.</p>