backend_tests_mpi.py 文件源码

python
阅读 23 收藏 0 点赞 0 评论 0

项目:abcpy 作者: eth-cscs 项目源码 文件源码
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()
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号