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

Maciej Szpindler m.szpindler at icm.edu.pl
Thu Apr 14 10:56:41 CDT 2016

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,
discuss mailing list     discuss at mpich.org
To manage subscription options or unsubscribe:

More information about the discuss mailing list