[Mpi-forum] Interest of changing lower bound in MPI_Type_create_resized

Thakur, Rajeev thakur at anl.gov
Fri Dec 9 17:34:03 CST 2016


You are right. It is buf + i*extent, not lower_bound + i*extent. This stuff is confusing. Right now, I am not coming up with a good example of where a non-zero lower bound makes a difference.

Rajeev


> On Dec 9, 2016, at 9:31 AM, lecas at idris.fr <dimitri.lecas at idris.fr> wrote:
> 
> Le 12/08/2016 à 03:14 PM, Thakur, Rajeev a écrit :
>> When MPI sends a message, the second datatype is taken from the location (lower bound + extent), the third datatype from (lower bound + 2*extent), and so on. So the lower bound does affect what is sent.
>> 
>> Rajeev
>> 
> 
> This is not what i understand from the chapter 4.1.11 Use of General
> Datatypes in Communication
> 
> If a datatype have n entries and we are sending count datatype
> 
> i=0,..., count-1
> j=0,..,n-1
> 
> So the address in memory to get each entries is : addr(i,j) =
> buf+extent*i+disp(j)
> 
> There is nowhere the usage of lower bound for having location of next
> datatype.
> buf is the argument in send/recv function.
> 
> 
> 
>>> On Dec 8, 2016, at 7:54 AM, lecas at idris.fr <dimitri.lecas at idris.fr> wrote:
>>> 
>>> Hi,
>>> 
>>> In MPI_Type_create_resized we can change the extent  and the lower bound.
>>> 
>>> I don't understand what is the interest of changing the lower bound,
>>> since for sending message, only the extent is used.
>>> 
>>> Is  there an example where the value for lower bound in
>>> MPI_Type_create_resized have a real impact ?
>>> 
>>> Thanks
>>> 
>>> -- 
>>> ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
>>> Dimitri Lecas
>>> 
>>> 
>>> _______________________________________________
>>> mpi-forum mailing list
>>> mpi-forum at lists.mpi-forum.org
>>> https://lists.mpi-forum.org/mailman/listinfo/mpi-forum
>> _______________________________________________
>> mpi-forum mailing list
>> mpi-forum at lists.mpi-forum.org
>> https://lists.mpi-forum.org/mailman/listinfo/mpi-forum
>> 
> 
> 
> -- 
> ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
> Dimitri Lecas
> ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
> 
> 
> _______________________________________________
> mpi-forum mailing list
> mpi-forum at lists.mpi-forum.org
> https://lists.mpi-forum.org/mailman/listinfo/mpi-forum

_______________________________________________
mpi-forum mailing list
mpi-forum at lists.mpi-forum.org
https://lists.mpi-forum.org/mailman/listinfo/mpi-forum



More information about the mpi-forum mailing list