def setUpModule():
'''
If an exception is raised in a setUpModule then none of
the tests in the module will be run.
This is useful because the slaves run in a while loop on initialization
only responding to the master's commands and will never execute anything else.
On termination of master, the slaves call quit() that raises a SystemExit().
Because of the behaviour of setUpModule, it will not run any unit tests
for the slave and we now only need to write unit-tests from the master's
point of view.
'''
global rank,backend_mpi
comm = MPI.COMM_WORLD
rank = comm.Get_rank()
backend_mpi = BackendMPI()
评论列表
文章目录