<div dir="ltr"><div>Hi Everyone,</div><div>I am experimenting with the Simlul@trophy tool (<a href="https://github.com/Inria-Asclepios/simul-atrophy">https://github.com/Inria-Asclepios/simul-atrophy</a>) that uses petsc to simulate brain atrophy based on segmented MRI data. I am not the author. I have this running on most of a dataset of about 50 scans, but experience crashes with several that I am trying to track down. However I am out of ideas. The problem images are slightly bigger than some of the successful ones, but not substantially so, and I have experimented on machines with sufficient RAM. The error happens very quickly, as part of setup - see the valgrind report below. I haven't managed to get the sgcheck tool to work yet. I can only guess that the ksp object is somehow becoming corrupted during the setup process, but the array sizes that I can track (which derive from image sizes), appear correct at every point I can check. Any suggestions as to how I can check what might go wrong in the setup of the ksp object?<br></div><div>Thankyou.<br></div><div><br></div><div>valgrind tells me:</div><div><br></div><div>==18175== Argument 'size' of function memalign has a fishy (possibly negative) value: -17152038144<br>==18175==    at 0x4C320A6: memalign (in /usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so)<br>==18175==    by 0x4F0F1F2: PetscMallocAlign(unsigned long, int, char const*, char const*, void**) (mal.c:28)<br>==18175==    by 0x56B43CA: MatSeqAIJSetPreallocation_SeqAIJ (aij.c:3595)<br>==18175==    by 0x56B39BD: MatSeqAIJSetPreallocation (aij.c:3539)<br>==18175==    by 0x59A9B44: DMCreateMatrix_DA_3d_MPIAIJ(_p_DM*, _p_Mat*) (fdda.c:1085)<br>==18175==    by 0x59A4C71: DMCreateMatrix_DA(_p_DM*, _p_Mat**) (fdda.c:759)<br>==18175==    by 0x58BBD29: DMCreateMatrix (dm.c:956)<br>==18175==    by 0x5E509D5: KSPSetUp (itfunc.c:262)<br>==18175==    by 0x40A3DE: PetscAdLemTaras3D::solveModel(bool) (PetscAdLemTaras3D.hxx:269)<br>==18175==    by 0x42413F: AdLem3D<3u>::solveModel(bool, bool, bool) (AdLem3D.hxx:552)<br>==18175==    by 0x41C25C: main (PetscAdLemMain.cxx:349)<br>==18175== <br></div><div><br>-- <br><div dir="ltr" class="gmail_signature" data-smartmail="gmail_signature"><div dir="ltr"><div>--<br>A/Prof Richard Beare<br>Imaging and Bioinformatics, Peninsula Clinical School</div><div><span><div><span><a href="http://orcid.org/0000-0002-7530-5664" target="_blank">orcid.org/0000-0002-7530-5664</a></span></div></span></div><div><a href="mailto:Richard.Beare@monash.edu" target="_blank">Richard.Beare@monash.edu</a><br>+61 3 9788 1724<br><span><br></span></div><div><br></div><div><span></span><br>Geospatial Research: <a href="https://www.monash.edu/medicine/scs/medicine/research/geospatial-analysis" target="_blank">https://www.monash.edu/medicine/scs/medicine/research/geospatial-analysis</a></div></div></div></div></div>