Vectorization is not working
The LbCodeGenerationExample
-Test in waLBerla could not be built with the following settings in CMake:
-DCMAKE_C_COMPILER=clang
-DCMAKE_CXX_COMPILER=clang++
-DWALBERLA_OPTIMIZE_FOR_LOCALHOST=ON
-DWALBERLA_BUILD_WITH_OPENMP=ON
-DWALBERLA_BUILD_WITH_OPENMESH=ON
-DWALBERLA_BUILD_WITH_CODEGEN=ON
-DWALBERLA_BUILD_SHOWCASES=ON
-DWALBERLA_BUILD_TESTS=ON
-DPYTHON_EXECUTABLE=/local/ca36xymo/miniconda3/bin/python3.9
-DWALBERLA_DOUBLE_ACCURACY=OFF
Instead, the code generation results in the following error:
$ make LbCodeGenerationExample
[ 0%] Generating default_codegen/LbCodeGenerationExample_LatticeModel.cpp, default_codegen/LbCodeGenerationExample_LatticeModel.h, default_codegen/LbCodeGenerationExample_NoSlip.cpp, default_codegen/LbCodeGenerationExample_NoSlip.h, default_codegen/LbCodeGenerationExample_UBB.cpp, default_codegen/LbCodeGenerationExample_UBB.h, default_codegen/LbCodeGenerationExample.h
Traceback (most recent call last):
File "/local/ca36xymo/walberla/tests/lbm/codegen/LbCodeGenerationExample.py", line 34, in <module>
generate_lattice_model(ctx, 'LbCodeGenerationExample_LatticeModel', collision_rule,
File "/local/ca36xymo/walberla/python/lbmpy_walberla/walberla_lbm_generation.py", line 162, in generate_lattice_model
stream_collide_ast = create_kernel(stream_collide_update_rule, config=config)
File "/local/ca36xymo/miniconda3/lib/python3.9/site-packages/pystencils/kernelcreation.py", line 142, in create_kernel
return create_domain_kernel(assignments, config=config)
File "/local/ca36xymo/miniconda3/lib/python3.9/site-packages/pystencils/kernelcreation.py", line 202, in create_domain_kernel
vectorize(ast, **config.cpu_vectorize_info)
File "/local/ca36xymo/miniconda3/lib/python3.9/site-packages/pystencils/cpu/vectorization.py", line 120, in vectorize
raise NotImplementedError("Cannot vectorize kernels that contain accesses "
NotImplementedError: Cannot vectorize kernels that contain accesses to differently typed floating point fields
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/local/ca36xymo/walberla/tests/lbm/codegen/LbCodeGenerationExample.py", line 38, in <module>
generate_info_header(ctx, 'LbCodeGenerationExample')
File "/local/ca36xymo/walberla/python/pystencils_walberla/cmake_integration.py", line 43, in __exit__
raise ValueError(error_message)
ValueError: Generated files (OUT_FILES) specified not correctlyin cmake with 'waLBerla_generate_target_from_python'
Files only specified in CMake ['LbCodeGenerationExample.h', 'LbCodeGenerationExample_LatticeModel.h', 'LbCodeGenerationExample_UBB.h', 'LbCodeGenerationExample_NoSlip.cpp', 'LbCodeGenerationExample_UBB.cpp', 'LbCodeGenerationExample_NoSlip.h', 'LbCodeGenerationExample_LatticeModel.cpp']
make[3]: *** [tests/lbm/CMakeFiles/LbCodeGenerationExampleGenerated.dir/build.make:71: tests/lbm/default_codegen/LbCodeGenerationExample_LatticeModel.cpp] Error 1
make[2]: *** [CMakeFiles/Makefile2:7662: tests/lbm/CMakeFiles/LbCodeGenerationExampleGenerated.dir/all] Error 2
make[1]: *** [CMakeFiles/Makefile2:7463: tests/lbm/CMakeFiles/LbCodeGenerationExample.dir/rule] Error 2
make: *** [Makefile:498: tests/lbm/CMakeFiles/LbCodeGenerationExample.dir/rule] Error 2
The issue should be reproducible on any of our private i10staff*
machines (clang 10.0.0) with lbmpy and pystencils in version 0.4.0.
Edited by Christoph Schwarzmeier