FALCONN icon indicating copy to clipboard operation
FALCONN copied to clipboard

Refactor the Makefile

Open ludwigschmidt opened this issue 9 years ago • 7 comments

The build targets for all the tests should be generated fully automatically by a script. The list of headers can also be generated by a script.

ludwigschmidt avatar Dec 17 '15 04:12 ludwigschmidt

The script could also figure out which version of swig to use (swig on Mac vs swig3.0 on Linux), and which g++ (g++-5 on Mac with the homebrew g++ install vs g++ on Linux).

ludwigschmidt avatar Jan 02 '16 16:01 ludwigschmidt

Use the right linker flag for C++ (lc++ vs lstdc++).

ludwigschmidt avatar Jan 11 '16 03:01 ludwigschmidt

Differences between Mac and Linux we noticed so far:

  • We want to use swig version 3. On Linux, this binary seems to be called swig3.0 most of the time, while a homebrew install on Mac calls the binary `swig'.
  • On Mac, -pthread gives you warnings because it is not used, while on Linux we need it.
  • On Mac, the GCC version of g++ (as opposed to the clang wrapper) is usually available as g++-5(at least when installed via homebrew). On Linux, we should probably just stick with g++.

ludwigschmidt avatar Mar 06 '16 23:03 ludwigschmidt

Currently the NumPy include folder is also hard-coded to the Python 2.7 site-packages directory, which prevented me from installing FALCONN for Python 3 using pip. Other than that it seems to work correctly for Python 3.

Using pip I got some seemingly unrelated compiling errors (but I'm far from an expert). After fixing this I was able to install it manually without any further issues. I haven't tried writing some own code yet, but the tests were successful at least.

I'm excited by the performance you're able to achieve compared to Annoy. For now I'll stick to Annoy though because of its thread-safety which enables me to do multiple queries in an embarrassingly parallel fashion. I'll definitely keep track of your efforts to add this to FALCONN as well. Also, the native support for sparse vectors in Python could be an awesome feature. Nice work!

bittremieux avatar Mar 18 '16 10:03 bittremieux

@wbittremieux what are the compilation errors you were getting?

ilyaraz avatar Mar 18 '16 10:03 ilyaraz

@ilyaraz It were some conversion errors in the SWIG wrapper. See this paste for the full output.

bittremieux avatar Mar 18 '16 11:03 bittremieux

@wbittremieux Thanks! This is very helpful!!

ilyaraz avatar Mar 18 '16 12:03 ilyaraz