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

Ted Sariyski tsariysk at craft-tech.com
Sat Apr 26 21:08:28 CDT 2014


Attached is a test program (mpi_alloc_mem is called from alloc.c).
'run' will compile tst.f90 and alloc.c, and run the code on two cpus. If line 99, "target_displacement=0", is commented out, code breaks.

/> mpif90 --version
GNU Fortran (GCC) 4.4.7 20120313 (Red Hat 4.4.7-4)

Thanks for the prompt response.
--Ted

> Can you send a small test program that can be compiled and run?
> Rajeev



On 04/26/2014 11:03 AM, Ted Sariyski wrote:
> 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)
>     ...


-- 
Ted Sariyski
Senior Research Scientist
Combustion Research & Flow Technology, Inc. (CRAFT Tech)
6210 Keller's Church Road, Pipersville, PA 18947-1020
Voice: (215) 766-1520 x14; Fax: (215) 766-1524
http://www.craft-tech.com

-------------- next part --------------
A non-text attachment was scrubbed...
Name: tst.gz
Type: application/x-gzip
Size: 1723 bytes
Desc: not available
URL: <http://lists.mpich.org/pipermail/discuss/attachments/20140426/6a84ae91/attachment.gz>


More information about the discuss mailing list