yangao07 / abPOA

abPOA: an SIMD-based C library for fast partial order alignment using adaptive band
MIT License
111 stars 18 forks source link

`abPOA ` conda installer broken? #42

Open Koen-vdl opened 1 year ago

Koen-vdl commented 1 year ago

I believe there is something wrong with the abPOAconda installer as the installed version breaks even with the test data (seq.fa).

conda create -n abpoa_env -c bioconda abpoa -y
conda activate abpoa_env
abpoa seq.fa > cons.fa
[main] CMD:  abpoa -r3 test_poa.fa
Illegal instruction (core dumped)

As a workaround, I built abPOA from source and experienced no issues there.

yangao07 commented 1 year ago

What is the system you were using? Is it Linux 64bit?

Koen-vdl commented 1 year ago

Yes, my OS is Ubuntu 20.04.6 LTS server

yangao07 commented 1 year ago

Hi, I pulled the conda update request a few days ago, but still no one reviewed/approved it. Do you have access to managing bioconda recipes?

yangao07 commented 1 year ago

The error is still there after I updated the build.sh in conda recipe. It may be related to the SIMDE, since the installation is good for versions without SIMDE, v1.2.5 or earlier.

Let me look into this.

willem-stock commented 1 year ago

same issue with the conda install (Linux 64bit; openSUSE Leap 15.4)

EricKutschera commented 8 months ago

I saw a similar Illegal instruction (core dumped) from TideHunter which uses abPOA. It seems that the conda package was built so that it uses instructions that some CPUs might not have. I ran in gdb to get more details about the error

gdb TideHunter
...
(gdb) r some_file.fq -o out_file.fa
Starting program:
...
Thread 4 "TideHunter" received signal SIGILL, Illegal instruction.
[Switching to Thread 0x7fffee9d8640 (LWP 58045)]
0x0000555555580281 in simd_abpoa_align_sequence_to_subgraph ()
...
(gdb) disassemble 0x0000555555580281,+1
Dump of assembler code from 0x555555580281 to 0x555555580282:
=> 0x0000555555580281 <simd_abpoa_align_sequence_to_subgraph+6433>:     vpbroadcastw -0x738(%rbp),%zmm0
End of assembler dump.

Then I searched for "vpbroadcastw instruction" and found: https://www.felixcloutier.com/x86/vpbroadcast Several variants of vpbroadcastw are listed there but some require: CPUID Feature Flags AVX2, AVX512VL, AVX512BW. I checked /proc/cpuinfo for those flags with commands like grep -i 'AVX2' /proc/cpuinfo The machine I was using had AVX2, but not AVX512VL or AVX512BW. I tried on a different machine which had all three of those AVX features and didn't get the illegal instruction error

I was also able to run on the machine without AVX512 by building from source

da-i commented 6 months ago

Can confirm that the conda install it is still broken on AMD 5800H