Manager¶
-
class
ESMF.api.esmpymanager.
Manager
(debug=False)¶ This singleton class is designed to ensure that ESMF is properly initialized and finalized. ESMF is initialized at
Manager
creation, and the __del__ method is registered with atexit to ensure ESMF is always finalized prior to exiting Python. If the object is copied, the copy will always be an alias to the originalManager
object. TheManager
will be created when the first ESMPy object is created if it is not created explicitly by the user.Explicit creation of a
Manager
object allows for setting a flag which results in the output of debug information from the ESMF logging capability during the application runtime. The output log files are named PET<PET number>.ESMF_LogFile.The PET rank (local_pet) and total number of PETs (pet_count) can also be retrieved from the
Manager
using the following calls:ESMF.local_pet() ESMF.pet_count()
local_pet
andpet_count
are also properties of theManager
.Calls ESMP_Initialize and registers __del__ with atexit when called the first time. Subsequent calls only return whether or not ESMF is initialized. Registering __del__ with atexit ensures the ESMP_Finalize will always be called prior to exiting Python. Calling __init__ explicitly results in a no-op.
- Parameters
debug (bool) – outputs logging information to ESMF logfiles. If
None
, defaults to False.