[petsc-users] A way to distribute 3D arrays.

Matthew Knepley knepley at gmail.com
Wed Feb 15 20:01:21 CST 2017


On Wed, Feb 15, 2017 at 7:16 PM, Manuel Valera <mvalera at mail.sdsu.edu>
wrote:

> Hello,
>
> My question this time is just if there is a way to distribute a 3D array
> whos located at Zero rank over the processors, if possible using the DMDAs,
> i'm trying not to do a lot of initialization I/O in parallel.
>

1) You could create a VecScatter to do exactly what you want. This is time
consuming and  error prone.

2) You could

  a) Read the data into a Vec from a serial DMDA with those dimensions, and
write it out in binary as a Petsc Vec.

  b) Read in the Petsc Vec for a distributed DMDA of the same dimensions.
This will happen in parallel.

  Thanks,

     Matt


> Thanks for your time,
>
> Manuel
>



-- 
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/20170215/774d3b02/attachment.html>


More information about the petsc-users mailing list