2011-04-11 53 views
2

没有Petsc,我可以看到哪些文件,哪些函数以及哪条错误发生并传播。随着Petsc,我总是收到相同的错误信息。Petsc不显示错误发生的位置

Petsc中是否有我失踪的标志?

谢谢。


[0]PETSC ERROR: ------------------------------------------------------------------------ 
[0]PETSC ERROR: Caught signal number 11 SEGV: Segmentation Violation, probably memory access out of range 
[0]PETSC ERROR: Try option -start_in_debugger or -on_error_attach_debugger 
[0]PETSC ERROR: or see http://www.mcs.anl.gov/petsc/petsc-as/documentation/troubleshooting.html#Signal[0]PETSC ERROR: or try http://valgrind.org on GNU/linux and Apple Mac OS X to find memory corruption errors 
[0]PETSC ERROR: likely location of problem given in stack below 
[0]PETSC ERROR: --------------------- Stack Frames ------------------------------------ 
[0]PETSC ERROR: Note: The EXACT line numbers in the stack are not available, 
[0]PETSC ERROR:  INSTEAD the line number of the start of the function 
[0]PETSC ERROR:  is given. 
[0]PETSC ERROR: --------------------- Error Message ------------------------------------ 
[0]PETSC ERROR: Signal received! 
[0]PETSC ERROR: ------------------------------------------------------------------------ 
[0]PETSC ERROR: Petsc Release Version 3.1.0, Patch 8, Thu Mar 17 13:37:48 CDT 2011 
[0]PETSC ERROR: See docs/changes/index.html for recent updates. 
[0]PETSC ERROR: See docs/faq.html for hints about trouble shooting. 
[0]PETSC ERROR: See docs/index.html for manual pages. 
[0]PETSC ERROR: ------------------------------------------------------------------------ 
[0]PETSC ERROR: ./solver on a linux named ion by khoa Sun Apr 10 23:29:33 2011 
[0]PETSC ERROR: Libraries linked from /h1/khoa/libs/petsc-3.1/linux/lib 
[0]PETSC ERROR: Configure run at Sun Apr 10 17:52:52 2011 
[0]PETSC ERROR: Configure options --with-scalar-type=complex --with-clanguage=c++ --with-mpi=1 --with-mpi-dir=/usr/bin 
[0]PETSC ERROR: ------------------------------------------------------------------------ 
[0]PETSC ERROR: User provided function() line 0 in unknown directory unknown file 
+1

您可以将此问题发布到PETSc用户邮件列表。 http://www.mcs.anl.gov/petsc/petsc-2/miscellaneous/mailing-lists.html – smilingbuddha 2011-05-15 19:30:08

回答

5

您的代码已经非法访问内存产生SEGV,大概。正如错误消息所建议的那样,您应该使用valgrind或gdb来运行,这将允许您查看堆栈。