Dear Stefano, Thanks for your response. I have re-run the command as per your suggestion below, and I get the full output as attached to this email ( the output was quite long so I thought it better to attach it). However, I am wondering whether the following lines of this output, which occur just when the program fails, may be something to do with the problem ? Many thanks, Dan. . . . check 01: 10 0 9 check 02: 10 0 9 4 4 4 4 4 4 4 4 4 4 now for PetscIntView ... 0: 4 4 4 4 4 4 4 4 4 4 ==841883== Invalid write of size 4 ==841883== at 0x503E784: petscintview_ (/data/work/slepc/PETSC/petsc-3.14.5/src/sys/error/ftn-custom/zerrf.c:109) ==841883== by 0x40262C: all_stab_routines_mp_write_rows_to_petsc_matrix_ (/data/work/rotplane/omega_to_zero/stability/test/tmp10/tmp3/tryme.F:17) ==841883== by 0x402465: MAIN__ (/data/work/rotplane/omega_to_zero/stability/test/tmp10/tmp3/tryme.F:40) ==841883== by 0x402221: main (in /data/work/rotplane/omega_to_zero/stability/test/tmp10/tmp3/trashy.exe) ==841883== Address 0x0 is not stack'd, malloc'd or (recently) free'd ==841883== [0]PETSC ERROR: ------------------------------------------------------------------------[0]PETSC ERROR: Caught signal number 11 SEGV: Segmentation Violation, probably memory access out of range . . . ________________________________ From: Stefano Zampini <[email protected]> Sent: Friday, April 9, 2021 9:17 AM To: dazza simplythebest <[email protected]> Cc: [email protected] <[email protected]> Subject: Re: [petsc-users] Newbie question: Strange failure when calling PetscIntView from slepc application This way you are running mpiexec.hydra under valgrind. You want to run instead mpiexec.hydra -n 1 valgrind --track-origins=yes --leak-check=full --fullpath-after= ./trashy.exe On Apr 9, 2021, at 12:11 PM, dazza simplythebest <[email protected]<mailto:[email protected]>> wrote: valgrind --track-origins=yes --leak-check=full mpiexec.hydra -n 1 ./trashy.exe