<html><head><meta http-equiv="Content-Type" content="text/html charset=us-ascii"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; ">Thanks Rajeev. That makes sense now...and a modified version using separate storage per iteration works perfectly.<div><br></div><div>Tim.</div><div><br><div><div>On Mar 29, 2013, at 1:55 PM, Rajeev Thakur <<a href="mailto:thakur@mcs.anl.gov">thakur@mcs.anl.gov</a>> wrote:</div><br class="Apple-interchange-newline"><blockquote type="cite">MPI_Put is nonblocking. You are changing the contents of the source buffer before the put is complete.<br><br>Rajeev<br><br>On Mar 29, 2013, at 12:01 PM, Timothy Stitt wrote:<br><br><blockquote type="cite">Hi all,<br><br>I've come across some strange behavior with a code that uses MPI_PUT(). I can confirm that this problem appears in older MPICH2 v1.4.x releases as well as the latest MPICH v3.0.3 release. I can also confirm that I receive the correct results when using Open MPI.<br><br>I am attaching a reproducer code below that simulates the problem I am having (following the code will hopefully explain its purpose better than what I can describe here in a few lines). This case is hardcoded for a 4-process run. For some reason MPICH implementations are losing some data elements and duplicating others after the communication is complete. I would be grateful if someone can confirm whether this is indeed an implementation bug or a subtle problem with how I've implemented the one-sided communication.<br><br>Thanks in advance,<br><br>Tim.<br><br>program reproducer<br><br> use mpi<br><br> implicit none<br><br> integer :: error,dum_com(2),my_rank,i<br> integer :: win_values_points, type_integer,NProc=4<br> INTEGER(KIND=MPI_ADDRESS_KIND) :: win_values_size, target_disp<br> integer,allocatable :: neighbor_values(:), ncount_in(:)<br><br> call MPI_INIT(error)<br> call MPI_COMM_RANK(MPI_COMM_WORLD,my_rank,error)<br><br> CALL MPI_Type_size(MPI_INTEGER,type_integer,error)<br><br> ! Calculate Size Of Window (in bytes)<br> win_values_size=2*type_integer*NProc<br><br> ! Allocate Window Storage<br> allocate(neighbor_values(0:2*Nproc-1))<br> neighbor_values=0<br><br> ! Define Input Values<br> allocate(ncount_in(NProc))<br> if (my_rank .eq. 0) ncount_in = (/1,2,3,4/)<br> if (my_rank .eq. 1) ncount_in = (/5,6,7,8/)<br> if (my_rank .eq. 2) ncount_in = (/9,10,11,12/)<br> if (my_rank .eq. 3) ncount_in = (/13,14,15,16/)<br><br> ! Create Window<br> CALL MPI_WIN_CREATE(neighbor_values, win_values_size, type_integer, MPI_INFO_NULL, MPI_COMM_WORLD, win_values_points, error)   ! Create Neighbor Storage Win<br>dow<br> call MPI_Win_Fence(0,win_values_points,error)<br><br> ! Print pre-communication data<br> print*,my_rank,ncount_in<br> call flush(5)<br> call MPI_BARRIER(MPI_COMM_WORLD,error)<br><br> ! Communicate Data Values to all proceses<br> do i = 1,4<br>    target_disp=2*my_rank<br>    dum_com(1)=ncount_in(i)<br>    dum_com(2)=99<br>    CALL MPI_PUT(dum_com,2,MPI_INTEGER,Nproc-i,target_disp,2,MPI_INTEGER,win_values_points,error)<br> end do<br><br> call MPI_Win_Fence(0,win_values_points,error)<br><br> ! Print post-communication values<br> print *<br> print *,my_rank,neighbor_values<br> call flush(5)<br> call MPI_BARRIER(MPI_COMM_WORLD,error)<br><br> ! Free Window Storage<br> call mpi_win_free(win_values_points,error)<br><br> call MPI_FINALIZE(error)<br><br>end program reproducer<br><br><br>_______________________________________________<br>discuss mailing list     <a href="mailto:discuss@mpich.org">discuss@mpich.org</a><br>To manage subscription options or unsubscribe:<br><a href="https://lists.mpich.org/mailman/listinfo/discuss">https://lists.mpich.org/mailman/listinfo/discuss</a><br></blockquote><br>_______________________________________________<br>discuss mailing list     <a href="mailto:discuss@mpich.org">discuss@mpich.org</a><br>To manage subscription options or unsubscribe:<br><a href="https://lists.mpich.org/mailman/listinfo/discuss">https://lists.mpich.org/mailman/listinfo/discuss</a><br></blockquote></div><br><div apple-content-edited="true">

<div id="sig" style="border-top: 1px dotted rgb(153, 153, 153); border-bottom: 1px dotted rgb(153, 153, 153); margin: 6px 0pt; padding: 8px; min-height: 50px; line-height: 17px; font-family: 'Lucida Grande',Verdana,Arial,Sans-Serif; font-size: 11px; color: rgb(96, 111, 120); min-width: 250px;"><!--This is the image. Upload an image to your own server or imageshack.us and replace the url in this tag-->
 
    
      <!--<img src="http://www.rostauguardian.webuda.com/photo.jpg" alt="me"
 style="padding: 2px 6px 0pt 0pt; float: left; width: 46px; height: 45px;">-->
      <!--end--><!--replace details outside the <> tag brackets. Your name, company, etc. Also change the URLs where needed.
You can also replace the text colour #606f78 to anything you choose-->
      <strong style="color: rgb(255, 102, 0); font-weight: bold;">Tim
Stitt</strong> <span style="color: rgb(255, 102, 0); font-weight: bold;">PhD</span><br>
  <span style="color: rgb(0, 153, 0);">User Support Manager (CRC)</span><br><span style="color: rgb(0, 153, 0);">Research Assistant Professor (Computer Science & Engineering)</span><br>
    Room 108, Center for Research Computing | University of Notre Dame
    | <br>
  <!--the <br /> tag (above) signifies a line break. Add that tag anywhere you want the line to break into another one. Remove that to make the bottom line flow to the right of the one above it-->
    P.O.
    Box 539,
    Notre Dame, IN 46556 | Phone: 
    574-631-5287
  | Email: <span style="color: rgb(51, 51, 255);"><a href="mailto:tstitt@nd.edu">tstitt@nd.edu</a> </span>
</div>


</div>
<br></div></body></html>