Linux Petsc不';t显示错误发生在代码中的何处

Linux Petsc不';t显示错误发生在代码中的何处,linux,Linux,如果没有Petsc,我可以看到发生错误的文件、函数和行。对于Petsc,我总是收到相同的错误消息 在Petsc中有我丢失的任何标志吗 谢谢 您的代码可能通过非法访问内存生成了SEGV。正如错误消息所建议的,您应该使用valgrind或gdb运行,这将允许您查看堆栈。您可以将此问题发布到PETSc用户邮件列表。 [0]PETSC ERROR: ------------------------------------------------------------------------ [0]P

如果没有Petsc,我可以看到发生错误的文件、函数和行。对于Petsc,我总是收到相同的错误消息

在Petsc中有我丢失的任何标志吗

谢谢



您的代码可能通过非法访问内存生成了SEGV。正如错误消息所建议的,您应该使用valgrind或gdb运行,这将允许您查看堆栈。

您可以将此问题发布到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