[MPICH] SO_REUSEADDR seems not work in programs with MPI

Rajeev Thakur thakur at mcs.anl.gov
Thu May 17 12:42:28 CDT 2007


MPI will not do anything to a socket you create on your own.
 
Rajeev


  _____  

From: owner-mpich-discuss at mcs.anl.gov
[mailto:owner-mpich-discuss at mcs.anl.gov] On Behalf Of ???
Sent: Thursday, May 17, 2007 12:30 AM
To: mpich-discuss at mcs.anl.gov
Subject: [MPICH] SO_REUSEADDR seems not work in programs with MPI


Greetings. In my mpi programs, some socket interface(tcp) is needed. As the
system`s archetecture is designed, I have to close server side first. Then
the error message "Bind: Address Already in Use" is always meet.  I find
that using the function setsockopt() to set SO_REUSEADDR parameter is the
only way to avoid this problem.  But with some experiments I find this way
can't work in MPI programs while work good in socket raw examples.  Is that
because MPI reset the socket option when MPI_Finalize is called?

Any suggestions will be greatly appreciated. 

-- 
Best regards!
  
Roy Ma

 <mailto:mzcroy at gmail.com> 


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mcs.anl.gov/pipermail/mpich-discuss/attachments/20070517/5d7fce0b/attachment.htm>


More information about the mpich-discuss mailing list