I get Permission denied when I try to run an mpi example.This is the code I am trying to run.
#include <stdio.h>
#include <mpi.h>
int main (int argc,char *argv[])
{
int rank, size;
MPI_Init (&argc, &argv); /* starts MPI */
MPI_Comm_rank (MPI_COMM_WORLD, &rank); /* get current process id */
MPI_Comm_size (MPI_COMM_WORLD, &size); /* get number of processes */
printf( "Hello world from process %d of %d\n", rank, size );
MPI_Finalize();
return 0;
}
I complied it on the master VM, in a shared folder. I also generated ssh key and copied it to all slave VMs.I have a "hosts" file that has all the IP addresses of all VMs including the master vm.
I run the code with this command
`mpiexec -f hosts -n 4 hello_world
But I get
===================================================================================
= BAD TERMINATION OF ONE OF YOUR APPLICATION PROCESSES
= PID 2961 RUNNING AT 10.0.0.41
= EXIT CODE: 255
= CLEANING UP REMAINING PROCESSES
= YOU CAN IGNORE THE BELOW CLEANUP MESSAGES
===================================================================================
Permission denied, please try again.
Permission denied, please try again.
Permission denied (publickey,password).
Permission denied, please try again.
Permission denied, please try again.
Permission denied, please try again.
Permission denied (publickey,password).
Permission denied, please try again.
Permission denied (publickey,password).
By the way 10.0.0.41 is the Master VM.
Thanks in advance