Skip to content
Snippets Groups Projects
Commit d48f6900 authored by Dominic Kempf's avatar Dominic Kempf
Browse files

Add an option to allow turning off vectorization of jacobians

They are only to a lesser extent important for our HPC applications
and the vectorization algorithm struggles with the complexity of the
search space.
parent 3ebcc845
No related branches found
No related tags found
No related merge requests found
......@@ -85,6 +85,7 @@ class PerftoolFormOptionsArray(ImmutableRecord):
vectorization_padding = PerftoolOption(default=None, helpstr="an explicit value for the allowed padding in vectorization")
vectorization_allow_quadrature_changes = PerftoolOption(default=False, helpstr="whether the vectorization strategy is allowed to alter quadrature point numbers")
vectorization_list_index = PerftoolOption(default=None, helpstr="Which vectorization to pick from a list (only valid with vectorization_strategy=fromlist).")
vectorization_jacobians = PerftoolOption(default=False, helpstr="Whether to attempt to vectorize jacobians (takes time, often not needed)")
simplify = PerftoolOption(default=False, helpstr="Whether to simplify expressions using sympy")
generate_jacobians = PerftoolOption(default=True, helpstr="Whether jacobian_* methods should be generated. This is set to false automatically, when numerical_jacobian is set to true.")
generate_residuals = PerftoolOption(default=True, helpstr="Whether alpha_* methods should be generated.")
......
......@@ -151,7 +151,7 @@ def decide_vectorization_strategy():
active_sumfacts = [i for i in all_sumfacts if i.stage == 3 or i in basis_sumfacts]
# If no vectorization is needed, abort now
if get_form_option("vectorization_strategy") == "none":
if get_form_option("vectorization_strategy") == "none" or (get_global_context_value("form_type") == "jacobian" and not get_form_option("vectorization_jacobians")):
for sf in all_sumfacts:
_cache_vectorization_info(sf, sf.copy(buffer=get_counted_variable("buffer")))
return
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment