LAM/MPI logo

LAM/MPI General User's Mailing List Archives

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

From: Alex Nu (notulei_at_[hidden])
Date: 2004-04-10 20:09:19


 Hi,

 Is there a way to specify how many processes I
 want to spawn in the MPI_INIT subroutine ?
 Or any other way to spawn processes besides
 mpi_comm_spawn ?

 I want to add a subroutine to a program where I would

 use MPI just under certain conditions and using
 different number of processes.
 ( I want to avoid using mpi_comm_spawn)

 short example:

 main(int argc, char *argv[])
{
  ...
  if (condition) mympi(mpi_argc, mpiargv)
  ...
}

mympi(int argc, char *argv[]) {
  ...
  MPI_Init(argc,argv);
  MPI_Comm_size(MPI_COMM_WORLD, &size);
  MPI_Comm_rank(MPI_COMM_WORLD, &rank);
  ....
  MPI_Finalize()
}

 Thanks

 Alex
 

__________________________________
Do you Yahoo!?
Yahoo! Tax Center - File online by April 15th
http://taxes.yahoo.com/filing.html