[mpich-discuss] datatypes and MPI-3 shared memory windows

Min Si msi at anl.gov
Thu May 10 16:13:50 CDT 2018


Hi Lux,

You can still use MPI send/receive or MPI RMA with datatypes to exchange 
the halo region in a shared window, similar to the flat-MPI version. But 
I think you might want to completely avoid extra copies for intra-node 
neighbors when using shared window. I.e., instead of copying the edge 
elements to neighbors' halo, a process can directly read the edge 
elements owned by a neighbor if it is in the same shared window. Thus, 
you use MPI communication with datatypes only for neighbors who are on 
remote node.

Min

On 2018/05/10 12:00, Luis Cebamanos wrote:
> Hi Min,
>
> Thanks for your help. My intention is to use shared mem windows in a 3D
> halo exchange communication. The application already uses complex MPI
> datatypes for the exchange of edges and corners. I guess my question is
> how should I deal with this? Should I manually unpack the MPI datatypes
> into a shared memory buffer, then communicate (intra- and inter- node)
> and finally pack the data back to its original data structure so the
> simulation can carry on with other operations.
>
> double *baseptr;
> MPI_Win_allocate_shared (len, 1, MPI_INFO_NULL, mpi3->shmcomm,
>                                           &baseptr, &mpi3->win);
>
> Pointer baseptr gives me the address to the shared mem window, but I
> cannot see the way of using datatypes in the shared mem created.
>
> Thanks
> Lux
>
> On 10/05/2018 16:53, Min Si wrote:
>> Hi Lux,
>>
>> Yes, you can use MPI datatype with shared window. Can you provide more
>> information about the purpose to use shared window thus we can give
>> appropriate suggestion ?
>>
>> Best regards,
>> Min
>>
>> On 2018/05/10 10:05, Luis Cebamanos wrote:
>>> Hi all,
>>>
>>> Is there a way to deal with MPI datatypes when using shmm windows? What
>>> is the advice to convert a flat MPI code that uses MPI datatypes for
>>> halo exchanges to use shmm windows?
>>>
>>> Thanks!
>>> Lux
>>>
>>>
>>> _______________________________________________
>>> 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
> _______________________________________________
> 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