I wanna do parallel rendering via mpich2. First I worked on a simple program, however I could not observe the message "Hello 1" for instance on a slave. what I did on the master side is to run wmpiexec.exe by specifying all the host names, and do nothing at slave sides.
Could anybody give me a hand? Thank you.
#include "mpi.h"
#include <cstdio>
#include <math.h>
int main(int argc, char* argv[])
{
int myid,numprocs;
int namelen;
char processor_name[MPI_MAX_PROCESSOR_NAME];
MPI_Init(&argc,&argv);
MPI_Comm_rank(MPI_COMM_WORLD,&myid);
MPI_Comm_size(MPI_COMM_WORLD,&numprocs);
MPI_Get_processor_name(processor_name,&namelen);
if(myid != 0){
printf("Hello %d", myid); //this is what I what to see at the screen of slaves!!!
}
printf(" Process %d of %d SAY HELLO TO MPI on %s\n",myid, numprocs, processor_name);
MPI_Finalize();
return 0;
}