triqs.utility.mpi_nompi

Serial stub implementation of the TRIQS MPI interface.

Mirrors the public surface of triqs.utility.mpi_mpi4py for the case where TRIQS is invoked outside of an MPI launcher. Every function either returns its input unchanged, performs a no-op, or runs the computation locally; the underlying mpi4py is never imported.

triqs.utility.mpi re-exports this module when triqs.utility.mpi.check_for_mpi() returns False.

Attributes

worldNone

Placeholder for the communicator. Always None in serial.

rankint

Always 0.

sizeint

Always 1.

All_Nodes_reportbool

Provided for API compatibility with the parallel backend; has no effect here. Default False.

Functions

all_reduce(x[, comm, op])

Serial reduction: return x unchanged.

barrier([poll_msec])

No-op barrier provided for API compatibility.

bcast(x[, root])

Serial broadcast: return x unchanged.

is_master_node()

Return True; in serial there is only the master rank.

master_gets_host_names()

Print the local hostname.

myprint_err(x)

Write x followed by a newline to sys.stderr.

myprint_out(x)

Write x followed by a newline to sys.stdout.

recv([source])

Serial receive: return the value previously stored by send().

report(*x, **opt)

Print one line per argument to stdout (or stderr).

send(val, dest)

Serial send: store val so that the next recv() can retrieve it.

slice_array(A)

Serial slice: return A unchanged.