[MPICH] Mixing MPI

Rob Ross rross at mcs.anl.gov
Mon Dec 19 09:52:45 CST 2005


Hi Andy,

What you're proposing is actually not trivial in MPI.  You cannot get 
the file descriptors that MPI uses because MPI does not necessarily use 
file descriptors.  The best you can do is to either:
- use a second thread so you can block both on the select() and an
   MPI_Wait/MPI_Waitall
- write your own exponential backoff routine that polls the two

It is too bad that it isn't easier; it discourages the implementation of 
these MPI server applications.

Rob

andy wrote:
> I am writing a server program using MPI and other packages which
 > use sockets and pipes and the like. I have had a ponder and a
 > google but cannot see how to introduce MPI to the server using
 > something like the unix select() to avoid polling. Can I get
 > hold of file descriptors? Or am I simply looking at what must
 > be a fairly common task in the wrong way? Thanks for any suggestions.




More information about the mpich-discuss mailing list