armi.tests.test_mpiFeatures module¶
Tests for featurest that need MPI, and thus require special testing. These tests will be generally ignored by pytest if you are trying to run them in an environment without MPI installed.
To run these tests from the commandline, install MPI, mpi4py, and do:
mpiexec -n 2 python -m pytest armi/tests/test_mpiFeatures.py or mpiexec.exe -n 2 python -m pytest armi/tests/test_mpiFeatures.py
- class armi.tests.test_mpiFeatures.FailingInterface1(r, cs)[source]¶
Bases:
armi.interfaces.Interfaceutility classes to make sure the logging system fails properly
Construct an interface.
The
randcsarguments are required, but may beNone, where appropriate for the specificInterfaceimplementation.- Parameters
r (Reactor) – A reactor to attach to
cs (Settings) – Settings object to use
- Raises
RuntimeError – Interfaces derived from Interface must define their name
- class armi.tests.test_mpiFeatures.FailingInterface2(r, cs)[source]¶
Bases:
armi.interfaces.Interfaceutility class to make sure the logging system fails properly
Construct an interface.
The
randcsarguments are required, but may beNone, where appropriate for the specificInterfaceimplementation.- Parameters
r (Reactor) – A reactor to attach to
cs (Settings) – Settings object to use
- Raises
RuntimeError – Interfaces derived from Interface must define their name
- class armi.tests.test_mpiFeatures.FailingInterface3(r, cs)[source]¶
Bases:
armi.interfaces.Interfacefails on worker operate
Construct an interface.
The
randcsarguments are required, but may beNone, where appropriate for the specificInterfaceimplementation.- Parameters
r (Reactor) – A reactor to attach to
cs (Settings) – Settings object to use
- Raises
RuntimeError – Interfaces derived from Interface must define their name
- class armi.tests.test_mpiFeatures.MpiOperatorTests(methodName='runTest')[source]¶
Bases:
unittest.case.TestCaseTesting the MPI parallelization operator
Create an instance of the class that will use the named test method when executed. Raises a ValueError if the instance does not have a method with the specified name.
- class armi.tests.test_mpiFeatures.BcastAction1[source]¶
Bases:
armi.mpiActions.MpiAction
- class armi.tests.test_mpiFeatures.BcastAction2[source]¶
Bases:
armi.mpiActions.MpiAction
- class armi.tests.test_mpiFeatures.MpiDistributeStateTests(methodName='runTest')[source]¶
Bases:
unittest.case.TestCaseCreate an instance of the class that will use the named test method when executed. Raises a ValueError if the instance does not have a method with the specified name.
- test_distributeSettings()[source]¶
Under normal circumstances, we would not test “private” methods; however, distributeState is quite complicated.
- test_distributeReactor()[source]¶
Under normal circumstances, we would not test “private” methods; however, distributeState is quite complicated.