cmuparlay / ParlayANN

A library of algorithms for approximate nearest neighbor search in high dimensions, along with a set of useful tools for designing such algorithms.
MIT License
88 stars 21 forks source link

Build failure in the "data_tools" directory. #15

Closed biqar closed 3 months ago

biqar commented 4 months ago

Can't build compute_groundtruth, compute_range_groundtruth, and random_sample in the "data_tools" directory. Got the following error:

$ make compute_groundtruth
g++ -DHOMEGROWN -pthread -mcx16 -O3 -std=c++17 -march=native -DNDEBUG -I . -o compute_groundtruth compute_groundtruth.cpp -DHOMEGROWN -pthread -ldl  
In file included from compute_groundtruth.cpp:7:
utils/euclidian_point.h:31:10: fatal error: ../bench/parse_command_line.h: No such file or directory
   31 | #include "../bench/parse_command_line.h"
      |          ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
compilation terminated.
make: *** [Makefile:7: compute_groundtruth] Error 1
$ make compute_range_groundtruth
g++ -DHOMEGROWN -pthread -mcx16 -O3 -std=c++17 -march=native -DNDEBUG -I . -o compute_range_groundtruth compute_range_groundtruth.cpp -DHOMEGROWN -pthread -ldl  
In file included from compute_range_groundtruth.cpp:7:
utils/euclidian_point.h:31:10: fatal error: ../bench/parse_command_line.h: No such file or directory
   31 | #include "../bench/parse_command_line.h"
      |          ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
compilation terminated.
make: *** [Makefile:10: compute_range_groundtruth] Error 1
$ make random_sample
g++ -DHOMEGROWN -pthread -mcx16 -O3 -std=c++17 -march=native -DNDEBUG -I . -o random_sample random_sample.cpp -DHOMEGROWN -pthread -ldl  
In file included from random_sample.cpp:7:
utils/mmap.h:31:10: fatal error: ../bench/parse_command_line.h: No such file or directory
   31 | #include "../bench/parse_command_line.h"
      |          ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
compilation terminated.
make: *** [Makefile:16: random_sample] Error 1
magdalendobson commented 3 months ago

I just tried to reproduce this on a fresh install and I did not encounter this bug. Is it possible that you did not initialize the submodules properly? Or are you on a branch other than main?

biqar commented 3 months ago

Hi @magdalendobson, thanks for your prompt response. I retried the steps with a fresh install and did not able to reproduce the previously reported bugs. I think the problem raised due to improper initialization of the the submodules.

However, while following the Algorithms documentation, I found the following two error:

Problem-1 (Build failure in rangeSearch/vamanaRange): while trying to build the Vamana range search code, got the following error

aislam6@cci-dirlab-09:~/testbuild/ParlayANN/rangeSearch/vamanaRange$ make
g++ -DSTATS -DHOMEGROWN -pthread -mcx16 -O3 -std=c++17 -march=native -DNDEBUG -I .  -include range.h -o range ../bench/rangeTime.C -DHOMEGROWN -pthread -ldl 
In file included from <command-line>:
./range.h:26:10: fatal error: ../utils/check_range_recall.h: No such file or directory
   26 | #include "../utils/check_range_recall.h"
      |          ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
compilation terminated.
make: *** [../bench/MakeBench:17: range] Error 1

Problem-2 (No make file for HNSW): No make file is provided in the ParlayANN/algorithms/HNSW directory

aislam6@cci-dirlab-09:~/testbuild/ParlayANN/algorithms/HNSW$ make
make: *** No targets specified and no makefile found.  Stop.

Please let me know if you need any further input from me. Thanks in advance!

magdalendobson commented 3 months ago

Thanks for pointing these out. It looks like there was a missing file in the case of range search, and I have added that file now. With HNSW, we currently only support using HNSW through the python bindings interface rather than directly with C++. You can check them out in the 'python' folder and I will try to get the documentation fixed soon.

biqar commented 3 months ago

Thanks! Issue fixed now.