[mpich-discuss] Is it allowed to attach automatic array for remote access with MPI_Win_attach?

Thakur, Rajeev thakur at mcs.anl.gov
Thu Apr 14 12:21:44 CDT 2016


After the Win_attach, did you add a barrier or some other form of synchronization? The put shouldn’t happen before Win_attach returns.

Rajeev

> On Apr 14, 2016, at 10:56 AM, Maciej Szpindler <m.szpindler at icm.edu.pl> wrote:
> 
> Dear All,
> 
> I am trying to use dynamic RMA windows in fortran. In my case I would
> like to attach automatic array to dynamic window. The question is if
> it is correct and allowed in MPICH. I feel that it is not working, at
> least in cray-mpich/7.3.2.
> 
> I have a subroutine that use RMA windows:
> 
> SUBROUTINE foo(x, y, z , ...)
> 
> USE mpi
> ...
> 
> INTEGER, INTENT(IN) :: x, y, z
> REAL(KIND=8) :: buffer(x, y, z)
> INTEGER(kind=MPI_INTEGER_KIND) :: win_info, win, comm
> INTEGER(kind=MPI_INTEGER_KIND) :: buff_size
> ...
> 
> buff_size = x*y*z*8
> 
> CALL MPI_Info_create(win_info, ierror)
> CALL MPI_Info_set(win_info, "no_locks", "true", ierror)
> 
> CALL MPI_Win_create_dynamic(win_info, comm, win, ierror)
> 
> CALL MPI_Win_attach(win, buffer, buff_size, ierror)
> 
> ...
> 
> This produces segmentation fault when MPI_Put is called on a window,
> while exactly the same routine code with static MPI_Win_create on
> buffer instead of create_dynamic+attach works fine. As far as I
> understand buffer is in this case "simply contiguous" in a sense of
> the MPI Standard. Any help would be appreciated!
> 
> Best Regards,
> Maciej
> _______________________________________________
> discuss mailing list     discuss at mpich.org
> To manage subscription options or unsubscribe:
> https://lists.mpich.org/mailman/listinfo/discuss

_______________________________________________
discuss mailing list     discuss at mpich.org
To manage subscription options or unsubscribe:
https://lists.mpich.org/mailman/listinfo/discuss


More information about the discuss mailing list