Source code for qstone.multiprocessing.nompi

"""MPI handler in case of no MPI Support - passthrough"""


[docs] class MPIHandler: """MPIHandler wraps MPI calls"""
[docs] def Get_size(self): # pylint: disable=invalid-name """Returns the size of the channel""" return 0
[docs] def Get_rank(self): # pylint: disable=invalid-name """Returns the rank of the channel""" return 0
[docs] def BCast(self, **kwargs): # pylint: disable=invalid-name """BCast call - mocked""" raise NotImplementedError("Requires MPI support")
[docs] def allreduce(self, **kwargs): # pylint: disable=invalid-name """allreduce call - mocked""" raise NotImplementedError("Requires MPI support")
[docs] def allgather( self, sendobj=None, recvobj=None ): # pylint: disable=[invalid-name, unused-argument] """allgather call - mocked""" return []
[docs] def Barrier(self): # pylint: disable=invalid-name """Barrier call - mocked""" pass