diff options
Diffstat (limited to 'Python/pywarpx/_libwarpx.py')
-rwxr-xr-x | Python/pywarpx/_libwarpx.py | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/Python/pywarpx/_libwarpx.py b/Python/pywarpx/_libwarpx.py index 2c942c49d..84e13d1af 100755 --- a/Python/pywarpx/_libwarpx.py +++ b/Python/pywarpx/_libwarpx.py @@ -5,13 +5,14 @@ # # License: BSD-3-Clause-LBNL -# --- This defines the wrapper functions that directly call the underlying compiled routines -import os -import sys -import platform import atexit import ctypes from ctypes.util import find_library as _find_library +# --- This defines the wrapper functions that directly call the underlying compiled routines +import os +import platform +import sys + import numpy as np from numpy.ctypeslib import ndpointer as _ndpointer @@ -21,6 +22,7 @@ try: # --- If mpi4py is going to be used, this needs to be imported # --- before libwarpx is loaded, because mpi4py calls MPI_Init from mpi4py import MPI + # --- Change MPI Comm type depending on MPICH (int) or OpenMPI (void*) if MPI._sizeof(MPI.Comm) == ctypes.sizeof(ctypes.c_int): _MPI_Comm_type = ctypes.c_int |