Beispiel #1
0
def Init():
    if getattr(Init, '__called', False):
        _func = (Init.__module__, Init.__name__)
        raise RuntimeError('%s.%s() already called' % _func)
    else:
        _mpi.init()
        _mpi._set_exception(Exception)
        setattr(Init, '__called', True)
Beispiel #2
0
def Init():
    if getattr(Init, '__called', False):
        _func = (Init.__module__, Init.__name__)
        raise RuntimeError('%s.%s() already called' % _func)
    else:
        _mpi.init()
        _mpi._set_exception(Exception)
        setattr(Init, '__called', True)
Beispiel #3
0
def Init_thread(required):
    if getattr(Init_thread, '__called', False):
        _func = (Init_thread.__module__, Init_thread.__name__)
        raise RuntimeError('%s.%s() already called' % _func)
    else:
        provided = _mpi.init_thread(required)
        _mpi._set_exception(Exception)
        setattr(Init_thread, '__called', True)
        return provided
Beispiel #4
0
def Init_thread(required):
    if getattr(Init_thread, '__called', False):
        _func = (Init_thread.__module__, Init_thread.__name__)
        raise RuntimeError('%s.%s() already called' % _func)
    else:
        provided = _mpi.init_thread(required)
        _mpi._set_exception(Exception)
        setattr(Init_thread, '__called', True)
        return provided
Beispiel #5
0
def Finalize():
    global COMM_WORLD
    global COMM_SELF
    if getattr(Finalize, '__called', False):
        _func = (Finalize.__module__, Finalize.__name__)
        raise RuntimeError('%s.%s() already called' % _func)
    else:
        COMM_SELF = COMM_WORLD = COMM_NULL
        _mpi.COMM_SELF = _mpi.COMM_WORLD = _mpi.COMM_NULL
        _mpi._set_exception(RuntimeError)
        _mpi.finalize()
        setattr(Finalize, '__called', True)
Beispiel #6
0
def Finalize():
    global COMM_WORLD
    global COMM_SELF
    if getattr(Finalize, '__called', False):
        _func = (Finalize.__module__, Finalize.__name__)
        raise RuntimeError('%s.%s() already called' % _func)
    else:
        COMM_SELF = COMM_WORLD = COMM_NULL
        _mpi.COMM_SELF = _mpi.COMM_WORLD = _mpi.COMM_NULL
        _mpi._set_exception(RuntimeError)
        _mpi.finalize()
        setattr(Finalize, '__called', True)
Beispiel #7
0
def _mpi_init():
    try:
        _mpi._set_exception(Exception)
    except StandardError:
        pass
Beispiel #8
0
def _mpi_init():
    try:
        _mpi._set_exception(Exception)
    except StandardError:
        pass