Re: [mpich-discuss] Linux socket command may return 0 until MPI_Init_thread called.
Hi Marvin!
Essentially, until you call MPI_Init_thread, the Linux socket command will return 0 for all ranks except rank 0. This seems to me like a problem. Indeed. 'socket' should not return 0. Quoting from its manpage:
| On success, a file descriptor for the new socket is returned. On | error, -1 is returned, and errno is set appropriately. FD 0 is already taken by STDIN, so you should never get that return value unless you close STDIN first.
Given the following code sample... [...] *The application returns output this with mpirun. Works for me:
| $ mpirun -np 2 ./test-socket | Pre Socket: 10 | MPI_Init | Pre Socket: 6 | MPI_Init | Post Socket: 14 | Post Socket: 15 | | $ mpirun -np 3 ./test-socket | Pre Socket: 10 | MPI_Init | Pre Socket: 6 | MPI_Init | Pre Socket: 6 | MPI_Init | Post Socket: 14 | Post Socket: 15 | Post Socket: 10
I am running this code sample using Red-Hat Enterprise Linux 7.1 with mpich [...] Version: 3.0.4 For me it's MPICH 3.1.4 on Debian 8 and I get similar results with MPICH 3.1rc on a local cluster. Taking into account the weird return value you get from 'socket' ... maybe your system is the problem.
Regards, Jan _______________________________________________ discuss mailing list [email protected] To manage subscription options or unsubscribe: https://lists.mpich.org/mailman/listinfo/discuss
participants (1)
-
Jan Bierbaum