Linux系统下mpi 编程出现(Signal: Segmentation fault, Signal code: Address not mapped)

沉舟侧畔千帆进,病树前头万木春。这篇文章主要讲述Linux系统下mpi 编程出现:Signal: Segmentation fault, Signal code: Address not mapped相关的知识,希望能为你提供帮助。

在Ubuntu(安装了mpich和openmpi)下MPI编程时,代码没问题,但是在mpirun运行的时候出现如下问题
[ubuntu:04803] *** Process received signal *** [ubuntu:04803] Signal: Segmentation fault (11) [ubuntu:04803] Signal code: Address not mapped (1) [ubuntu:04803] Failing at address: 0x7548d0c [ubuntu:04803] [ 0] [0x86b410] [ubuntu:04803] [ 1] /lib/tls/i686/cmov/libc.so.6(fclose+0x1a0) [0x186b00] [ubuntu:04803] [ 2] ./exmpi_2(main+0x78e) [0x80492c2] [ubuntu:04803] [ 3] /lib/tls/i686/cmov/libc.so.6(__libc_start_main+0xe6) [0x141bd6] [ubuntu:04803] [ 4] ./exmpi_2() [0x8048aa1] [ubuntu:04803] *** End of error message ***

折腾了半天,最后删掉了openmpi

sudo apt-get removelibopenmpi-dev openmpi-bin

    安装mpich 
sudo apt-get installlibmpich-dev openmpi-bin

【Linux系统下mpi 编程出现(Signal: Segmentation fault, Signal code: Address not mapped)】  一切搞定!!!
 




    推荐阅读