<div dir="auto">Valgrind does not play well with optimization flags. It's either 03 or march=native.  </div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">Il Mar 23 Feb 2021, 06:38 Barry Smith <<a href="mailto:bsmith@petsc.dev">bsmith@petsc.dev</a>> ha scritto:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div style="word-wrap:break-word;line-break:after-white-space"><div><br></div><div>  I knew they hate Macs but now Linux? Any trustworthy machines to run valgrind?</div><div><br></div><div><br></div><div><div style="margin:0px;font-stretch:normal;font-size:14px;line-height:normal;font-family:Menlo"><span style="font-variant-ligatures:no-common-ligatures">$ petscmpiexec -valgrind -n 1 ./ex238 -mat_block_size 12</span></div><div style="margin:0px;font-stretch:normal;font-size:14px;line-height:normal;font-family:Menlo"><span style="font-variant-ligatures:no-common-ligatures">==14144== </span></div><div style="margin:0px;font-stretch:normal;font-size:14px;line-height:normal;font-family:Menlo"><span style="font-variant-ligatures:no-common-ligatures">==14144== Process terminating with default action of signal 4 (SIGILL)</span></div><div style="margin:0px;font-stretch:normal;font-size:14px;line-height:normal;font-family:Menlo"><span style="font-variant-ligatures:no-common-ligatures">==14144==  Illegal opcode at address 0x4F808A9</span></div><div style="margin:0px;font-stretch:normal;font-size:14px;line-height:normal;font-family:Menlo"><span style="font-variant-ligatures:no-common-ligatures">==14144==    at 0x4F808A9: PetscSetDisplay (in /scratch/bsmith/petsc/arch-add-baij-12/lib/libpetsc.so.3.014.4)</span></div><div style="margin:0px;font-stretch:normal;font-size:14px;line-height:normal;font-family:Menlo"><span style="font-variant-ligatures:no-common-ligatures">==14144==    by 0x4F086BD: PetscOptionsCheckInitial_Private (in /scratch/bsmith/petsc/arch-add-baij-12/lib/libpetsc.so.3.014.4)</span></div><div style="margin:0px;font-stretch:normal;font-size:14px;line-height:normal;font-family:Menlo"><span style="font-variant-ligatures:no-common-ligatures">==14144==    by 0x4F0D5BC: PetscInitialize (in /scratch/bsmith/petsc/arch-add-baij-12/lib/libpetsc.so.3.014.4)</span></div><div style="margin:0px;font-stretch:normal;font-size:14px;line-height:normal;font-family:Menlo"><span style="font-variant-ligatures:no-common-ligatures">==14144==    by 0x108D0E: main (in /scratch/bsmith/petsc/src/mat/tests/ex238)</span></div><div style="margin:0px;font-stretch:normal;font-size:14px;line-height:normal;font-family:Menlo"><span style="font-variant-ligatures:no-common-ligatures">Illegal instruction (core dumped)</span></div><div style="margin:0px;font-stretch:normal;font-size:14px;line-height:normal;font-family:Menlo"><span style="font-variant-ligatures:no-common-ligatures">/scratch/bsmith/petsc/src/mat/tests</span><span style="font-variant-ligatures:no-common-ligatures;color:#c814c9"><b> (barry/2021-02-12/add-baij-12=)</b></span><span style="font-variant-ligatures:no-common-ligatures"> arch-add-baij-12</span></div><div style="margin:0px;font-stretch:normal;font-size:14px;line-height:normal;font-family:Menlo"><span style="font-variant-ligatures:no-common-ligatures">$ echo $PETSC_OPTIONS</span></div><div style="margin:0px;font-stretch:normal;font-size:14px;line-height:normal;font-family:Menlo;min-height:16px"><span style="font-variant-ligatures:no-common-ligatures"></span><br></div><div style="margin:0px;font-stretch:normal;font-size:14px;line-height:normal;font-family:Menlo"><span style="font-variant-ligatures:no-common-ligatures">/scratch/bsmith/petsc/src/mat/tests</span><span style="font-variant-ligatures:no-common-ligatures;color:#c814c9"><b> (barry/2021-02-12/add-baij-12=)</b></span><span style="font-variant-ligatures:no-common-ligatures"> arch-add-baij-12</span></div><div style="margin:0px;font-stretch:normal;font-size:14px;line-height:normal;font-family:Menlo"><span style="font-variant-ligatures:no-common-ligatures">$ hostname </span></div><div style="margin:0px;font-stretch:normal;font-size:14px;line-height:normal;font-family:Menlo"><span style="font-variant-ligatures:no-common-ligatures">petsc-02</span></div><div style="margin:0px;font-stretch:normal;font-size:14px;line-height:normal;font-family:Menlo"><span style="font-variant-ligatures:no-common-ligatures">/scratch/bsmith/petsc/src/mat/tests</span><span style="font-variant-ligatures:no-common-ligatures;color:#c814c9"><b> (barry/2021-02-12/add-baij-12=)</b></span><span style="font-variant-ligatures:no-common-ligatures"> arch-add-baij-12</span></div><div style="margin:0px;font-stretch:normal;font-size:14px;line-height:normal;font-family:Menlo"><span style="font-variant-ligatures:no-common-ligatures">$ uname -a</span></div><div style="margin:0px;font-stretch:normal;font-size:14px;line-height:normal;font-family:Menlo"><span style="font-variant-ligatures:no-common-ligatures">Linux petsc-02 4.15.0-135-generic #139-Ubuntu SMP Mon Jan 18 17:38:24 UTC 2021 x86_64 x86_64 x86_64 GNU/Linux</span></div><div style="margin:0px;font-stretch:normal;font-size:14px;line-height:normal;font-family:Menlo"><span style="font-variant-ligatures:no-common-ligatures">/scratch/bsmith/petsc/src/mat/tests</span><span style="font-variant-ligatures:no-common-ligatures;color:#c814c9"><b> (barry/2021-02-12/add-baij-12=)</b></span><span style="font-variant-ligatures:no-common-ligatures"> arch-add-baij-12</span></div><div style="margin:0px;font-stretch:normal;font-size:14px;line-height:normal;font-family:Menlo"><span style="font-variant-ligatures:no-common-ligatures">$ which valgrind</span></div><div style="margin:0px;font-stretch:normal;font-size:14px;line-height:normal;font-family:Menlo"><span style="font-variant-ligatures:no-common-ligatures">/usr/bin/valgrind</span></div></div><div><span style="font-variant-ligatures:no-common-ligatures"><br></span></div><div><span style="font-variant-ligatures:no-common-ligatures"><div style="margin:0px;font-stretch:normal;font-size:14px;line-height:normal;font-family:Menlo"><span style="font-variant-ligatures:no-common-ligatures">$ make ex237</span></div><div style="margin:0px;font-stretch:normal;font-size:14px;line-height:normal;font-family:Menlo"><span style="font-variant-ligatures:no-common-ligatures">gcc -fPIC -Wall -Wwrite-strings -Wno-strict-aliasing -Wno-unknown-pragmas -fstack-protector -fvisibility=hidden -march=native -O3  -fPIC -Wall -Wwrite-strings -Wno-strict-aliasing -Wno-unknown-pragmas -fstack-protector -fvisibility=hidden -march=native -O3    -I/scratch/bsmith/petsc/include -I/scratch/bsmith/petsc/arch-add-baij-12/include     ex237.c  -Wl,-rpath,/scratch/bsmith/petsc/arch-add-baij-12/lib -L/scratch/bsmith/petsc/arch-add-baij-12/lib -lpetsc -llapack -lblas -lpthread -lm -lX11 -lquadmath -ldl -o ex237</span></div><div style="margin:0px;font-stretch:normal;font-size:14px;line-height:normal;font-family:Menlo"><span style="font-variant-ligatures:no-common-ligatures">/scratch/bsmith/petsc/src/mat/tests</span><span style="font-variant-ligatures:no-common-ligatures;color:#c814c9"><b> (barry/2021-02-12/add-baij-12=)</b></span><span style="font-variant-ligatures:no-common-ligatures"> arch-add-baij-12</span></div><div style="margin:0px;font-stretch:normal;font-size:14px;line-height:normal;font-family:Menlo"><span style="font-variant-ligatures:no-common-ligatures">$ petscmpiexec -valgrind -n 1 ./ex237</span></div><div style="margin:0px;font-stretch:normal;font-size:14px;line-height:normal;font-family:Menlo"><span style="font-variant-ligatures:no-common-ligatures">==14841== </span></div><div style="margin:0px;font-stretch:normal;font-size:14px;line-height:normal;font-family:Menlo"><span style="font-variant-ligatures:no-common-ligatures">==14841== Process terminating with default action of signal 4 (SIGILL)</span></div><div style="margin:0px;font-stretch:normal;font-size:14px;line-height:normal;font-family:Menlo"><span style="font-variant-ligatures:no-common-ligatures">==14841==  Illegal opcode at address 0x4F808A9</span></div><div style="margin:0px;font-stretch:normal;font-size:14px;line-height:normal;font-family:Menlo"><span style="font-variant-ligatures:no-common-ligatures">==14841==    at 0x4F808A9: PetscSetDisplay (in /scratch/bsmith/petsc/arch-add-baij-12/lib/libpetsc.so.3.014.4)</span></div><div style="margin:0px;font-stretch:normal;font-size:14px;line-height:normal;font-family:Menlo"><span style="font-variant-ligatures:no-common-ligatures">==14841==    by 0x4F086BD: PetscOptionsCheckInitial_Private (in /scratch/bsmith/petsc/arch-add-baij-12/lib/libpetsc.so.3.014.4)</span></div><div style="margin:0px;font-stretch:normal;font-size:14px;line-height:normal;font-family:Menlo"><span style="font-variant-ligatures:no-common-ligatures">==14841==    by 0x4F0D5BC: PetscInitialize (in /scratch/bsmith/petsc/arch-add-baij-12/lib/libpetsc.so.3.014.4)</span></div><div style="margin:0px;font-stretch:normal;font-size:14px;line-height:normal;font-family:Menlo"><span style="font-variant-ligatures:no-common-ligatures">==14841==    by 0x109DE0: main (in /scratch/bsmith/petsc/src/mat/tests/ex237)</span></div><div style="margin:0px;font-stretch:normal;font-size:14px;line-height:normal;font-family:Menlo"><span style="font-variant-ligatures:no-common-ligatures">Illegal instruction (core dumped)</span></div><div style="margin:0px;font-stretch:normal;font-size:14px;line-height:normal;font-family:Menlo"><span style="font-variant-ligatures:no-common-ligatures">/scratch/bsmith/petsc/src/mat/tests</span><span style="font-variant-ligatures:no-common-ligatures;color:#c814c9"><b> (barry/2021-02-12/add-baij-12=)</b></span><span style="font-variant-ligatures:no-common-ligatures"> arch-add-baij-12</span></div><div style="margin:0px;font-stretch:normal;font-size:14px;line-height:normal;font-family:Menlo"><span style="font-variant-ligatures:no-common-ligatures"><br></span></div></span></div></div></blockquote></div>