Exemplo n.º 1
0
# warning is given, as of NumPy 1.10.0 and 1.10.1, Matplotlib 1.4.3:
# FutureWarning: elementwise comparison failed; returning scalar instead,
# but in the future will perform elementwise comparison
#   if self._edgecolors == str('face'):
# This is a bug and will hopefully be fixed by the developers.
# In the meantime, as everything seems to be alright,
# suppress this warning.
import warnings
warnings.filterwarnings('ignore', category=FutureWarning)
# Import h5py. This has to be done after importing matplotlib, as this
# somehow makes libpng unable to find the zlib shared library.
import h5py
# For fancy terminal output
from blessings import Terminal
terminal = Terminal(force_styling=True)
terminal.CONCEPT = 'CO\x1b[3mN\x1b[23mCEPT'
# For timing
from time import time
from datetime import timedelta
# For development purposes only
from time import sleep



#############
# MPI setup #
#############
from mpi4py import MPI
cython.declare(master='bint',
               nprocs='int',
               rank='int',