<!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.5730.11" name=GENERATOR></HEAD>
<BODY>
<DIV dir=ltr align=left><SPAN class=812301219-15012007><FONT face=Arial
color=#0000ff size=2>You need to add an MPI_Finalize.</FONT></SPAN></DIV>
<DIV dir=ltr align=left><SPAN class=812301219-15012007><FONT face=Arial
color=#0000ff size=2></FONT></SPAN> </DIV>
<DIV dir=ltr align=left><SPAN class=812301219-15012007><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>Luiz
Mendes<BR><B>Sent:</B> Monday, January 15, 2007 12:22 PM<BR><B>To:</B>
mpich-discuss@mcs.anl.gov<BR><B>Cc:</B> Geoff Jacobs<BR><B>Subject:</B> Re:
[MPICH] problem net_send: could not write to fd=5, errno =
32<BR></FONT><BR></DIV>
<DIV></DIV>Hi Geoff,<BR><BR>i dont know Geoff, the code is below:<BR><BR><SPAN
style="FONT-STYLE: italic">#include "mpi.h" </SPAN><BR
style="FONT-STYLE: italic"><SPAN style="FONT-STYLE: italic">#include
<stdio.h> </SPAN><BR style="FONT-STYLE: italic"><SPAN
style="FONT-STYLE: italic">#include <string.h> </SPAN><BR
style="FONT-STYLE: italic"><SPAN style="FONT-STYLE: italic">int main(int argc,
char* argv[])</SPAN><BR style="FONT-STYLE: italic"><SPAN
style="FONT-STYLE: italic">{</SPAN><BR style="FONT-STYLE: italic"><SPAN
style="FONT-STYLE: italic"> char mensagem[32];</SPAN><BR
style="FONT-STYLE: italic"><SPAN style="FONT-STYLE: italic">
int numprocs, rank; </SPAN><BR style="FONT-STYLE: italic"><SPAN
style="FONT-STYLE: italic"> MPI_Status stat;</SPAN><BR
style="FONT-STYLE: italic"><SPAN style="FONT-STYLE: italic">
MPI_Init(&argc,&argv); </SPAN><BR style="FONT-STYLE: italic"><SPAN
style="FONT-STYLE: italic">
MPI_Comm_size(MPI_COMM_WORLD,&numprocs); </SPAN><BR
style="FONT-STYLE: italic"><SPAN style="FONT-STYLE: italic">
MPI_Comm_rank(MPI_COMM_WORLD,&rank);</SPAN><BR
style="FONT-STYLE: italic"><SPAN style="FONT-STYLE: italic">
if(rank==0)</SPAN><BR style="FONT-STYLE: italic"><SPAN
style="FONT-STYLE: italic"> {</SPAN><BR
style="FONT-STYLE: italic"><SPAN style="FONT-STYLE: italic">
sprintf(mensagem, "Message Text"); </SPAN><BR
style="FONT-STYLE: italic"><SPAN style="FONT-STYLE: italic">
MPI_Send(mensagem, 32, MPI_CHAR, 1, 0,
MPI_COMM_WORLD);</SPAN><BR style="FONT-STYLE: italic"><SPAN
style="FONT-STYLE: italic"> }</SPAN> <BR
style="FONT-STYLE: italic"><SPAN style="FONT-STYLE: italic">
else</SPAN><BR style="FONT-STYLE: italic"><SPAN
style="FONT-STYLE: italic"> {</SPAN><BR
style="FONT-STYLE: italic"><SPAN style="FONT-STYLE: italic">
MPI_Recv(mensagem, 32, MPI_CHAR, 0, 0, MPI_COMM_WORLD,
&stat);</SPAN><BR style="FONT-STYLE: italic"><SPAN
style="FONT-STYLE: italic"></SPAN><SPAN
style="FONT-STYLE: italic"> }</SPAN><BR
style="FONT-STYLE: italic"><SPAN style="FONT-STYLE: italic">}<BR><BR>when i
run with mpirun -np 2 it works, and when i run with mpirun -np 3 i doesnt run
and relates the following message below<BR><BR><SPAN
style="FONT-STYLE: italic">p2_23214: p4_error: net_recv read:
probable EOF on socket: 1 <BR>bm_list_23184: (0.507200) wakeup_slave: unable
to interrupt slave 0 pid 23183<BR>rm_l_1_23213: (0.257494) net_send: could not
write to fd=6, errno = 9<BR>rm_l_1_23213: p4_error: net_send write:
-1<BR> p4_error: latest msg from perror: Bad file descriptor
<BR>rm_l_2_23236: (0.045590) net_send: could not write to fd=5, errno =
32<BR>p2_23214: (2.046247) net_send: could not write to fd=5, errno =
32<BR><BR><BR>What it could be?<BR><BR>I installed MPICH 1.2.7p1 with
mode p4 i think. I am trying to run it on two PCS. I installed MPI in
/usr/share/MPI-1 folder and share this one by NFS server with another PC.
<BR><BR>Well i was trying to run another standard example simpleio.c, and it
doesnt store things in other PC.<BR><BR>What is happening?<BR><SPAN
style="FONT-STYLE: italic"></SPAN><BR>Thanks, <BR>Luiz
Mendes<BR></SPAN></SPAN><BR>
<DIV><SPAN class=gmail_quote>2007/1/15, Geoff Jacobs <<A
href="mailto:gdjacobs@gmail.com">gdjacobs@gmail.com</A>>:</SPAN>
<BLOCKQUOTE class=gmail_quote
style="PADDING-LEFT: 1ex; MARGIN: 0pt 0pt 0pt 0.8ex; BORDER-LEFT: rgb(204,204,204) 1px solid">Luiz
Mendes wrote:<BR>> HI all,<BR>><BR>> i would like to know whats the
reason for this error<BR>><BR>> net_send: could not write to fd=5,
errno = 32<BR>><BR>> what should i do to correct this? I searched for
this error in internet <BR>> but i didnt find anything
about.<BR>><BR>> Its strange, because this error is caused by the
increase of number of<BR>> processes in the execution of mpi
program.<BR>><BR>> Could you help me?<BR>> <BR>> Thanks<BR>>
Luiz Mendes<BR>Segfault?<BR><BR>--<BR>Geoffrey D. Jacobs<BR><BR>Go to the
Chinese Restaurant,<BR>Order the
Special<BR></BLOCKQUOTE></DIV><BR></BLOCKQUOTE></BODY></HTML>