Skip to content
Snippets Groups Projects
Commit 1aad0dcb authored by Christoph Rettinger's avatar Christoph Rettinger
Browse files

Added warning if no SIMD instruction could be determined, adapted field...

Added warning if no SIMD instruction could be determined, adapted field layouts in all tests and benchmarks
parent 35861a59
No related merge requests found
......@@ -10,6 +10,7 @@ from lbmpy.stencils import get_stencil
with CodeGeneration() as ctx:
omegaVisc = sp.Symbol("omega_visc")
omegaBulk = ps.fields("omega_bulk: [3D]", layout='fzyx')
omegaMagic = sp.Symbol("omega_magic")
......@@ -37,8 +38,8 @@ with CodeGeneration() as ctx:
#print(methodWithForce.relaxation_rates)
#print(methodWithForce.moment_matrix)
collision_rule = create_lb_collision_rule(lb_method=methodWithForce)
generate_lattice_model(ctx, 'GeneratedLBM', collision_rule)
collision_rule = create_lb_collision_rule(lb_method=methodWithForce, optimization={'cse_global': True})
generate_lattice_model(ctx, 'GeneratedLBM', collision_rule, field_layout='fzyx')
......
......@@ -41,5 +41,5 @@ with CodeGeneration() as ctx:
#print(methodWithForce.relaxation_rates)
#print(methodWithForce.moment_matrix)
collision_rule = create_lb_collision_rule(lb_method=methodWithForce)
generate_lattice_model(ctx, 'GeneratedLBMWithForce', collision_rule)
collision_rule = create_lb_collision_rule(lb_method=methodWithForce, optimization={'cse_global': True})
generate_lattice_model(ctx, 'GeneratedLBMWithForce', collision_rule, field_layout='fzyx')
import warnings
from collections import OrderedDict, defaultdict
from itertools import product
from typing import Dict, Optional, Sequence, Tuple
......@@ -331,8 +332,9 @@ def get_vectorize_instruction_set(generation_context):
if generation_context.optimize_for_localhost:
supported_instruction_sets = get_supported_instruction_sets()
if supported_instruction_sets:
return get_supported_instruction_sets()[-1]
return supported_instruction_sets[-1]
else: # if cpuinfo package is not installed
warnings.warn("Could not obtain supported vectorization instruction sets - defaulting to sse")
return 'sse'
else:
return None
......
......@@ -22,3 +22,4 @@ with CodeGeneration() as ctx:
for conf in configurations:
generate_lattice_model(ctx, 'FieldLayoutAndVectorizationTest_'+conf.name+'_LatticeModel', collision_rule,
field_layout=conf.field_layout, refinement_scaling=None, cpu_vectorize_info=conf.vectorization_dict)
......@@ -9,7 +9,7 @@ from lbmpy_walberla import generate_lattice_model
with CodeGeneration() as ctx:
omega_shear = sp.symbols("omega_shear")
temperature = sp.symbols("temperature")
force_field, vel_field = ps.fields("force(3), velocity(3): [3D]", layout='fzyx')
force_field, vel_field = ps.fields("force(3), velocity(3): [3D]", layout='zyxf')
def rr_getter(moment_group):
is_shear = [is_shear_moment(m, 3) for m in moment_group]
......
......@@ -7,7 +7,7 @@ from lbmpy_walberla import RefinementScaling, generate_boundary, generate_lattic
with CodeGeneration() as ctx:
omega, omega_free = sp.symbols("omega, omega_free")
force_field, vel_field, omega_out = ps.fields("force(3), velocity(3), omega_out: [3D]", layout='fzyx')
force_field, vel_field, omega_out = ps.fields("force(3), velocity(3), omega_out: [3D]", layout='zyxf')
# the collision rule of the LB method where the some advanced features
collision_rule = create_lb_collision_rule(
......
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment