<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META http-equiv=Content-Type content="text/html; charset=us-ascii">
<META content="MSHTML 6.00.6000.16441" name=GENERATOR></HEAD>
<BODY>
<DIV dir=ltr align=left><SPAN class=196144217-17052007><FONT face=Arial
color=#0000ff size=2>MPI will not do anything to a socket you create on your
own.</FONT></SPAN></DIV>
<DIV dir=ltr align=left><SPAN class=196144217-17052007><FONT face=Arial
color=#0000ff size=2></FONT></SPAN> </DIV>
<DIV dir=ltr align=left><SPAN class=196144217-17052007><FONT face=Arial
color=#0000ff size=2>Rajeev</FONT></SPAN></DIV><BR>
<BLOCKQUOTE
style="PADDING-LEFT: 5px; MARGIN-LEFT: 5px; BORDER-LEFT: #0000ff 2px solid; MARGIN-RIGHT: 0px">
<DIV class=OutlookMessageHeader lang=en-us dir=ltr align=left>
<HR tabIndex=-1>
<FONT face=Tahoma size=2><B>From:</B> owner-mpich-discuss@mcs.anl.gov
[mailto:owner-mpich-discuss@mcs.anl.gov] <B>On Behalf Of
</B>???<BR><B>Sent:</B> Thursday, May 17, 2007 12:30 AM<BR><B>To:</B>
mpich-discuss@mcs.anl.gov<BR><B>Subject:</B> [MPICH] SO_REUSEADDR seems not
work in programs with MPI<BR></FONT><BR></DIV>
<DIV></DIV>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 "<FONT size=2>Bind: Address Already in
Use</FONT>" 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?<BR><BR>Any suggestions will be greatly
appreciated. <BR><BR>-- <BR>Best regards!<BR> <BR>Roy Ma<BR><BR><A
onclick="return top.js.OpenExtLink(window,event,this)"
href="mailto:mzcroy@gmail.com" target=_blank><BR></BLOCKQUOTE></A></BODY></HTML>