- c - 在位数组中找到第一个零
- linux - Unix 显示有关匹配两种模式之一的文件的信息
- 正则表达式替换多个文件
- linux - 隐藏来自 xtrace 的命令
在没有 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
最佳答案
您的代码可能通过非法访问内存生成了 SEGV。正如错误消息所建议的那样,您应该使用 valgrind 或 gdb 运行,这样您就可以看到堆栈。
关于linux - Petsc 不显示代码中发生错误的位置,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/5616784/
我有 Windows 7 操作系统。我已按照 PETSc web page 的说明进行操作;在 VS 2005 的命令提示符中,我打开了 cygwin 并使用以下命令安装了 PETSc: ./conf
我对 PETSC 有疑问。我在 matlab 中编写了一段代码,我正在尝试使用 PETSC 库将这段代码翻译成 C++。我正在为多相流编写流体动力学模拟,我正在尝试以一种简单的方式进行与此 matla
我有一个非常初学者的问题,但我现在真的迷路了。我从 PETSc 开始,但我在编译代码时遇到问题。我正在尝试使用我自己的 Makefile,但编译器一直大喊“ undefined reference ”
在没有 Petsc 的情况下,我可以看到哪些文件、哪些函数以及哪些行发生错误并从中传播。使用 Petsc,我总是收到相同的错误消息。 Petsc 中是否有任何我遗漏的标志? 谢谢。 [0]PETSC
我正在尝试在 PETSc 中编写 LU 分解应用程序。我的想法是,程序将打印未因式分解的矩阵,然后打印因式分解的矩阵并计算因式分解本身所花费的时间。 我根据在互联网上找到的少量信息编写了代码(我使用
下面这个问题可能比较容易回答,但是我在网上没有找到任何解决办法。简而言之,我将一些 petsc 函数调用放在一个类中。 下面的方程式求解器脚本没有任何问题: static char help[] =
我正在使用 C 代码进行辐射传输的水力模拟。需要 PETSc,我在本地机器上编译了它。但在编译我的代码时,我收到错误消息:error: '__SDIR__' undeclared(在此函数中首次使用)
我正在尝试创建并打印 MATDENSE PETSc 中的矩阵。我的 MWE 看起来像这样: static char help[] = ""; #include #include int main(
我有一个使用 PETSC 的非常基本的程序 #include "PETSC/petsc.h" #include "PETSC/petscsys.h" #include "PETSC/petscm
我正在尝试在 Windows 7 上安装 PETSc 库以与 Visual Studio Express 2008 一起使用,但到目前为止我没有成功。我用 python、make、diff 安装了 c
我在 Ubuntu 13.04 64 位上,我正在尝试使用 CMake 在 PETSc 中构建一个“Hello world”程序。 我有以下程序 solve1.c (松散地基于 PETSc 示例中的
我想制作PETSc(的子集) Haskell 通过 FFI 接口(interface)提供库,以便对用户隐藏内存和错误管理; 使用如下所示的命令构建带有共享库的 PETSc 3.5.3,测试套件运行成
我正在使用Petsc,我想组合一个分布式Vec,以便每个进程都有一个完整的Vec副本。我有一个最小的示例,它从一个数据数组开始,从中构造一个 MPI Vec,然后尝试使用 VecScatter 来组合
我正在学习在 c/c++ 中使用 petsc,以便在其中使用稀疏矩阵分解函数 (MatICCFactor)。我做的第一步是将玩具矩阵读入 petsc 以创建稀疏矩阵并在对其进行任何操作之前查看该矩阵。
您好,我有一个用 C++ 编写的程序,其中许多函数中有一个或两个正在使用 PETSc。 当我调用这些函数时,这将是使用 PETSc 的正确方法 1) a)change all MPI_COMM_WOR
我正在从事科学计算并为多 CPU 系统开发基于 petsc 的应用程序。 出于调试目的,我想在我自己的电脑上安装那个软件,这是一个运行 Ubuntu (Karmic Koala) 的双核系统。 但我不
我开始使用 PETSc 库来并行求解线性方程组。我已经安装了所有软件包,构建并成功运行了 petsc/src/ksp/ksp/examples/tutorials/文件夹中的示例,例如 ex.c 但是
这里是 hello.cpp。我在 OS X 上。我直接从源代码构建了 PETSc。 #include int main(int argc,char **argv) { Vec x; PetscI
我最近开始学习 PETSc,在尝试完成一些简单任务时遇到了问题。这段代码有什么问题: static char help[] = "Test 2d DMDAs Vecs.\n\n"; #include
在 3.3 中他们有一个 grate news - 在 GPU 上仅使用 PETC SNES 进行 FEM 求解的示例。我是 PETSc 的新手并且有一个问题 - 我需要在 3d 空间中创建一个球体并
我是一名优秀的程序员,十分优秀!