Skip to content

[Question] SIGILL on non-AVX2 CPU when running ./apps/build_memory_index #665

@xwt1

Description

@xwt1

Hello!
My CPU architecture and supported instruction sets are shown at the bottom. As you can see, the CPU does not support AVX2. After compiling and running the example in
, running ./apps/build_memory_index crashes. I checked the core dump (see below), and it looks like an instruction corresponding to the AVX2 ISA is not available on this machine.

Therefore, if I can only run DiskANN on this machine, how should I set the build options? Do you have any recommended settings for a CPU that supports AVX but not AVX2?

Using host libthread_db library "/lib/x86_64-linux-gnu/libthread_db.so.1".
--Type <RET> for more, q to quit, c to continue without paging--
Core was generated by `./apps/build_memory_index --data_type float --dist_fn l2 --data_path data/sift/'.
Program terminated with signal SIGILL, Illegal instruction.
#0  0x000056308cc03ac8 in diskann::DistanceL2Float::compare(float const*, float const*, unsigned int) const ()
[Current thread is 1 (Thread 0x7f28eb7a9ac0 (LWP 62787))]
(gdb) bt
#0  0x000056308cc03ac8 in diskann::DistanceL2Float::compare(float const*, float const*, unsigned int) const ()
#1  0x000056308cf9fa0f in diskann::InMemDataStore<float>::get_distance(float const*, unsigned int const*, unsigned int, float*, diskann::AbstractScratch<float>*) const ()
#2  0x000056308cc63e15 in diskann::Index<float, unsigned int, unsigned int>::iterate_to_fixed_point(diskann::InMemQueryScratch<float>*, unsigned int, std::vector<unsigned int, std::allocator<unsigned int> > const&, bool, std::vector<unsigned int, std::allocator<unsigned int> > const&, bool) ()
#3  0x000056308cc64842 in diskann::Index<float, unsigned int, unsigned int>::search_for_point_and_prune(int, unsigned int, std::vector<unsigned int, std::allocator<unsigned int> >&, diskann::InMemQueryScratch<float>*, bool, unsigned int) ()
#4  0x000056308cf82673 in diskann::Index<float, unsigned int, unsigned int>::link() [clone ._omp_fn.0] ()
#5  0x00007f28f4e5a727 in ?? () from /lib/x86_64-linux-gnu/libomp.so.5
--Type <RET> for more, q to quit, c to continue without paging--
#6  0x00007f28f4e78623 in __kmp_invoke_microtask () from /lib/x86_64-linux-gnu/libomp.so.5
#7  0x00007f28f4dec3a9 in ?? () from /lib/x86_64-linux-gnu/libomp.so.5
#8  0x00007f28f4deac42 in ?? () from /lib/x86_64-linux-gnu/libomp.so.5
#9  0x00007f28f4e5284b in ?? () from /lib/x86_64-linux-gnu/libomp.so.5
#10 0x00007f28eb83fac3 in start_thread (arg=<optimized out>) at ./nptl/pthread_create.c:442
#11 0x00007f28eb8d1850 in clone3 () at ../sysdeps/unix/sysv/linux/x86_64/clone3.S:81
(gdb) 
(gdb) q

My build method follows microsoft/DiskANN#500
:

cmake -S . -B build -DPORTABLE=True
cmake --build build -- -j #like 99% sure this is right, I've been off for two weeks and don't remember how anything works anymore

My machine configuration:

Architecture:                x86_64
  CPU op-mode(s):            32-bit, 64-bit
  Address sizes:             46 bits physical, 48 bits virtual
  Byte Order:                Little Endian
CPU(s):                      16
  On-line CPU(s) list:       0-15
Vendor ID:                   GenuineIntel
  Model name:                Intel(R) Xeon(R) CPU E5-2450 0 @ 2.10GHz
    CPU family:              6
    Model:                   45
    Thread(s) per core:      2
    Core(s) per socket:      8
    Socket(s):               1
    Stepping:                7
    CPU max MHz:             2900.0000
    CPU min MHz:             1200.0000
    BogoMIPS:                4200.00
    Flags:                   fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmo
                             v 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 cpuid aperfmperf pni
                              pclmulqdq dtes64 monitor ds_cpl vmx smx est tm2 ssse3 cx16 
                             xtpr pdcm pcid dca sse4_1 sse4_2 x2apic popcnt tsc_deadline_
                             timer aes xsave avx lahf_lm pti ssbd ibrs ibpb stibp tpr_sha
                             dow vnmi flexpriority ept vpid xsaveopt dtherm ida arat pln 
                             pts md_clear flush_l1d
Virtualization features:     
  Virtualization:            VT-x
Caches (sum of all):         
  L1d:                       256 KiB (8 instances)
  L1i:                       256 KiB (8 instances)
  L2:                        2 MiB (8 instances)
  L3:                        20 MiB (1 instance)
NUMA:                        
  NUMA node(s):              1
  NUMA node0 CPU(s):         0-15
Vulnerabilities:             
  Gather data sampling:      Not affected
  Indirect target selection: Not affected
  Itlb multihit:             KVM: Mitigation: VMX disabled
  L1tf:                      Mitigation; PTE Inversion; VMX conditional cache flushes, SM
                             T vulnerable
  Mds:                       Mitigation; Clear CPU buffers; SMT vulnerable
  Meltdown:                  Mitigation; PTI
  Mmio stale data:           Unknown: No mitigations
  Reg file data sampling:    Not affected
  Retbleed:                  Not affected
  Spec rstack overflow:      Not affected
  Spec store bypass:         Mitigation; Speculative Store Bypass disabled via prctl and 
                             seccomp
  Spectre v1:                Mitigation; usercopy/swapgs barriers and __user pointer sani
                             tization
  Spectre v2:                Mitigation; Retpolines; IBPB conditional; IBRS_FW; STIBP con
                             ditional; RSB filling; PBRSB-eIBRS Not affected; BHI Not aff
                             ected
  Srbds:                     Not affected
  Tsx async abort:           Not affected

I appreciate any suggestion!

Metadata

Metadata

Assignees

No one assigned

    Labels

    questionFurther information is requested

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions