@@ -159,6 +159,23 @@ def parse_hook_fontconfig_add_fonts(ec, eprefix):
159159 raise EasyBuildError ("fontconfig-specific hook triggered for non-fontconfig easyconfig?!" )
160160
161161
162+ def parse_hook_openblas_relax_lapack_tests_num_errors (ec , eprefix ):
163+ """Relax number of failing numerical LAPACK tests on Arm 64-bit systems."""
164+ if ec .name == 'OpenBLAS' :
165+ # relax maximum number of failed numerical LAPACK tests on Arm 64-bit systems,
166+ # since the default setting of 150 that works well on x86_64 is a bit too strict
167+ cfg_option = 'max_failing_lapack_tests_num_errors'
168+ if get_cpu_architecture () == AARCH64 :
169+ orig_value = ec [cfg_option ]
170+ ec [cfg_option ] = 300
171+ print_msg ("Maximum number of failing LAPACK tests with numerical errors for %s relaxed to %s (was %s)" ,
172+ ec .name , ec [cfg_option ], orig_value )
173+ else :
174+ print_msg ("Not changing option %s for %s on non-AARCH64" , cfg_option , ec .name )
175+ else :
176+ raise EasyBuildError ("OpenBLAS-specific hook triggered for non-OpenBLAS easyconfig?!" )
177+
178+
162179def parse_hook_ucx_eprefix (ec , eprefix ):
163180 """Make UCX aware of compatibility layer via additional configuration options."""
164181 if ec .name == 'UCX' :
@@ -232,6 +249,7 @@ def pre_configure_hook_wrf_aarch64(self, *args, **kwargs):
232249PARSE_HOOKS = {
233250 'CGAL' : parse_hook_cgal_toolchainopts_precise ,
234251 'fontconfig' : parse_hook_fontconfig_add_fonts ,
252+ 'OpenBLAS' : parse_hook_openblas_relax_lapack_tests_num_errors ,
235253 'UCX' : parse_hook_ucx_eprefix ,
236254}
237255
0 commit comments