MPI C fprintf() output not showing up if the process hangs on MPI_Recv

Posted by Karolis on Stack Overflow See other posts from Stack Overflow or by Karolis
Published on 2010-03-15T03:19:46Z Indexed on 2010/03/15 3:19 UTC
Read the original article Hit count: 268

Filed under:
|

I'm writing an MPI C program. I have troubles debugging it, because whenever I use fprintf, like this: fprintf(stdout, "worker: %d", worker); if the program hangs, because of some blocking MPI_Recv, I can't see any output. I'm sure the line of code is reached, because I can put a return statement after the fprintf statement, in which case the process finishes execution and the output is printed. Any ideas, on how to print (see the output) even though the process gets blocked later by Recv? I hope this makes sense.

© Stack Overflow or respective owner

Related posts about c

    Related posts about output