DeepGraphLearning / graphvite

GraphVite: A General and High-performance Graph Embedding System
https://graphvite.io
Apache License 2.0
1.22k stars 151 forks source link

`faiss` issue on install #30

Closed bkj closed 4 years ago

bkj commented 4 years ago

When I try to follow the "install from source" directions in the README, I hit the following error:

software/graphvite/include/instance/visualization.cuh:25:36: fatal error: faiss/gpu/GpuIndexFlat.h: No such file or directory

Any idea how to solve? I tried installing faiss in various different ways but wasn't able to get it running.

Thanks! ~ Ben

KiddoZhu commented 4 years ago

The recommended practice is to let GraphVite automatically compile faiss from source (if you have Internet access).

Otherwise, you can manually specify the path to faiss repo by cmake .. -DFAISS_PATH=/path/to/faiss. This requires faiss to be compiled in advance.

Actually you can skip faiss if you don't need the visualization application. You can comment out all faiss related lines in CMakeLists.txt and visualization.cuh. We may add a shortcut to such skip in the future.

bkj commented 4 years ago

OK thanks. It seems like "let GraphVite automatically compile faiss from source" isn't working out-of-the-box per the error above -- is there some flag or path that needs to be set there?

KiddoZhu commented 4 years ago

The conda routine always compiles in that way. I think it should work.

Could you check the following steps?

bkj commented 4 years ago
KiddoZhu commented 4 years ago

It seems good. I also checked CMakeLists.txt and didn't find any obvious bug.

Can you find these two files? They should present if faiss has been compiled automatically by graphvite.

If they are present, can you add this line at the bottom of CMakeLists.txt and re-run cmake ..? message(STATUS ${PROJECT_BINARY_DIR})

This is expected to output the full path of build/. As you may find, we have already added ${PROJECT_BINARY_DIR}/faiss/include in CMakeLists.txt:104.