Open ax3l opened 9 years ago
If we allow pyDive.init()
to be called twice, we can save a pyDive.is_initialized()
function. Is this right?
good idea, one could hide that from the user by handling it within init()
.
Nevertheless, providing an interface to call that internal state is sometimes useful: as an example, imagine an application that uses pyDive
together with an other library that depends on pyDive
. During init()
and shutdown()
phases of an application, it is sometimes not 100% obvious in what state pyDive
currently is, due to side effects that might be caused by the library that also uses pyDive
and does not know the user tries to init()
/shutdown
it too. (Example taken from an usual issue with libraries that depend on MPI.)
pyDive.init()
can not be called twice without throwing an error.Is there a getter method that allows us to check if
pyDive
is already initialized?(E.g.
MPI
offers an MPI_Initialized( flag ) function)This can be relevant for non-linear (non-script) workflow as they are common in a ipython notebook.