Hi,

My simple test case hangs in solaris 5.10 in openmpi 1.6. It does not have
problem in linux. Also, if multiple processes run on the same machine,
it does not have problem too. I used debugger to see where it hanged, it
appear to be at
 242           res = ioctl(devpollop->dpfd, DP_POLL, &dvp);
(dbx) where
current thread: t@1
  [1] _ioctl(0x3, 0xd001, 0xffffffff95c00a80, 0xff, 0x1a4336, 0x0), at 0xfffffd7f fe7726da
=>[2] devpoll_dispatch(base = ???, arg = ???, tv = ???) (optimized), at 0xfffffd7 fff1efb75 (line ~242) in "devpoll.c"
  [3] opal_event_base_loop(base = ???, flags = ???) (optimized), at 0xfffffd7fff2 081aa (line ~838) in "event.c"
  [4] opal_event_loop(flags = ???) (optimized), at 0xfffffd7fff207f99 (line ~766)  in "event.c"
  [5] opal_progress() (optimized), at 0xfffffd7fff2590a3 (line ~189) in "opal_pro gress.c"
  [6] mca_pml_ob1_recv(addr = ???, count = ???, datatype = ???, src = ???, tag = ???, comm = ???, status = ???) (optimized), at 0xfffffd7ffe19199b (line ~99) in " condition.h"
  [7] PMPI_Recv(buf = ???, count = ???, type = ???, source = ???, tag = ???, comm  = ???, status = ???) (optimized), at 0xfffffd7ffeffedb2 (line ~78) in "precv.c"
  [8] main(argc = 1, argv = 0xfffffd7fffdff0e8), line 43 in "mpitest.c"


Here is my test program, any clue where I should be looking at? Thanks in advance.

#include <mpi.h>
#include <stdio.h>
#include <string.h>
#include <unistd.h>
#define BUFSIZE 128
#define TAG 0

int main(int argc, char *argv[])

{
    char idstr[32];
    char buff[BUFSIZE];
    int numprocs;
    int myid;
    int i;
    MPI_Status stat;
    MPI_Init(&argc,&argv);
    MPI_Comm_size(MPI_COMM_WORLD,&numprocs);
    MPI_Comm_rank(MPI_COMM_WORLD,&myid);

    if (myid == 0) {
        for(i=1;i<numprocs;i++) {
            sprintf(buff, "Data from id %d", myid);
            MPI_Send(buff, BUFSIZE, MPI_CHAR, i, TAG, MPI_COMM_WORLD);
        }

        for(i=1;i<numprocs;i++) {
            MPI_Recv(buff, BUFSIZE, MPI_CHAR, i, TAG, MPI_COMM_WORLD, &stat);
            printf("%s:Received by id %d\n", buff, myid);
        }
        sleep(1);
    }
   
    else {
        /* receive from rank 0: */
        MPI_Recv(buff, BUFSIZE, MPI_CHAR, 0, TAG, MPI_COMM_WORLD, &stat);
        sprintf(idstr, "%s:Received by id %d:Data from id %d",buff, myid, myid);
        /* send to rank 0: */
        MPI_Send(idstr, BUFSIZE, MPI_CHAR, 0, TAG, MPI_COMM_WORLD);
        sleep(5);
    }
    MPI_Finalize();
    return 0;
}


Regards,


William