qttools.comm#
source package qttools.comm
Classes
-
QuatrexCommunicator — A communicator that handles all block and stack communications.
source class QuatrexCommunicator()
A communicator that handles all block and stack communications.
This class is a singleton and should be used as such. It is initialized with the global communicator and can be configured with the block and stack communicators.
Attributes
-
block : SubCommunicator — The block communicator.
-
stack : SubCommunicator — The stack communicator.
Methods
source method QuatrexCommunicator.configure(block_comm_size: int, block_comm_config: dict, stack_comm_config: dict, override: bool = False)
Configures the communicator.
Parameters
-
block_comm_size : int — The size of the block communicator.
-
block_comm_config : dict — The configuration for the block sub-communicator.
-
stack_comm_config : dict — The configuration for the stack sub-communicator.
-
override : bool, optional — Whether to override a previous configuration. Defaul is False.
Raises
-
RuntimeError — If the communicator is already configured.
-
ValueError — If the block communicator size is not a multiple of the total number of ranks.
source method QuatrexCommunicator.barrier()
Perform barrier synchronization.