<div dir="ltr">I need both right and left vectors for use in a SLEPc SVD decomposition; it is my understanding that the correct layout is obtained with MatCreateVecs and that only the layout for the right vector is created with <span style="font-size:13px">DMCreateGlobalVector.</span><div><span style="font-size:13px"><br></span></div><div><span style="font-size:13px">Or I might be wrong and there is actually no difference! If so I will use </span><span style="font-size:13px">DMCreateGlobalVector without any problem</span><br></div><div><span style="font-size:13px"><br></span></div><div><span style="font-size:13px">Thanks</span></div><div><span style="font-size:13px"><br></span></div><div><span style="font-size:13px">Gianluca</span></div><div><div><br></div><div><br><div><span style="font-size:13px"><br></span></div><div><span style="font-size:13px"><br></span></div></div></div></div><div class="gmail_extra"><br><div class="gmail_quote">On Thu, Jul 16, 2015 at 9:14 AM, Jed Brown <span dir="ltr"><<a href="mailto:jed@jedbrown.org" target="_blank">jed@jedbrown.org</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><span class="">Gianluca Meneghello <<a href="mailto:gianmail@gmail.com">gianmail@gmail.com</a>> writes:<br>
<br>
> Hi again,<br>
><br>
> I am now trying to write a vector to an HDF5, this time using a DM<br>
> structure to impose the vector layout.<br>
><br>
> Creating the vector with (as in src/dm/examples/tutorials/ex10.c)<br>
><br>
> DMCreateGlobalVector(da2D,&gauss);<br>
><br>
> every works fine, i.e. the hdf5 file has the correct layout given by the<br>
> dimension of the DM. On the other side, if I use:<br>
><br>
> VecCreate(PETSC_COMM_WORLD,&gauss);<br>
> VecSetSizes(gauss,PETSC_DECIDE,Nx*Ny);<br>
> VecSetDM(gauss,da2D);<br>
<br>
</span>VecSetDM only associates a DM with the Vec. It does not interpose<br>
itself into VecView.<br>
<br>
Should we change this so that creating a Vec of the correct size/block<br>
size/layout and associating a DM is equivalent? Perhaps, but it's more<br>
nuanced than it might seem.<br>
<br>
Why don't you want to just call DMCreateGlobalVector()?<br>
</blockquote></div><br></div>