rvaser / spoa

SIMD partial order alignment tool/library
MIT License
158 stars 32 forks source link

Illegal Instruction #71

Closed heliziii closed 6 months ago

heliziii commented 1 year ago

Hello,

Thank you very much for your great tool! I used SPOA as part of my tool (by including spoa.hpp as described in Github and compiling from source). I am running my tool on a cluster and noticed that SPOA fails with Illegal instruction on some nodes with Intel(R) Xeon(R) E5-2680 CPU processors. Both see4.1 and AVX2 are supported by this processor:

flags: fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush dts acpi mmx fxsr sse sse2 ss ht tm pbe syscall nx pdpe1gb rdtscp lm constant_tsc arch_perfmon pebs bts rep_good nopl xtopology nonstop_tsc aperfmperf eagerfpu pni pclmulqdq dtes64 monitor ds_cpl vmx smx est tm2 ssse3 sdbg fma cx16 xtpr pdcm pcid dca sse4_1 sse4_2 x2apic movbe popcnt aes xsave avx f16c rdrand lahf_lm abm 3dnowprefetch epb cat_l3 cdp_l3 invpcid_single intel_ppin intel_pt tpr_shadow vnmi flexpriority ept vpid fsgsbase tsc_adjust bmi1 hle avx2 smep bmi2 erms invpcid rtm cqm rdt_a rdseed adx smap xsaveopt cqm_llc cqm_occup_llc cqm_mbm_total cqm_mbm_local dtherm ida arat pln pts.

that would be great if you could help me understand what is causing this, and if there is something that can be done to fix it.

Best, Helia

aastha-batta commented 9 months ago

Hi, This same issue happened with me in i7-10th gen. Maybe you are leaving the spoa_build_with_native option ON while building. Build it with sse4.1 or switch off this option while building.

SoapZA commented 6 months ago

Try building with

cmake -Dspoa_optimize_for_native=OFF -Dspoa_optimize_for_portability=ON [...]