> On 12 Mar 2024, at 15:12, Terje Kvernes <[email protected]> wrote:
>
>>
>> On 12 Mar 2024, at 15:01, Jure Pečar <[email protected]> wrote:
>>
>> On Tue, 12 Mar 2024 12:31:16 +0000
>> Borut Rozman <[email protected]> wrote:
>>
>>> Hi,
>>>
>>> I have a situation with bedtools, specifically in AMD chipset.
>>>
>>> I have build bedtools 3.5.1-foss-2021b on an INTEL with -optarch
>>> GENERIC flag but it still crashes under AMD,
>>>
>>> the onlything I get is Illegal instruction (core dumped) and in dmesg:
>>>
>>>
>>> traps: plotCorrelation[591375] trap invalid opcode ip:7f246960fbd0
>>> sp:7fff258064b8 error:0 in libopenblas_skylakexp-
>>> r0.3.18.so[7f2469295000+ebd000]
>>
>> Did you built just deeptools with -optarch GENERIC or the rest of the
>> toolchain too? This looks like something in plotCorrelations picks up
>> skylake branch of blas functions which most likely include avx512 calls.
>> And those would only work on zen4 and produce "illegal instruction" on
>> older amd cpus.
>
> Also note that OpenBLAS does not adhere to optarch, as per
> https://github.com/easybuilders/easybuild-easyconfigs/issues/9754. The
> solution is usually to have a hook add DYNAMIC_ARCH=1 for OpenBLAS. Something
> like this (adopted from EESSI):
>
> pre_configure_hook(self, *args, **kwargs):
I fail at copy-paste. This is obviously supposed to be:
def pre_configure_hook(self, *args, **kwargs):
> if self.name == 'OpenBLAS’:
> if build_option('optarch') == OPTARCH_GENERIC:
> for step in ('build', 'test', 'install’):
> self.cfg.update(f'{step}opts', "DYNAMIC_ARCH=1”)
>
> See https://docs.easybuild.io/hooks/ for more information about hooks. :)
--
Terje Kvernes
Head sysadmin
Department of Mathematics
University of Oslo