[mpich-discuss] mpi_put works only with target_displacement=0

Ted Sariyski tsariysk at craft-tech.com
Sat Apr 26 10:03:14 CDT 2014


HI,
I am trying to apply RMA so that each process evaluates its segment of 
data and PUTs it at process 0. Here is what I do (see attachment):

     1. Process 0 creates a window win0 with size=GLOBAL_SIZE of the array
     2. Rest of processes create NULL() win0 with size 0.
     3. Eeach  process evaluates it portion dat with size myCount
     4. All create mpi_shared_lock on 0 (dat on different process are 
strictly non-overlapping)
     5. Put dat on 0 with appropriate offset (myOffset)

Code works on two cpus ONLY when target_displacement=0. If 
target_displacement=myOffset, I get:

 > rank 0 in job 383  craft28.craft-tech.com_57409   caused collective 
abort of all ranks
 > exit status of rank 0: killed by signal 11

What do I miss here?

Any help will be highly appreciated. Thank in advance,
--Ted

P.S. Mixed  C and  fortran90 with  mpich2.1.5 on Linux/x86_64 (CentOS 6.5)


  ...
    integer(mpi_address_kind) :: size=0,target_displacement=0
    if ( myid == 0 ) then
         call mpi_win_create(mdat,size,mpi_realsize,info,comm,win0,ierr)
     else
         call mpi_win_create(NULL(),0,1,info,comm,win0,ierr)
     end if
     ...
     target_rank=0
     call 
mpi_win_lock(mpi_lock_shared,target_rank,mpi_mode_nocheck,win0,ierr)
     ...
     origin_count=myCount
     target_count=myCount
     target_displacement=myOffset
     ...
     call 
mpi_put(ldat,origin_count,mpi_real,target_rank,target_displacement,target_count,mpi_real,win0,ierr)
     ...



More information about the discuss mailing list