armi.utils.directoryChangersMpi module

MPI Directory changers

This is a separate module largely to minimize potential cyclic imports because the mpi action stuff requires an import of the reactor framework.

class armi.utils.directoryChangersMpi.MpiDirectoryChanger(destination)[source]

Bases: armi.utils.directoryChangers.DirectoryChanger

Change all nodes to specified directory.

Notes

filesToMove and filesToRetrieve do not get broadcasted to worker nodes. This is intended since this would cause a race condition between deleting and moving files.

Establish the new and return directories

Parameters
  • destination (str) – destination directory

  • op (armi.operators.Operator) – operator to send command

open()[source]

User requested open, used to stalling the close from a with statement.

This method has been made for old uses of os.chdir() and is not recommended. Please use the with statements

close()[source]

User requested close.

class armi.utils.directoryChangersMpi._ChangeDirectoryMpiAction(destination)[source]

Bases: armi.mpiActions.MpiAction

Change directory action.

invokeHook()[source]

This method must be overridden in sub-clases.

This method is called by worker nodes, and has access to the worker node’s operator, reactor, and settings (through self.o, self.r, and self.cs). It must return a boolean value of True or False, otherwise the worker node will raise an exception and terminate execution.

Returns

result – Dependent on implementation

Return type

object