<html><head><meta http-equiv="Content-Type" content="text/html; charset=utf-8"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; line-break: after-white-space;" class=""><br class=""><div><br class=""><blockquote type="cite" class=""><div class="">On Mar 21, 2019, at 7:59 PM, Derek Gaston <<a href="mailto:friedmud@gmail.com" class="">friedmud@gmail.com</a>> wrote:</div><br class="Apple-interchange-newline"><div class=""><div dir="ltr" class=""><div dir="ltr" class=""><div class="">It sounds like you already tracked this down... but for completeness here is what track-origins gives:</div><div class=""><br class=""></div><div class="">==262923== Conditional jump or move depends on uninitialised value(s)<br class="">==262923== at 0x73C6548: VecScatterMemcpyPlanCreate_Index (vscat.c:294)<br class="">==262923== by 0x73DBD97: VecScatterMemcpyPlanCreate_PtoP (vpscat_mpi1.c:312)<br class="">==262923== by 0x73DE6AE: VecScatterCreateCommon_PtoS_MPI1 (vpscat_mpi1.c:2328)<br class="">==262923== by 0x73DFFEA: VecScatterCreateLocal_PtoS_MPI1 (vpscat_mpi1.c:2202)<br class="">==262923== by 0x73C7A51: VecScatterCreate_PtoS (vscat.c:608)<br class="">==262923== by 0x73C9E8A: VecScatterSetUp_vectype_private (vscat.c:857)<br class="">==262923== by 0x73CBE5D: VecScatterSetUp_MPI1 (vpscat_mpi1.c:2543)<br class="">==262923== by 0x7413D39: VecScatterSetUp (vscatfce.c:212)<br class="">==262923== by 0x7412D73: VecScatterCreateWithData (vscreate.c:333)<br class="">==262923== by 0x747A232: VecCreateGhostWithArray (pbvec.c:685)<br class="">==262923== by 0x747A90D: VecCreateGhost (pbvec.c:741)<br class="">==262923== by 0x5C7FFD6: libMesh::PetscVector<double>::init(unsigned long, unsigned long, std::vector<unsigned long, std::allocator<unsigned long> > const&, bool, libMesh::ParallelType) (petsc_vector.h:752)<br class="">==262923== Uninitialised value was created by a heap allocation<br class="">==262923== at 0x402DDC6: memalign (vg_replace_malloc.c:899)<br class="">==262923== by 0x7359702: PetscMallocAlign (mal.c:41)<br class="">==262923== by 0x7359C70: PetscMallocA (mal.c:390)<br class="">==262923== by 0x73DECF0: VecScatterCreateLocal_PtoS_MPI1 (vpscat_mpi1.c:2061)<br class="">==262923== by 0x73C7A51: VecScatterCreate_PtoS (vscat.c:608)<br class="">==262923== by 0x73C9E8A: VecScatterSetUp_vectype_private (vscat.c:857)<br class="">==262923== by 0x73CBE5D: VecScatterSetUp_MPI1 (vpscat_mpi1.c:2543)<br class="">==262923== by 0x7413D39: VecScatterSetUp (vscatfce.c:212)<br class="">==262923== by 0x7412D73: VecScatterCreateWithData (vscreate.c:333)<br class="">==262923== by 0x747A232: VecCreateGhostWithArray (pbvec.c:685)<br class="">==262923== by 0x747A90D: VecCreateGhost (pbvec.c:741)<br class="">==262923== by 0x5C7FFD6: libMesh::PetscVector<double>::init(unsigned long, unsigned long, std::vector<unsigned long, std::allocator<unsigned long> > const&, bool, libMesh::ParallelType) (petsc_vector.h:752)</div><div class=""><br class=""></div><div class=""><br class=""></div><div class="">BTW: This turned out not to be my actual problem. My actual problem was just some stupidity on my part... just a simple input parameter issue to my code (should have had better error checking!).</div><div class=""><br class=""></div><div class="">But: It sounds like my digging may have uncovered something real here... so it wasn't completely useless :-)<br class=""></div></div></div></div></blockquote><div><br class=""></div><div>Derek,</div><div><br class=""></div><div>I don’t understand. Is your problem fixed or not? Would be nice to understand what was the “some stupidity on your part”, and if it was still leading to valid PETSc code or just to a broken setup.</div><div>In the first case, then we should investigate the valgrind error you reported.</div><div>In the second case, this is not a PETSc issue.</div><br class=""><blockquote type="cite" class=""><div class=""><div dir="ltr" class=""><div dir="ltr" class=""><div class=""><br class=""></div><div class="">Thanks for your help everyone!</div><div class=""><br class=""></div><div class="">Derek</div><div class=""><br class=""></div><div class=""><br class=""></div></div></div><br class=""><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Thu, Mar 21, 2019 at 10:38 AM Stefano Zampini <<a href="mailto:stefano.zampini@gmail.com" class="">stefano.zampini@gmail.com</a>> wrote:<br class=""></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr" class=""><div dir="ltr" class=""><br class=""></div><br class=""><div class="gmail_quote"><div dir="ltr" class="gmail_attr">Il giorno mer 20 mar 2019 alle ore 23:40 Derek Gaston via petsc-users <<a href="mailto:petsc-users@mcs.anl.gov" target="_blank" class="">petsc-users@mcs.anl.gov</a>> ha scritto:<br class=""></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr" class=""><div dir="ltr" class=""><div dir="ltr" class=""><div dir="ltr" class=""><div dir="ltr" class=""><div class="">Trying to track down some memory corruption I'm seeing on larger scale runs (3.5B+ unknowns).</div></div></div></div></div></div></blockquote><div class=""><br class=""></div><div class="">Uhm.... are you using 32bit indices? is it possible there's integer overflow somewhere?</div><div class=""><br class=""></div><div class=""> </div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr" class=""><div dir="ltr" class=""><div dir="ltr" class=""><div dir="ltr" class=""><div dir="ltr" class=""><div class="">Was able to run Valgrind on it... and I'm seeing quite a lot of uninitialized value errors coming from ghost updating. Here are some of the traces:</div><div class=""><br class=""></div><div class="">==87695== Conditional jump or move depends on uninitialised value(s)<br class="">==87695== at 0x73236D3: PetscMallocAlign (mal.c:28)<br class="">==87695== by 0x7323C70: PetscMallocA (mal.c:390)<br class="">==87695== by 0x739048E: VecScatterMemcpyPlanCreate_Index (vscat.c:284)<br class="">==87695== by 0x73A5D97: VecScatterMemcpyPlanCreate_PtoP (vpscat_mpi1.c:312)<br class="">==64730== by 0x7393E8A: VecScatterSetUp_vectype_private (vscat.c:857)<br class="">==64730== by 0x7395E5D: VecScatterSetUp_MPI1 (vpscat_mpi1.c:2543)<br class="">==64730== by 0x73DDD39: VecScatterSetUp (vscatfce.c:212)<br class="">==64730== by 0x73DCD73: VecScatterCreateWithData (vscreate.c:333)<br class="">==64730== by 0x7444232: VecCreateGhostWithArray (pbvec.c:685)<br class="">==64730== by 0x744490D: VecCreateGhost (pbvec.c:741)<br class=""></div><div class=""><br class=""></div><div class="">==133582== Conditional jump or move depends on uninitialised value(s)<br class="">==133582== at 0x4030384: memcpy@@GLIBC_2.14 (vg_replace_strmem.c:1034)<br class="">==133582== by 0x739E4F9: PetscMemcpy (petscsys.h:1649)<br class="">==133582== by 0x739E4F9: VecScatterMemcpyPlanExecute_Pack (vecscatterimpl.h:150)<br class="">==133582== by 0x739E4F9: VecScatterBeginMPI1_1 (vpscat_mpi1.h:69)<br class="">==133582== by 0x73DD964: VecScatterBegin (vscatfce.c:110)<br class="">==133582== by 0x744E195: VecGhostUpdateBegin (commonmpvec.c:225)<br class=""></div><div class=""><br class=""></div><div class="">This is from a Git checkout of PETSc... the hash I branched from is: 0e667e8fea4aa from December 23rd (updating would be really hard at this point as I've completed 90% of my dissertation with this version... and changing PETSc now would be pretty painful!).</div><div class=""><br class=""></div><div class="">Any ideas? Is it possible it's in my code? Is it possible that there are later PETSc commits that already fix this?</div><div class=""><br class=""></div><div class="">Thanks for any help,</div><div class="">Derek<br class=""></div><div class=""><br class=""></div></div></div></div></div></div>
</blockquote></div><br clear="all" class=""><div class=""><br class=""></div>-- <br class=""><div dir="ltr" class="gmail-m_-5560039915233761407gmail_signature">Stefano</div></div>
</blockquote></div>
</div></blockquote></div><br class=""></body></html>