microsoft / ALEX

A library for building an in-memory, Adaptive Learned indEX
MIT License
656 stars 112 forks source link

alex insert on Ubuntu #15

Closed maryxu72 closed 2 years ago

maryxu72 commented 2 years ago

Hello, I had a problem when compiling and running alex example(alex/src/examples/main.cpp) on Ubuntu. Here is the compile command and options: g++ -march=native -mlzcnt -mbmi -std=c++14 -g main.cpp when I run the code, I got this error:

a.out: ../core/alex_nodes.h:484:void alex::AlexDataNode<T, P, compare, Alloc, allow_duplicates>::set_bit(int) [with T = double; P = double; Compare = alex::AlexCompare; Alloc = std::allocator<std::pair<double, double> >; bool allow_dupliates = true]: Assertion 'pos >= 0 && pos < datacapacity' failed. Aborted.

The same error happened when running benchmark.

The OS is Ubuntu 14.04 LTS, and the CPU is Intel Xeon E5-2609.

I run both example and benchmark on Windows successfully. So I am not sure what caused the error on Ubuntu.

Thanks for your help on insert operation. Greatly appreciate your help.