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: 2004-03-20 08:23:56


On Sat, 13 Mar 2004, James Fang wrote:

> I am trying to make a manager/worker program that monitors processes
> running on different nodes of a clusters. I am writing the program in
> c++ and I am having problem using the spawn features in MPI. I have
> tried to use
>
> MPI_Comm_spawn(worker_program, MPI_ARGV_NULL, universe_size-1,
> MPI_INFO_NULL, 0, MPI_COMM_SELF, &everyone, MPI_ERRCODEES_IGNORE);
>
> but, I recieve an error at the last parameter indicating that I am
> substituting a void* for int*

That sounds like a bug. :-\

You can probably work around this by casting MPI_ERRCODES_IGNORE to (int*)
or editing your mpi.h to change the defintion of MPI_ERRCODES_IGNORE to
(int*) instead of (void*).

> I then tried to use
>
> MPI::Intracomm::Spawn(worker_program, MPI::ARGV_NULL, universe_size-1,
> MPI::INFO_NULL, 3, MPI::COMM_SELF, &everyone);
>
> but this returned three errors, MPI::ARGV_NULL, MPI::INFO_NULL,
> Intracomm::Spawn undefined.

We did not have all the MPI 2 C++ bindings implemented in LAM/MPI 7.0.x --
they will be complete in LAM/MPI 7.1.

> I then declared an int* and replaced MPI_ERRCODEES_IGNORE in
>
> MPI_Comm_spawn(worker_program, MPI_ARGV_NULL, universe_size-1,
> MPI_INFO_NULL, 0, MPI_COMM_SELF, &everyone, MPI_ERRCODEES_IGNORE);
>
> this led to the successful calling of the worker program, but then I
> recieved errors in the worker_program, which when compiled by itself has
> no errors. I am now running out of ideas, so you have any idea of what
> is going on, or if you know any example of how MPI_Comm_spawn works, it
> will be greatly appreciated. The programs I wrote are as the following:

It's hard to say what is wrong without knowing what the run-time errors
were when you ran. ;-)

The lamtests suite (on the main LAM download page) has several spawn
programs in it -- look in dynamic/ and lam/dynamic/ for some examples.

Hope that helps.

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