icpc(而非GCC)的MPI相关分段故障

icpc(而非GCC)的MPI相关分段故障,gcc,segmentation-fault,mpi,icc,Gcc,Segmentation Fault,Mpi,Icc,我正在尝试运行一个用英特尔编译器编译的程序。该程序具有openMP和MPI代码。MPI代码是对程序的新添加 使用gcc和OpenMPI(gcc风格,v1.8)编译的代码运行正常 使用icpc和英特尔编译的OpenMPI seg故障编译的代码出现“地址未映射”错误 OpenMPI(使用英特尔编译)错误 [ida3c03:22018] 63 more processes have sent help message help-mpi-btl-openib.txt / reg mem limit

我正在尝试运行一个用英特尔编译器编译的程序。该程序具有openMP和MPI代码。MPI代码是对程序的新添加

  • 使用gcc和OpenMPI(gcc风格,v1.8)编译的代码运行正常
  • 使用icpc和英特尔编译的OpenMPI seg故障编译的代码出现“地址未映射”错误
OpenMPI(使用英特尔编译)错误

[ida3c03:22018] 63 more processes have sent help message help-mpi-btl-openib.txt / reg mem limit low
[ida3c03:22018] Set MCA parameter "orte_base_help_aggregate" to 0 to see all help / error messages
done!
[ida3c04:03329] *** Process received signal ***
[ida3c04:03329] Signal: Segmentation fault (11)
[ida3c04:03329] Signal code: Address not mapped (1)
[ida3c04:03329] Failing at address: 0x10
  • 使用icpc和英特尔自己的MPI seg错误编译的代码,以及2个错误之一
错误1

 Could not find **ibv_destroy_qp in list of messages
 Could not find **ibv_destroy_qp in list of messages
 Could not find **ibv_destroy_qp in list of messages
 Could not find **ibv_destroy_qp in list of messages
 Could not find **ibv_destroy_qp in list of messages
 Could not find **vc_gen2_qp_finalize in list of messages
 Could not find **ibv_destroy_qp in list of messages
 Could not find **vc_gen2_qp_finalize in list of messages
 Could not find **vc_gen2_qp_finalize in list of messages
 Could not find **vc_gen2_qp_finalize in list of messages
 Could not find **vc_gen2_qp_finalize in list of messages
 Could not find **vc_gen2_qp_finalize in list of messages
 Fatal error in MPI_Finalize: Internal MPI error!, error stack:
 MPI_Finalize(311).................: MPI_Finalize failed
 MPI_Finalize(229).................:
 MPID_Finalize(140)................:
 MPIDI_CH3_Finalize(24)............:
 MPID_nem_finalize(63).............:
 MPID_nem_gen2_module_finalize(520):(unknown)(): Internal MPI error!
错误2

recv desc error, 128, 0x9d0240
[mpiexec@ida3c03] control_cb (./pm/pmiserv/pmiserv_cb.c:717): assert (!closed) failed
[mpiexec@ida3c03] HYDT_dmxu_poll_wait_for_event (./tools/demux/demux_poll.c:77): callback returned error status
[mpiexec@ida3c03] HYD_pmci_wait_for_completion (./pm/pmiserv/pmiserv_pmci.c:435): error waiting for event
[mpiexec@ida3c03] main (./ui/mpich/mpiexec.c:901): process manager error waiting for completion
这个项目非常庞大,很难向您展示所有的MPI代码,但是我从我认为发生错误的一个主文件中删除了MPI调用,以防有任何用处。我用“vector#”填写了实际的变量名


但是我不明白为什么gcc中的代码会很好,然后icpc会遇到这个错误。代码正在群集上运行,我无法访问运行MPI进程的后端节点。

Hi!请谷歌“Gcc地址消毒液”。。。。您的错误很可能是您访问内存的方式(缓冲区溢出/下溢)的问题,无论您使用什么编译器,都会发生这种情况,但它只会在英特尔编译器中崩溃,因为那里的内存分配更“严格”……segfults很容易、有趣,而且追踪起来令人满意;程序失败越明显越好。除非您安装了ddt或totalview之类的并行调试器,否则最简单的方法是使用-g标志重新编译,设置ulimit-c unlimited,然后在可执行文件上运行调试器(gdb或idb可以正常工作),生成的核心文件应该会准确地告诉您出了什么问题@dsign对于此处可能存在的gcc/icpc差异是完全正确的,但一般来说,内存错误症状(如SEGFULTS)的表现形式可能与代码/环境中的微小更改非常不同。两种MPI实现在某些与InfiniBand谓词相关的代码中都失败。这可能表明在调用
MPI\u Finalize()
时仍有消息在传输中,它们可能指的是已释放(或乱码)的内存区域。英特尔方面可能会进行一些积极的优化。尝试使用较低的优化级别进行编译,即使使用
-O0
。如果我是你,我会听Jonathan Dursi的话。我不确定如何使用gdb进行调试,尽管考虑到我无法登录到后端节点,并且登录节点的过程过于密集。这可能只是因为我不熟悉在集群上调试MPI。不过,我不知道还有什么其他方法可以附加到这个过程中。如果我只是使用失败的对象文件在gdb中打开核心转储,尝试回溯会导致gdb出错。
1172:  MPI_Init(&argc,&argv);
1173:  MPI_Comm_size(MPI_COMM_WORLD, &numranks);
1174:  MPI_Comm_rank(MPI_COMM_WORLD,&rank);
1315:  MPI_Barrier(MPI_COMM_WORLD);
1593:  MPI_Allgather(&long_1,1,MPI_LONG,vector_1,1,MPI_LONG,MPI_COMM_WORLD);
1594:  MPI_Allgather(&long_2, 1,MPI_LONG,vector_2, 1,MPI_LONG,MPI_COMM_WORLD);    
1624:  MPI_Barrier(MPI_COMM_WORLD);
1655:  MPI_Bcast(buffer,long*[count],MPI_CHAR,count,MPI_COMM_WORLD);
1661:  MPI_Allgatherv(dnas_chars_send, long_2, MPI_CHAR,  char*,int*, long*, MPI_CHAR,MPI_COMM_WORLD);
1740:  MPI_Barrier(MPI_COMM_WORLD);
2013:  MPI_Barrier(MPI_COMM_WORLD); 
2064:  MPI_Allgather(&int,1,MPI_INT,int*,1,MPI_INT,MPI_COMM_WORLD);
2066:  MPI_Allgather(&int,1,MPI_INT,int*,1,MPI_INT,MPI_COMM_WORLD);
2068:  MPI_Allgather(&int,1,MPI_INT,int*,1,MPI_INT,MPI_COMM_WORLD);
2106:  MPI_Allgatherv(int*, int,MPI_INT,int* ,int*, int*, MPI_INT,MPI_COMM_WORLD);
2107:  MPI_Allgatherv(int*, int,MPI_INT,int* ,int*, int*, MPI_INT,MPI_COMM_WORLD);
2108:  MPI_Allgatherv(int*,int,MPI_INT,int*,int*,int*, MPI_INT,MPI_COMM_WORLD);
2136:  MPI_Allgatherv(int*,int,MPI_INT,int*,int*,int*, MPI_INT,MPI_COMM_WORLD);
2137:  MPI_Allgatherv(int*,int,MPI_INT,int*,int*,int*, MPI_INT,MPI_COMM_WORLD);
2164:  MPI_Barrier(MPI_COMM_WORLD);
2519:  MPI_Finalize();