triqs.utility.mpi_nompi.all_reduce

triqs.utility.mpi_nompi.all_reduce(x, comm=None, op=<function <lambda>>)[source]

Serial reduction: return x unchanged.

Operation op is ignored, so reductions such as MINLOC or MAXLOC that produce non-scalar values may give different results than their parallel counterparts; callers must therefore not rely on the reduced value being computed in serial.

Parameters:
xobject

Local contribution. Returned unchanged.

commobject, optional

Ignored; accepted for API compatibility. Default world (None in serial).

opcallable, optional

Reduction operation. Ignored in this stub.

Returns:
object

The input x, returned as-is.

Notes

For backwards compatibility with an older signature, when x is None the function prints a warning and returns comm to mimic the legacy call.