Skip to content
Snippets Groups Projects

Added guard around import to avoid failing when walberla is there but no python module is built

Merged Christoph Rettinger requested to merge mr_parallel_datahandling_fix into master
1 file
+ 8
1
Compare changes
  • Side-by-side
  • Inline
@@ -8,11 +8,18 @@ from pystencils.boundaries.createindexlist import (
@@ -8,11 +8,18 @@ from pystencils.boundaries.createindexlist import (
create_boundary_index_array, numpy_data_type_for_boundary_object)
create_boundary_index_array, numpy_data_type_for_boundary_object)
from pystencils.cache import memorycache
from pystencils.cache import memorycache
from pystencils.data_types import TypedSymbol, create_type
from pystencils.data_types import TypedSymbol, create_type
from pystencils.datahandling import ParallelDataHandling
from pystencils.datahandling.pycuda import PyCudaArrayHandler
from pystencils.datahandling.pycuda import PyCudaArrayHandler
from pystencils.field import Field
from pystencils.field import Field
from pystencils.kernelparameters import FieldPointerSymbol
from pystencils.kernelparameters import FieldPointerSymbol
 
try:
 
# noinspection PyPep8Naming
 
import waLBerla as wlb
 
if wlb.cpp_available:
 
from pystencils.datahandling.parallel_datahandling import ParallelDataHandling
 
except ImportError:
 
ParallelDataHandling = None
 
DEFAULT_FLAG_TYPE = np.uint32
DEFAULT_FLAG_TYPE = np.uint32
Loading