armi.operators.operatorMPI module

The MPI-aware variant of the standard ARMI operator.

Notes

This is not yet smart enough to use shared memory when the MPI tasks are on the same machine. Everything goes through MPI. This can be optimized as needed.

class armi.operators.operatorMPI.OperatorMPI(cs)[source]

Bases: Operator

MPI-aware Operator.

operate()[source]

Operate method for all nodes.

Calls _mainOperate or workerOperate depending on which MPI rank we are, and handles errors.

workerOperate()[source]

The main loop on any worker MPI nodes.

Notes

This method is what worker nodes are in while they wait for instructions from the primary node in a parallel run. The nodes will sit, waiting for a “worker command”. When this comes (from a bcast from the primary), a set of if statements are evaluated, with specific behaviors defined for each command. If the operator doesn’t understand the command, it loops through the interface stack to see if any of the interfaces understand it.

Originally, “magic strings” were broadcast, which were handled either here or in one of the interfaces’ workerOperate methods. Since then, the mpiActions system has been devised which just broadcasts MpiAction objects. Both methods are still supported.

See also

armi.mpiActions

MpiAction information

armi.interfaces.workerOperate

interface-level handling of worker commands.

static workerQuit()[source]
collapseAllStderrs()[source]

Takes all the individual stderr files from each processor and arranges them nicely into one file.