On 30 December 2012 17:11, <
fre...@witherden.org> wrote:
> Hi all,
>
> In my application I have the need to control when MPI_Init is called.
> However, it appears as if this also requires an explicit finalize:
>
>
> Is this a bug in mpi4py? I can not find anything implying that
> rc.initialize and rc.finalize are mutually exclusive and since rc.finalize
> defaults to 1 I was expecting everything to just work.
>
Well, I've implemented this long ago and at that time I assumed that
if you were handling initialization yourself, you also need to handle
finalization.
https://code.google.com/p/mpi4py/source/browse/src/MPI/atimport.pxi#127
What we could do o be backward-compatible with old behaviour is the
following: If initialize=False, then by default we also have
finalize=False, but if the user explicitly sets finalize=True, mpi4py
automatically calls MPI_Finalize(). @freddie, does this sounds
acceptable to you?
What other people on this list think about this?
--
Lisandro Dalcin
---------------
CIMEC (INTEC/CONICET-UNL)
Predio CONICET-Santa Fe
Colectora RN 168 Km 472, Paraje El Pozo
3000 Santa Fe, Argentina
Tel:
+54-342-4511594 (ext 1011)
Tel/Fax:
+54-342-4511169