【问题标题】:Fatal error in MPI_AllreduceMPI_Allreduce 中的致命错误
【发布时间】:2015-07-24 04:38:38
【问题描述】:

我需要使用 MPICH 制作集群。在这种情况下,我首先在一台机器上尝试了这些示例(http://mpitutorial.com/beginner-mpi-tutorial/),这些示例按预期工作。然后我根据这个(https://help.ubuntu.com/community/MpichCluster)创建了集群并运行下面给出的示例,它可以工作。

#include <stdio.h>
#include <mpi.h>

int main(int argc, char** argv) {
 int myrank, nprocs;

 MPI_Init(&argc, &argv);
 MPI_Comm_size(MPI_COMM_WORLD, &nprocs);
 MPI_Comm_rank(MPI_COMM_WORLD, &myrank);

 printf("Hello from processor %d of %d\n", myrank, nprocs);

 MPI_Finalize();
 return 0;

}

mpiexec -n 8 -f machinefile ./mpi_hello

接下来我运行了这个示例(http://mpitutorial.com/tutorials/mpi-reduce-and-allreduce/),但当时我收到了这个错误。不知道哪里出了问题?

    Fatal error in MPI_Allreduce: A process has failed, error stack:
    MPI_Allreduce(861)........: MPI_Allreduce(sbuf=0x7ffff0f55630, rbuf=0x7ffff0f55634, count=1, MPI_FLOAT, MPI_SUM, MPI_COMM_WORLD) failed
    MPIR_Allreduce_impl(719)..:
    MPIR_Allreduce_intra(362).:
    dequeue_and_set_error(888): Communication error with rank 1

    ===================================================================================
    =   BAD TERMINATION OF ONE OF YOUR APPLICATION PROCESSES
    =   EXIT CODE: 1
    =   CLEANING UP REMAINING PROCESSES
    =   YOU CAN IGNORE THE BELOW CLEANUP MESSAGES
    ===================================================================================
    [proxy:0:1@ce-412] HYD_pmcd_pmip_control_cmd_cb (./pm/pmiserv/pmip_cb.c:886): assert (!closed) failed
    [proxy:0:1@ce-412] HYDT_dmxu_poll_wait_for_event (./tools/demux/demux_poll.c:77): callback returned error status
    [proxy:0:1@ce-412] main (./pm/pmiserv/pmip.c:206): demux engine error waiting for event
    [mpiexec@ce-411] HYDT_bscu_wait_for_completion (./tools/bootstrap/utils/bscu_wait.c:76): one of the processes terminated badly; aborting
    [mpiexec@ce-411] HYDT_bsci_wait_for_completion (./tools/bootstrap/src/bsci_wait.c:23): launcher returned error waiting for completion
    [mpiexec@ce-411] HYD_pmci_wait_for_completion (./pm/pmiserv/pmiserv_pmci.c:217): launcher returned error waiting for completion
    [mpiexec@ce-411] main (./ui/mpich/mpiexec.c:331): process manager error waiting for completion

【问题讨论】:

  • 根据Communication error with rank 1消息,你的rank为0的主节点无法连接到rank为1的节点,所以你应该看看那个方向。您可以尝试简单的 MPI_Send 和 MPI_Recv 从 root ping 节点 1
  • 那些方法也不起作用 (mpitutorial.com/tutorials/mpi-send-and-receive)
  • 那肯定是网络设置错误。您是否尝试检查以下steps

标签: c++ mpi mpich mpic++


【解决方案1】:

是的,正如@Alexey 提到的,这完全是网络错误。这是我所做的工作。

1)。将主机文件导出为 HYDRA_HOST_FILE 以供 MPICH 理解(更多信息:https://wiki.mpich.org/mpich/index.php/Using_the_Hydra_Process_Manager

    export HYDRA_HOST_FILE=<path_to_host_file>/hosts

2)。我必须解决这个问题(http://lists.mpich.org/pipermail/discuss/2013-January/000285.html

   -disable-hostname-propagation

最后是命令,它可以让我在集群节点之间正确连接。

  mpiexec -launcher fork -disable-hostname-propagation  -f machinefile -np 4 ./Test

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 2012-05-16
    • 1970-01-01
    • 2013-09-09
    • 2013-11-14
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多