[MPICH] Changing the comm size at runtime

Anthony Chan chan at mcs.anl.gov
Thu Mar 15 17:27:34 CDT 2007


Can you try adding these lines right after MPI_Init() ?

    MPI_Comm_get_attr(MPI_COMM_WORLD, MPI_UNIVERSE_SIZE, &usize, &aflag);

and see if the singleton init works.

A.Chan


On Thu, 15 Mar 2007, [ISO-8859-1] Patrick Gräbel wrote:

>
> I read your book's appendix about "Another way for MPI Processes to
> Start" and the Forum's explanation: So a "high quality" implementation
> of MPI-2's MPI::Init allows to transform a plain process to a MPI
> process at runtime, no mpiexec needed.
>
> In order to test this, I removed all manipulations of env vars and just
> relied on MPI::Init. I also tried to test master and slave with and
> without mpd running in background (I am using Cygwin/gcc build atm,
> tomorrow I will test it with VC++ build/smpd). The result:
>
> without mpd in background:
> - port creation ok, accept blocks
> - connect fails with "cannot connect to local mpd"
>
> with mpd in background:
> - port creation ok, accept blocks forever
> - connect blocks forever
>
> Using "mpiexec -n 1 ..." on master and slave works fine as usual.
>
> I got stuck here... :(
>
> Greetings
> Patrick
>
> Rajeev Thakur schrieb:
> > You should be able to use the singleton init feature of MPI-2 by which a
> > program not started with mpiexec can become an MPI program by calling
> > MPI_Init. No environment variable needed. Then two such programs can connect
> > to each other with MPI_Comm_connect/accept. This should work at least in
> > MPICH2 on Unix. If it doesn't work on Windows let us know.
> >
> > Rajeev
>
>




More information about the mpich-discuss mailing list