none
parallel-display at the slave side RRS feed

  • Question

  • 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; }
    Thursday, February 4, 2010 8:47 AM

Answers

  • with MPICH2 and with MSMPI the stdout/error from the individual programs are redirected to mpiexec. You should see the output from all your ranks at mpiexec console.
    Note that mpiexec has a -l (lowercase L) which prefix each line with the rank id.

    thanks,
    .Erez
    Saturday, February 6, 2010 4:37 AM

All replies

  • with MPICH2 and with MSMPI the stdout/error from the individual programs are redirected to mpiexec. You should see the output from all your ranks at mpiexec console.
    Note that mpiexec has a -l (lowercase L) which prefix each line with the rank id.

    thanks,
    .Erez
    Saturday, February 6, 2010 4:37 AM
  • yes, I do see the output from all ranks at mpiexec console of the master node.
    I thought with the following line, I should see "Hello 1" at slave 1 for instance.
    if (myid != 0) {printf("Hello, %d",myid):}

    What should I do in order to realize this functionality?  Thank you.

    Monday, February 8, 2010 1:37 AM