On Fri, 4 Dec 2009 13:59:46 -0600 (CST), Roy Stogner <[email protected]> wrote: > In the LibMeshInit constructor, we test MPI_Initialized() before > calling MPI_Init ourselves, so that if we're incorporated into a > larger MPI-using code we won't step on their toes. > > We don't currently do the same for PETSc or SLEPc.
PetscInitialize (and SlepcInitialize) do nothing if PETSc is already initialized so that's not a problem, the reason you have to check PetscInitialized is that you need to know whether you are responsible for calling PetscFinalize which can't be called multiple times. (Perhaps there is an argument for making it do nothing if already called, but doing so is a bug more often than not.) > I'm not sure what to do about SLEPc - there doesn't appear to be a > SlepcInitialized function. Is there some other way to test if > SlepcInitialize has been called? Is it safe to call SlepcInitialize > twice? Or do I need to pester slepc-maint with a feature request? extern PetscTruth SlepcInitializeCalled; Jed ------------------------------------------------------------------------------ Join us December 9, 2009 for the Red Hat Virtual Experience, a free event focused on virtualization and cloud computing. Attend in-depth sessions from your desk. Your couch. Anywhere. http://p.sf.net/sfu/redhat-sfdev2dev _______________________________________________ Libmesh-users mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/libmesh-users
