sabu
sabu

Reputation: 31

Error when running MPICH on quadcore processor

I was trying to run the following MPI code and was coming across a error as found below. Would appreciate if you anyone could help me with it.

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

int main(){
    int rank, size;

    MPI_Init(NULL, NULL);

//  MPI_Comm_rank(MPI_COMM_WORLD, &rank);
//  MPI_Comm_size(MPI_COMM_WORLD, &size);

//  printf("Hello from %d of %d\n", rank, size);

    MPI_Finalize();

    return 0;
}

The error:

$ mpirun -np 4 ./a.out
mpiexec_ubuntu: cannot connect to local mpd (/tmp/mpd2.console_joseph); possible causes:
  1. no mpd is running on this host
  2. an mpd is running but was started without a "console" (-n option)
In case 1, you can start an mpd on this host with:
    mpd &
and you will be able to run jobs just on this host.

Upvotes: 3

Views: 1430

Answers (1)

Joel Falcou
Joel Falcou

Reputation: 6357

Just do what the error message says: run mpd& on the command line .

I strongly advice you to use OpenMPI instead of MPICH if possible.

Upvotes: 2

Related Questions