On Aug 19, 2019, at 6:15 AM, Sangam B via users <users@lists.open-mpi.org> 
wrote:
> 
> subroutine recv(this,lmb)
>     class(some__example6), intent(inout) ::  this
>     integer, intent(in) :: lmb(2,2)
> 
>     integer :: cs3, ierr
>     integer(kind=C_LONG) :: size

This ^^ is your problem.  More below.

>     ! receive only from buffer at different process
>     if(this%is_bf_referred) return
> 
>     cs3=this%uspecifier%get_recv_buff_3rd_dim_size(this%xb,this%vwb,lmb)
>     if(cs3.eq.0) return ! nothing to recv
> 
>     size = this%size_dim(this%gi)*this%size_dim(this%gj)*cs3
>     if(this%is_exchange_off) then
>        call this%update_stats(size)
>        this%bf(:,:,1:cs3) = cmplx(0.,0.)
>     else
>        call MPI_Irecv(this%bf(:,:,1:cs3),size,MPI_COMPLEX_TYPE,&
>             this%nrank,this%tag,this%comm_xvw,this%request,ierr)

You are calling MPI_Irecv with "size" as the "COUNT" dummy parameter for 
MPI_IRECV.  According to the MPI spec, this parameter must be a plain INTEGER.

This is why the compiler is erring: Fortran will not automatically cast an 
INTEGER(kind=C_LONG) to INTEGER, and therefore it cannot find a matching 
interface for MPI_IRECV in Open MPI's "mpi" module.

This is valid and correct behavior for the compiler and Open MPI.

The other MPI's may compile if they are not doing strict type checking in their 
"mpi" module -- but depending on the characteristics of the parameter mismatch, 
you may experience run-time problems.  Open MPI's "mpi" module does strict 
compile-time type checking, meaning that what happened is exactly what is 
supposed to happen: you got a compiler error because you tried to pass a 
parameter of the wrong type.  That's actually a good thing!

(Note: I didn't check the other param types; I just stopped when I saw that 
"size" was the wrong type -- you should check the other param types, too)

-- 
Jeff Squyres
jsquy...@cisco.com




_______________________________________________
users mailing list
users@lists.open-mpi.org
https://lists.open-mpi.org/mailman/listinfo/users

Reply via email to