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 l开发者_JAVA技巧ocal 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.
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.
精彩评论