I tried to run the following MPI code and encountered an error as shown below. I would be grateful if you could help me with this.
#include <mpi.h>
#include <stdio.h>
int main(){
int rank, size;
MPI_Init(NULL, NULL);
MPI_Finalize();
return 0;
}
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.
sabu source
share