/usr/share/pyshared/pytools/mpiwrap.py is in python-pytools 2013.5.7-1.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 | """See pytools.prefork for this module's reason for being."""
import mpi4py.rc
mpi4py.rc.initialize = False
import pytools.prefork
pytools.prefork.enable_prefork()
from mpi4py.MPI import *
if Is_initialized():
raise RuntimeError("MPI already initialized before MPI wrapper import")
def InitWithAutoFinalize(*args, **kwargs):
result = Init(*args, **kwargs)
import atexit
atexit.register(Finalize)
return result
|