<div dir="ltr"><div class="gmail_extra"><div class="gmail_quote">On Wed, Jan 4, 2017 at 4:21 PM, Manuel Valera <span dir="ltr"><<a href="mailto:mvalera@mail.sdsu.edu" target="_blank">mvalera@mail.sdsu.edu</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr">Hello all, happy new year,<div><br></div><div>I'm working on parallelizing my code, it worked and provided some results when i just called more than one processor, but created artifacts because i didn't need one image of the whole program in each processor, conflicting with each other. </div><div><br></div><div>Since the pressure solver is the main part i need in parallel im chosing mpi to run everything in root processor until its time to solve for pressure, at this point im trying to create a distributed vector using either </div><div><br></div><div><p style="margin:0px;font-size:11px;line-height:normal;font-family:menlo"><span style="font-variant-ligatures:no-common-ligatures"> </span><span style="font-variant-ligatures:no-common-ligatures;color:rgb(52,187,199)">call</span><span style="font-variant-ligatures:no-common-ligatures"> VecCreateMPI(PETSC_COMM_WORLD,<wbr>PETSC_DECIDE,nbdp,xp,ierr)</span></p></div><div><span style="font-variant-ligatures:no-common-ligatures">or</span></div><div><span style="font-variant-ligatures:no-common-ligatures"><p style="margin:0px;font-size:11px;line-height:normal;font-family:menlo"><span style="font-variant-ligatures:no-common-ligatures;color:rgb(52,187,199)"> call</span><span style="font-variant-ligatures:no-common-ligatures"> VecCreate(PETSC_COMM_WORLD,xp,<wbr>ierr); CHKERRQ(ierr)</span></p><p style="margin:0px;font-size:11px;line-height:normal;font-family:menlo;color:rgb(83,48,225)"><span style="font-variant-ligatures:no-common-ligatures;color:rgb(0,0,0)"> </span><span style="font-variant-ligatures:no-common-ligatures;color:rgb(52,187,199)">call</span><span style="font-variant-ligatures:no-common-ligatures;color:rgb(0,0,0)"> VecSetType(xp,VECMPI,ierr) </span></p><p style="margin:0px;font-size:11px;line-height:normal;font-family:menlo"><span style="font-variant-ligatures:no-common-ligatures"> </span><span style="font-variant-ligatures:no-common-ligatures;color:rgb(52,187,199)">call</span><span style="font-variant-ligatures:no-common-ligatures"> VecSetSizes(xp,PETSC_DECIDE,<wbr>nbdp,ierr); CHKERRQ(ierr)</span><br></p><p style="margin:0px;font-size:11px;line-height:normal;font-family:menlo"><span style="font-variant-ligatures:no-common-ligatures"><br></span></p><p style="margin:0px;font-size:11px;line-height:normal;font-family:menlo"><span style="font-variant-ligatures:no-common-ligatures"><br></span></p><p style="margin:0px;line-height:normal"><span style="font-variant-ligatures:no-common-ligatures"><font face="arial, helvetica, sans-serif">In both cases program hangs at this point, something it never happened on the naive way i described before. I've made sure the global size, nbdp, is the same in every processor. What can be wrong?</font></span></p></span></div></div></blockquote><div><br></div><div>It sounds like every process is not calling this function. This will cause a hang since its collective.</div><div><br></div><div> Matt</div><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><div><span style="font-variant-ligatures:no-common-ligatures"><p style="margin:0px;line-height:normal"><span style="font-variant-ligatures:no-common-ligatures"><font face="arial, helvetica, sans-serif">Thanks for your kind help,</font></span></p><p style="margin:0px;line-height:normal"><span style="font-variant-ligatures:no-common-ligatures"><font face="arial, helvetica, sans-serif"><br></font></span></p><p style="margin:0px;line-height:normal"><span style="font-variant-ligatures:no-common-ligatures"><font face="arial, helvetica, sans-serif">Manuel.</font></span></p></span></div></div>
</blockquote></div><br><br clear="all"><div><br></div>-- <br><div class="gmail_signature" data-smartmail="gmail_signature">What most experimenters take for granted before they begin their experiments is infinitely more interesting than any results to which their experiments lead.<br>-- Norbert Wiener</div>
</div></div>