sfepy.base.multiproc_mpi module¶
Multiprocessing functions.
- class sfepy.base.multiproc_mpi.MPIFileHandler(filename, mode=4, comm=<mpi4py.MPI.Intracomm object>)[source]¶
MPI file class for logging process communication.
- close()[source]¶
Tidy up any resources used by the handler.
This version removes the handler from an internal map of handlers, _handlers, which is used for handler lookup by name. Subclasses should ensure that this gets called from overridden close() methods.
- emit(record)[source]¶
Emit a record.
If a formatter is specified, it is used to format the record. The record is then written to the stream with a trailing newline. If exception information is present, it is formatted using traceback.print_exception and appended to the stream. If the stream has an ‘encoding’ attribute, it is used to determine how to do the output to the stream.
- class sfepy.base.multiproc_mpi.RemoteDict(name, mutable=False)[source]¶
Remote dictionary class - slave side.
- class sfepy.base.multiproc_mpi.RemoteDictMaster(name, mutable=False, soft_set=False, *args)[source]¶
Remote dictionary class - master side.
- class sfepy.base.multiproc_mpi.RemoteInt(remote_dict, value=None)[source]¶
Remote intiger class, data saved in RemoteDict.
- value¶
- class sfepy.base.multiproc_mpi.RemoteLock[source]¶
Remote lock class - lock and unlock restricted access to the master.
- class sfepy.base.multiproc_mpi.RemoteQueueMaster(name, mode='fifo', *args)[source]¶
Remote queue class - master side.
- sfepy.base.multiproc_mpi.get_dict(name, mutable=False, clear=False, soft_set=False)[source]¶
Get the remote dictionary.
- sfepy.base.multiproc_mpi.get_logger(log_filename='multiproc_mpi.log')[source]¶
Get the MPI logger which log information into a shared file.
- sfepy.base.multiproc_mpi.is_remote_dict(d)[source]¶
Return True if ‘d’ is RemoteDict or RemoteDictMaster instance.
- sfepy.base.multiproc_mpi.master_loop()[source]¶
Run the master loop - wait for requests from slaves.
- sfepy.base.multiproc_mpi.tags¶
alias of
Enum