easybuild-easyblocks
easybuild-easyblocks copied to clipboard
opencv easyblock makes tests in jsc-zen2 to fail
Tests in jsc-zen2 inject a custom optarch {'Intel': 'march=core-avx2'} that is currently not supported by the easyblock of OpenCV.
== 2022-07-05 16:12:25,158 build_log.py:169 ERROR EasyBuild crashed with an error (at easybuild/easybuild-framework/easybuild/base/exceptions.py:124 in init): Don't know how to configure OpenCV in accordance with --optarch='{'Intel': 'march=core-avx2'}' (at easybuild/easybuild-easyblocks/easybuild/easyblocks/o/opencv.py:175 in configure_step)
Full report of failed tests can be found in https://github.com/easybuilders/easybuild-easyconfigs/pull/15816
There are multiple issues to fix:
- Opencv easyblock assumes
optarchonly exists in its simple form--optarch=<flags>, while jsc-zen2 is injecting flags for the Intel compiler. - Converting
marchvalues to their correspondingCPU_BASELINEsettings in OpenCV is not trivial. For instance, the present case withcore-avx2does not correspond to any of the targets in archspec.
workaround is to add EB_ARGS='--optarch=""
see https://github.com/easybuilders/easybuild-easyblocks/pull/2804