Why my mpi program crashes? RRS feed

  • Question

  • Dear all, I wrote a 'hello world' program that utilizing mpi. The code is:

    #include "stdio.h"
    #include "mpi.h"
    int main(int argc, char *argv[]) {
         int myid, numprocs;
         MPI_Comm_rank(MPI_COMM_WORLD, &myid);
         MPI_Comm_size(MPI_COMM_WORLD, &numprocs);
        printf("%d Hello world from process %d \n",numprocs, myid);
         return 0;

    I can run this program on a windows server 2012 r2 platform (I also installed headnode of HPC on this computer). However, when I try to run this program on another windows server 2012 r2 platform, the program crashes. It says the '.exe' has stopped working. The error log is that:

    PS C:\Users\Administrator.HPCDWM> mpiexec -n 2 C:\Users\Administrator.HPCDWM\Desktop\MS_MPI_HelloWorld.exe
    job aborted:
    [ranks] message
    [0] process exited without calling finalize
    [1] terminated
    ---- error analysis -----
    [0] on LENOVO-LA0X1105
    C:\Users\Administrator.HPCDWM\Desktop\MS_MPI_HelloWorld.exe ended prematurely and may have crashed. exit code 0xc0000005
    ---- error analysis -----
    PS C:\Users\Administrator.HPCDWM>

    I hope you can give me any guidence on this.

    Thursday, August 8, 2019 1:34 PM

All replies

  • The most likely reason is that your second machine is lacking some dlls (vs redistributes? ). You may want to try running your executable directly, without mpiexec, and see what the error is.

    Hope it helps.


    Friday, August 9, 2019 6:12 PM