[petsc-users] global index distributed arrays

Matthew Knepley knepley at gmail.com
Fri Dec 10 18:53:37 CST 2010


On Sat, Dec 11, 2010 at 12:47 AM, Jed Brown <jed at 59a2.org> wrote:

> On Sat, Dec 11, 2010 at 01:40, Matthew Knepley <knepley at gmail.com> wrote:
>
>> I know that I could use some MPI commands to pass those indices among
>>> processors, but I was wondering if there a clean and neat way with which
>>> each processor can have access to the global index for any given 3-d index.
>>>
>>
>> ((k*N + j)*M + i)*C + c
>>
>
> Matt, you have seriously missed the point.
>
> Mohamad, there is not an easy way to calculate it for an arbitrary index,
> it necessarily involves a search.  Do you need it for arbitrary indices, or
> do you know in advance which global indices are needed?  DAGetAO() can give
> you what you are after, but there is usually a way to avoid using that code
> since it is not scalable.
>

What are you guys talking about? He is asking ("global index for any given
3-d index") for a map

  (i, j, k) -->  ((k*N + j)*M + i)*C + c

I can't imagine what you are searching for? The process which owns a given
index does not involve a search.

   Matt



> Jed
>



-- 
What most experimenters take for granted before they begin their experiments
is infinitely more interesting than any results to which their experiments
lead.
-- Norbert Wiener
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mcs.anl.gov/pipermail/petsc-users/attachments/20101211/d48cce62/attachment.htm>


More information about the petsc-users mailing list