Manager¶
- class esmpy.api.esmpymanager.Manager(debug=False, endFlag=<EndAction.NORMAL: 1>)¶
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:esmpy.local_pet() esmpy.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.
The
Manager
can be used to enable the MOAB mesh backend to theMesh
. This is done by callingset_moab()
withmoab_on=True
.The
Manager
has a test_exhaustive member variable that can be enabled to run combinatorial expansions ofGrid
andField
creation parameters.- Parameters:
- property local_pet¶
- Return type:
- Returns:
The id of the current Persistent Execution Thread (PET i.e. processing core).
- property moab¶
- Return type:
- Returns:
A boolean value to indicate if the MOAB mesh backend is in use.
- property pet_count¶
- Return type:
- Returns:
The number of Persistent Execution Threads (PETs i.e. processing cores) available in this execution.
- barrier()¶
Collective VM communication call that blocks calling PET until all PETs of the VM have issued the call.
- set_moab(moab_on=True)¶
Set the Mesh backend to use MOAB or the Native ESMF mesh.