Hi Geoff,<br><br>i dont know Geoff, the code is below:<br><br><span style="font-style: italic;">#include &quot;mpi.h&quot; </span><br style="font-style: italic;"><span style="font-style: italic;">#include &lt;stdio.h&gt; </span>
<br style="font-style: italic;"><span style="font-style: italic;">#include &lt;string.h&gt; </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;">&nbsp;&nbsp;&nbsp; char mensagem[32];</span><br style="font-style: italic;"><span style="font-style: italic;">&nbsp;&nbsp;&nbsp; int numprocs, rank;
</span><br style="font-style: italic;"><span style="font-style: italic;">&nbsp;&nbsp;&nbsp; MPI_Status stat;</span><br style="font-style: italic;"><span style="font-style: italic;">&nbsp;&nbsp;&nbsp; MPI_Init(&amp;argc,&amp;argv); </span><br style="font-style: italic;">
<span style="font-style: italic;">&nbsp;&nbsp;&nbsp; MPI_Comm_size(MPI_COMM_WORLD,&amp;numprocs); </span><br style="font-style: italic;"><span style="font-style: italic;">&nbsp;&nbsp;&nbsp; MPI_Comm_rank(MPI_COMM_WORLD,&amp;rank);</span><br style="font-style: italic;">
<span style="font-style: italic;">&nbsp;&nbsp;&nbsp; if(rank==0)</span><br style="font-style: italic;"><span style="font-style: italic;">&nbsp;&nbsp;&nbsp; {</span><br style="font-style: italic;"><span style="font-style: italic;">&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; sprintf(mensagem, &quot;Message Text&quot;); 
</span><br style="font-style: italic;"><span style="font-style: italic;">&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; MPI_Send(mensagem, 32, MPI_CHAR, 1, 0, MPI_COMM_WORLD);</span><br style="font-style: italic;"><span style="font-style: italic;">&nbsp;&nbsp;&nbsp; }</span>
<br style="font-style: italic;"><span style="font-style: italic;">&nbsp;&nbsp;&nbsp; else</span><br style="font-style: italic;"><span style="font-style: italic;">&nbsp;&nbsp;&nbsp; {</span><br style="font-style: italic;"><span style="font-style: italic;">
&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; MPI_Recv(mensagem, 32, MPI_CHAR, 0, 0, MPI_COMM_WORLD, &amp;stat);</span><br style="font-style: italic;"><span style="font-style: italic;"></span><span style="font-style: italic;">&nbsp;&nbsp;&nbsp; }</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:&nbsp; p4_error: net_recv read:&nbsp; 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:&nbsp; p4_error: net_send write: -1<br>&nbsp;&nbsp;&nbsp; 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&nbsp; 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 &lt;<a href="mailto:gdjacobs@gmail.com">gdjacobs@gmail.com</a>&gt;:</span><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
Luiz Mendes wrote:<br>&gt; HI all,<br>&gt;<br>&gt; i would like to know whats the reason for this error<br>&gt;<br>&gt; net_send: could not write to fd=5, errno = 32<br>&gt;<br>&gt; what should i do to correct this? I searched for this error in internet
<br>&gt; but i didnt find anything about.<br>&gt;<br>&gt; Its strange, because this error is caused by the increase of number of<br>&gt; processes in the execution of mpi program.<br>&gt;<br>&gt; Could you help me?<br>&gt;
<br>&gt; Thanks<br>&gt; 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>