<div dir="ltr">Usually this means you have an uninitialized variable that is causing you to overwrite memory. Fortran<div>is so lax in checking this, its one reason to switch to C.</div><div><br></div><div> Thanks,</div><div><br></div><div> Matt</div></div><div class="gmail_extra"><br><div class="gmail_quote">On Thu, May 26, 2016 at 1:46 AM, Constantin Nguyen Van <span dir="ltr"><<a href="mailto:constantin.nguyen.van@openmailbox.org" target="_blank">constantin.nguyen.van@openmailbox.org</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Thanks for all your answers.<br>
I'm sorry for the syntax mistake in MatLoad, it was done afterwards.<br>
<br>
I recompile PETSC --with-debugging=yes and run my code again.<br>
Now, I also have this strange behaviour. When I run the code without valgrind and with one proc, I have this error message:<br>
<br>
BEGIN PROC 0<br>
ITERATION 1<br>
ECHO 1<br>
ECHO 2<br>
INFOG(28): 2<br>
BASIS OK 0<br>
END PROC 0<br>
BEGIN PROC 0<br>
ITERATION 2<br>
ECHO 1<br>
ECHO 2<br>
INFOG(28): 2<br>
BASIS OK 0<br>
END PROC 0<br>
BEGIN PROC 0<br>
ITERATION 3<br>
ECHO 1<br>
[0]PETSC ERROR: ------------------------------------------------------------------------<br>
[0]PETSC ERROR: Caught signal number 11 SEGV: Segmentation Violation, probably memory access out of range<br>
[0]PETSC ERROR: Try option -start_in_debugger or -on_error_attach_debugger<br>
[0]PETSC ERROR: or see <a href="http://www.mcs.anl.gov/petsc/documentation/faq.html#valgrind" rel="noreferrer" target="_blank">http://www.mcs.anl.gov/petsc/documentation/faq.html#valgrind</a><br>
[0]PETSC ERROR: or try <a href="http://valgrind.org" rel="noreferrer" target="_blank">http://valgrind.org</a> on GNU/linux and Apple Mac OS X to find memory corruption errors<br>
[0]PETSC ERROR: likely location of problem given in stack below<br>
[0]PETSC ERROR: --------------------- Stack Frames ------------------------------------<br>
[0]PETSC ERROR: Note: The EXACT line numbers in the stack are not available,<br>
[0]PETSC ERROR: INSTEAD the line number of the start of the function<br>
[0]PETSC ERROR: is given.<br>
[0]PETSC ERROR: [0] MatGetRowIJ_SeqAIJ_Inode_Symmetric line 69 /home/j10077/librairie/petsc-mumps/petsc-3.6.4/src/mat/impls/aij/seq/inode.c<br>
[0]PETSC ERROR: [0] MatGetRowIJ_SeqAIJ_Inode line 235 /home/j10077/librairie/petsc-mumps/petsc-3.6.4/src/mat/impls/aij/seq/inode.c<br>
[0]PETSC ERROR: [0] MatGetRowIJ line 7099 /home/j10077/librairie/petsc-mumps/petsc-3.6.4/src/mat/interface/matrix.c<br>
[0]PETSC ERROR: [0] MatGetOrdering_ND line 17 /home/j10077/librairie/petsc-mumps/petsc-3.6.4/src/mat/order/spnd.c<br>
[0]PETSC ERROR: [0] MatGetOrdering line 185 /home/j10077/librairie/petsc-mumps/petsc-3.6.4/src/mat/order/sorder.c<br>
[0]PETSC ERROR: [0] MatGetOrdering line 185 /home/j10077/librairie/petsc-mumps/petsc-3.6.4/src/mat/order/sorder.c<br>
[0]PETSC ERROR: [0] PCSetUp_LU line 99 /home/j10077/librairie/petsc-mumps/petsc-3.6.4/src/ksp/pc/impls/factor/lu/lu.c<br>
[0]PETSC ERROR: [0] PCSetUp line 945 /home/j10077/librairie/petsc-mumps/petsc-3.6.4/src/ksp/pc/interface/precon.c<br>
[0]PETSC ERROR: [0] KSPSetUp line 247 /home/j10077/librairie/petsc-mumps/petsc-3.6.4/src/ksp/ksp/interface/itfunc.c<br>
<br>
But when I run it with valgrind, it does work well.<br>
<br>
Le 2016-05-25 20:04, Barry Smith a écrit :<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
First run with valgrind<br>
<a href="http://www.mcs.anl.gov/petsc/documentation/faq.html#valgrind" rel="noreferrer" target="_blank">http://www.mcs.anl.gov/petsc/documentation/faq.html#valgrind</a><br>
<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
On May 25, 2016, at 2:35 AM, Constantin Nguyen Van<br>
<<a href="mailto:constantin.nguyen.van@openmailbox.org" target="_blank">constantin.nguyen.van@openmailbox.org</a>> wrote:<br>
<br>
Hi,<br>
<br>
I'm a new user of PETSc and I try to use it with MUMPS<br>
functionalities to compute a nullbasis.<br>
I wrote a code where I compute 4 times the same nullbasis. It does<br>
work well when I run it with several procs but with only one<br>
processor I get an error on the 2nd iteration when KSPSetUp is<br>
called. Furthermore when it is run with a debugger (<br>
--with-debugging=yes), it works fine with one or several processors.<br>
Have you got any idea about why it doesn't work with one processor<br>
and no debugger?<br>
<br>
Thanks.<br>
Constantin.<br>
<br>
PS: You can find the code and the files required to run it enclosed.<br>
</blockquote></blockquote>
</blockquote></div><br><br clear="all"><div><br></div>-- <br><div class="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>