diff --git a/pystencils_walberla/codegen.py b/pystencils_walberla/codegen.py index 4d7612dce85673b337e38e09b84d51be4e7ea85f..fbe5db3fdc08a2b9d15ec3e881b5e45a6bb3ca28 100644 --- a/pystencils_walberla/codegen.py +++ b/pystencils_walberla/codegen.py @@ -191,7 +191,11 @@ def default_create_kernel_parameters(generation_context, params): default_dtype = "float64" if generation_context.double_accuracy else 'float32' if generation_context.optimize_for_localhost: - default_vec_is = get_supported_instruction_sets()[-1] + supported_instruction_sets = get_supported_instruction_sets() + if supported_instruction_sets: + default_vec_is = get_supported_instruction_sets()[-1] + else: # if cpuinfo package is not installed + default_vec_is = 'sse' else: default_vec_is = None