Ms mpi error: cannot select start block

I created a simple console program in VS 2015 using ms mpi.

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


int main(int argc, char **argv)
{

    int rank=0, size=0;

    MPI_Init(&argc, &argv); /* starts MPI */
    MPI_Comm_rank(MPI_COMM_WORLD, &rank);   /* get current process id */
    MPI_Comm_size(MPI_COMM_WORLD, &size);
    if (rank == 0)
    {
        char helloStr[] = "Hello World";
    //  MPI_Send(helloStr, _countof(helloStr), MPI_CHAR, 1, 0, MPI_COMM_WORLD);
    }
    else if (rank == 1)
    {
        char helloStr[12];
        MPI_Recv(helloStr, _countof(helloStr), MPI_CHAR, 0, 0, MPI_COMM_WORLD, MPI_STATUS_IGNORE);
        printf("Rank 1 received string %s from Rank 0\n", helloStr);
    }
    printf("hello from proccess rank %d from size %d\n",rank,size);
    MPI_Finalize();
    return 0;
}

This program is compiled and executed. But if use> mpiexec -n 2 myprog.exe, I get an error: the start block could not be allocated.

+4
source share
1 answer

Since you are using VS2015, I think the reason is that your username contains non-ASCII characters.

Try running mpiexec in a path that contains only ASCII characters.

+2
source

Source: https://habr.com/ru/post/1657848/


All Articles