LAM/MPI logo

LAM/MPI General User's Mailing List Archives

  |   Home   |   Download   |   Documentation   |   FAQ   |   all just in this list

From: Jeff Squyres (jsquyres_at_[hidden])
Date: 2003-07-21 05:34:44


On Mon, 21 Jul 2003 abhik.sarkar_at_[hidden] wrote:

> printf("ask for data by typing a\n");
> scanf("%c",c);

This is not an MPI problem -- it's a C problem. Your scanf statement
needs to pass in the address of c, not c:

        scanf("%c", &c);

MPI reports this as a problem with MPI_Iprobe because all it knows is that
a seg fault occurred while its thread was running MPI_Iprobe.
Specifically -- the seg fault occurred in the main thread while the MPI
thread was running MPI_Iprobe, so LAM reported the call stack *of its
thread* -- in a multi-threaded environment, that does not necessarily
imply that the problem is in the MPI thread.

-- 
{+} Jeff Squyres
{+} jsquyres_at_[hidden]
{+} http://www.lam-mpi.org/