Thread: Question about mpirun
i have changed previous hello world program testing command mpirun. want run program computer has 2 cores , want use both cores, here simple testing program:
/*the parallel hello world program*/
#include <stdio.h>
#include <mpi.h>
int main(int argc, char **argv)
{
int node;
mpi_init(&argc,&argv);
mpi_comm_rank(mpi_comm_world, &node);
printf("hello world node %d\n",node);
mpi_finalize();
return 0;
}
use mpicc compile in ubuntu , run trying use commands "mpirun -np 2 ./try.exe" , "mpirun ./try.exe" error message comes out:
mpiexec_ubuntu: cannot connect local mpd (/tmp/mpd2.console_shsh); possible causes:
1. no mpd running on host
2. mpd running started without "console" (-n option)
in case 1, can start mpd on host with:
mpd &
, able run jobs on host.
more details on starting mpds on set of hosts, see
mpich2 installation guide.
means? can use mpirun in ubuntu?
well, read error message. need have daemon called mpd running on every computer in cluster. looks you're using mpich2, follow tutorial linked in other thread: http://heather.cs.ucdavis.edu/~matlo...smpich.nm.html
use both of cores, try this:
code:mpd --ncpus=2 & mpirun -np 2 --host localhost ./try.exe
Forum The Ubuntu Forum Community Ubuntu Specialised Support Development & Programming Programming Talk Question about mpirun
Ubuntu
Comments
Post a Comment