Closed tanliboy closed 5 years ago
I encountered another error while following the instructions for testing.
$ ngt create -d 128 -o c index ./data/sift-dataset-5k.tsv
ngt: Error: Specify greater than 0 for # of your data dimension by a parameter -d.
Usage: ngt create -d dimension [-p #-of-thread] [-i index-type(t|g)] [-g graph-type(a|k|b|o|i)] [-t truncation-edge-limit] [-E edge-size] [-S edge-size-for-search] [-L edge-size-limit] [-e epsilon] [-o object-type(f|c)] [-D distance-function(1|2|a|A|h|j|c|C)] [-n #-of-inserted-objects] [-P path-adjustment-interval] [-B dynamic-edge-size-base] [-A object-alignment(t|f)] [-T build-time-limit] [-O outgoing x incoming] index(output) [data.tsv(input)]
It seems lib/NGT/Command.cpp
could not pass -d
as expected above. Is it a KP?
When you use macOS, the order of the command line parameters is different from that of the READMEs. Below is the order for macOS.
ngt parameters-with-a-dash command parameters
Below is an example for macOS.
ngt -d 128 -o f create index ./data/sift-dataset-5k.tsv
In addition, since I found a bug of the distance function for the byte object type, please use the float type "-o f" instead of the byte type like the example above. Although I am going to fix it as soon as possible, if you use the byte type right now, please build NGT without avx as below.
cmake -DNGT_AVX_DISABLED=ON ..
Since the bug above depends on your CPU, you might not have the bug.
I released NGT V1.7.8 to deal with the warning and the bug on a specific CPU.
@masajiro, thank you for the quick fix and explanation!
I am new to this project. Probably this question has been discussed before.
When I pull this repository and compile. It has shown
copy elision
warning as below:It is not an important thing, but should we let the compiler to do RVO instead?