<br><div class="gmail_quote"><br><br>Hi. I'm trying to run this:<br> /opt/mpich/gnu/bin/mpirun -v -np 2 -machinefile program<br><br>but i get this <b>error:</b><br><br>i'm process 0 de 2...<br>ROOT: trying to send message...<br>
p0_26706: p4_error: interrupt SIGSEGV: 11<br>Killed by signal 2.<br>p0_26706: (0.113281) net_send: could not write to fd=4, errno = 32<br><br><br><b>This is the code:</b><br><br>#include <stdio.h><br>#include "mpi.h"<br>
<br><br>int main(int argc, char **argv){<br> <br> int message,<br> rank,<br> size,<br> i,<br> tag = 0,<br> namelen;<br> <br> char processor_name[MPI_MAX_PROCESSOR_NAME];<br> <br>
MPI_Status status;<br> <br> MPI_Init(&argc, &argv);<br> MPI_Comm_rank(MPI_COMM_WORLD, &rank);<br> MPI_Comm_size(MPI_COMM_WORLD, &size);<br> <br> printf("i'm process %d de %d...\n", rank, size);<br>
<br> MPI_Barrier(MPI_COMM_WORLD);<br> <br> if(rank == 0){<br> message = 1;<br> for (i=1; i<size; i++){<br> printf("ROOT: trying to send message...\n");<br> MPI_Ssend(&message, 1, MPI_INT, i, tag, MPI_COMM_WORLD); <br>
}<br> }else{<br> printf("SLAVE %d: trying to receive message...\n", rank);<br> MPI_Get_processor_name(processor_name,&namelen);<br> MPI_Recv(&message, 1, MPI_INT, MPI_ANY_SOURCE, tag , MPI_COMM_WORLD, &status);<br>
printf("SLAVE %d MAQUINA %s: receive message %d\n ",rank, processor_name, message);<br> }<br> <br> MPI_Finalize(); <br> return 0;<br>}<br>
<br><b>And this is my machine file:</b><br><br><a href="http://beta.something.com" target="_blank">beta.something.com</a><br>compute-1-0.local<br>compute-1-1.local<br>compute-1-2.local<br><br>Any solution?<br><br><br>Thank you.<br>
</div><br>