[mpich-discuss] mpi_put works only with target_displacement=0
Balaji, Pavan
balaji at anl.gov
Sat Apr 26 12:20:21 CDT 2014
As Rajeev mentioned, a test program is most useful.
The most common error in these kind of programs is the displacement unit provided to win_create. Remember that the offset given to PUT is multiplied with the displacement unit given to win_create.
— Pavan
On Apr 26, 2014, at 10:58 AM, Rajeev Thakur <thakur at mcs.anl.gov> wrote:
> Can you send a small test program that can be compiled and run?
>
> Rajeev
>
> On Apr 26, 2014, at 10:03 AM, Ted Sariyski <tsariysk at craft-tech.com> 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)
>> ...
>> _______________________________________________
>> 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