LAM/MPI logo

LAM/MPI General User's Mailing List Archives

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

From: William Boatin (wboatin_at_[hidden])
Date: 2003-07-16 09:38:43


the mastersRequests variable is declared within this function, so any loop
within this function should have access to it. mastersRequests is supposed
to be an array of MPI_Requests, declared like this:

  MPI_Status status[NUMBER_OF_SLAVES];
  MPI_Request mastersRequests[NUMBER_OF_SLAVES];
  Result recvResult[NUMBER_OF_SLAVES];

**********************************
Original message:
Hi,

I'm not sure on what i'll say because i don't
know c that much (unfortunately)...
Perhaps the variable &mastersRequests is valid inside
the for() and you can't access to it outside the cicle;
it's not a global variable, that's what i mean...
But i'm not sure as i said because i never know the scope
where the variables are valid or not!!!

regards, nelson

-----Original Message-----
From: William Boatin [mailto:wboatin_at_xxxxxxxxxxx]
Sent: Tue 15-Jul-03 8:59 PM
To: lam_at_xxxxxxxxxxx
Cc:
Subject: LAM: MPI_Startall error in LAM/MPI 6.5.9
I attempted to use the MPI_Startall command as follows:

  for (iSlave = 1; iSlave < iSize; iSlave++)
  {
    // build handles for the receipt of results
    MPI_Recv_init(&recvResult[iSlave],
                  1,
                  MPI_ResultType,
                  iSlave,
                  RESULTTAG,
                  MPI_COMM_WORLD,
                  &mastersRequests[iSlave]);
  }
MPI_Startall(iSize - 1, mastersRequests);

the code compiled fine, but when i tried to run the code(using mpirun -c 2
<program name>, i got the following error:

MPI process rank 0 (n0, p4837) caught a SIGSEGV in MPI_Startall.
Rank (0, MPI_COMM_WORLD): Call stack within LAM:
Rank (0, MPI_COMM_WORLD): - MPI_Startall()
Rank (0, MPI_COMM_WORLD): - main()
-----------------------------------------------------------------------------

One of the processes started by mpirun has exited with a nonzero exit
code. This typically indicates that the process finished in error.
If your process did not finish in error, be sure to include a "return
0" or "exit(0)" in your C code before exiting the application.

PID 4837 failed on node n0 with exit status 1.
-----------------------------------------------------------------------------

i tried changing the startall command and moving it up into the loop so it
looks like so:

        MPI_Start(&mastersRequests[iSlave]);

and that seemed to work (at least i got passed this point). what gives?

_________________________________________________________________
Tired of spam? Get advanced junk mail protection with MSN 8.
http://join.msn.com/?page=features/junkmail