sfepy.base.multiproc_mpi module

Multiprocessing functions.

class sfepy.base.multiproc_mpi.MPIFileHandler(filename, mode=4, encoding=None, delay=0, comm=<mpi4py.MPI.Intracomm object>)[source]

MPI file class for logging process communication.

close(self)[source]

Closes the stream.

class sfepy.base.multiproc_mpi.MPILogFile[source]
write(self, *args, **kwargs)[source]
class sfepy.base.multiproc_mpi.RemoteDict(name, mutable=False)[source]

Remote dictionary class - slave side.

get(self, key, default=None)[source]
keys(self)[source]
update(self, other)[source]
class sfepy.base.multiproc_mpi.RemoteDictMaster(name, mutable=False, soft_set=False, *args)[source]

Remote dictionary class - master side.

remote_get(self, key, slave)[source]
remote_get_in(self, key, slave)[source]
remote_get_keys(self, slave)[source]
remote_get_len(self, slave)[source]
remote_set(self, data, slave, mutable=False)[source]
class sfepy.base.multiproc_mpi.RemoteInt(remote_dict, value=None)[source]

Remote intiger class, data saved in RemoteDict.

class IntDesc[source]
value
class sfepy.base.multiproc_mpi.RemoteLock[source]

Remote lock class - lock and unlock restricted access to the master.

acquire(self)[source]
release(self)[source]
class sfepy.base.multiproc_mpi.RemoteQueue(name)[source]

Remote queue class - slave side.

get(self)[source]
put(self, value)[source]
class sfepy.base.multiproc_mpi.RemoteQueueMaster(name, mode='fifo', *args)[source]

Remote queue class - master side.

clean(self)[source]
get(self)[source]
static get_gdict_key(name)[source]
put(self, value)[source]
remote_get(self, slave)[source]
remote_put(self, value, slave)[source]
sfepy.base.multiproc_mpi.cpu_count()[source]

Get the number of MPI nodes.

sfepy.base.multiproc_mpi.enum(*sequential)[source]
sfepy.base.multiproc_mpi.get_dict(name, mutable=False, clear=False, soft_set=False)[source]

Get the remote dictionary.

sfepy.base.multiproc_mpi.get_int_value(name, init_value=0)[source]

Get the remote integer value.

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.get_queue(name)[source]

Get the queue.

sfepy.base.multiproc_mpi.get_slaves()[source]

Get the list of slave nodes

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.master_send_continue()[source]

Send ‘continue’ to all slaves.

sfepy.base.multiproc_mpi.master_send_task(task, data)[source]

Send task to all slaves.

sfepy.base.multiproc_mpi.set_logging_level(log_level='info')[source]
sfepy.base.multiproc_mpi.slave_get_task(name='')[source]

Start the slave nodes.

sfepy.base.multiproc_mpi.slave_task_done(task='')[source]

Stop the slave nodes.

sfepy.base.multiproc_mpi.tags

alias of sfepy.base.multiproc_mpi.Enum

sfepy.base.multiproc_mpi.wait_for_tag(wtag, num=1)[source]