Why Do All My Open MPI Processes Have Rank 0?

前端 未结 4 1222
轮回少年
轮回少年 2020-12-10 14:12

I\'m writing a parallel program using Open MPI. I\'m running Snow Leopard 10.6.4, and I installed Open MPI through the homebrew package ma

相关标签:
4条回答
  • 2020-12-10 14:58

    I have had the same problem with openMPI in C on linux. Using MPIch2 in stead , the problem was fixed (but remember to run MPI_Finalize() at the end or it gets weird.)

    0 讨论(0)
  • 2020-12-10 15:02

    Check which mpirun you are invoking. The mpirun that is being executed is launching 8 independent instances of the binary. So each instance is an MPI application with a universe size of 1 and rank 0.

    Also, unless you are planning to run the final code on a cluster of OS X boxes, I highly recommend installing a Linux version in a VM, like virtualbox, to test & develop these codes.

    0 讨论(0)
  • 2020-12-10 15:08

    Today I met the same problem like you. And finally I got the solution.

    See https://wiki.mpich.org/mpich/index.php/Frequently_Asked_Questions#Q:_All_my_processes_get_rank_0

    Simply speaking, the answer says, MPI needs suitable PMI to tell processes about their ranks and something else. Therefore, we need to use corresponding mpirun/mpiexec to run the MPI program.

    I guess that your problem is related to the mismatch between mpi program compiler and the mpirun tool. So try to uninstall all, and install MPICH/openMPI(make sure just install one of them).

    0 讨论(0)
  • 2020-12-10 15:16

    Uninstall previous MPI implementation completely.

    In my case I installed MPICH2 first, then uninstalled it, and changed to OpenMPI. Then same case occured, all process' rank were 0. What I did to fix this problem is: uninstall MPICH2 completely from my system (I use Ubuntu/Debian Linux).

    # apt-get remove mpich2
    # apt-get autoremove
    
    0 讨论(0)
提交回复
热议问题