Use MPI with Parallella Cluster

I am new to Parallella and working with clusters of boards. I am having some trouble with using MPI to communicate across multiple boards. When running the following program:
Without using sudo before mpiexec I get this:
When I use sudo before this call I get this:
I am giving this example because when I created a program for my Parallella boards everything works fine for one board but when trying to use MPI to run on all the boards I get this error when trying to run the following statement:
So it seems that I need sudo to execute the Epiphany code but when using sudo MPI doesn't seem to work correctly.
Any help for this issue will be greatly appreciated
THANKS
- Code: Select all
int main(int argc, char** argv) {
// Initialize the MPI environment
MPI_Init(NULL, NULL);
// Get the number of processes
int world_size;
MPI_Comm_size(MPI_COMM_WORLD, &world_size);
// Get the rank of the process
int world_rank;
MPI_Comm_rank(MPI_COMM_WORLD, &world_rank);
// Get the name of the processor
char processor_name[MPI_MAX_PROCESSOR_NAME];
int name_len;
MPI_Get_processor_name(processor_name, &name_len);
// Print off a hello world message
printf("Hello world from processor %s, rank %d"
" out of %d processors\n",
processor_name, world_rank, world_size);
// Finalize the MPI environment.
MPI_Finalize();
}
Without using sudo before mpiexec I get this:
- Code: Select all
mpiexec -n 3 --hostfile hosts ./mpirun
Hello world from processor work1, rank 1 out of 3 processors
Hello world from processor work2, rank 2 out of 3 processors
Hello world from processor command, rank 0 out of 3 processors
When I use sudo before this call I get this:
- Code: Select all
sudo mpiexec -n 3 --hostfile hosts ./mpirun
Hello world from processor command, rank 0 out of 1 processors
Hello world from processor work2, rank 0 out of 1 processors
Hello world from processor work1, rank 0 out of 1 processors
I am giving this example because when I created a program for my Parallella boards everything works fine for one board but when trying to use MPI to run on all the boards I get this error when trying to run the following statement:
- Code: Select all
mpiexec -n 3 --hostfile /home/cluster/bin/corr/example/bin/hosts /home/cluster/bin/Parallella/epiphany-examples/apps/testing/bin/test.elf
e_init(): Program must be invoked with superuser privilege (sudo)
So it seems that I need sudo to execute the Epiphany code but when using sudo MPI doesn't seem to work correctly.
Any help for this issue will be greatly appreciated
THANKS