fastFM icon indicating copy to clipboard operation
fastFM copied to clipboard

Install fastFM in conda with openblas

Open chunguo opened this issue 9 years ago • 3 comments

I'm not sure if it is proper to open up an issue for documenting my own experiences installing fastFM on a Linux machine without root privilege. Administrator, please move it to some more suitable place if you can think of any.

I installed conda some time ago. It includes sklearn, numpy, and other useful things for machine learning and building recommendation system. It has other things required by fastFM except for BLAS, which can be easily installed with

conda install openblas

However, it seems fastFM does not recognize openblas by default. Or probably I'm missing some conda setup. Anyway, when I tried compiling fastFM, it failed because the cblas.h file is missing.

The solution to that is to append the absolute path to cblas.h to fast_fm.h, which is under fastFM-core/src/. My cblas.h is under .../anaconda2/pkgs/openblas-0.2.14-4/include/.

After that, I encountered another issue, where fastFM cannot recognize openblas as blas. To solve this, I simply changed this line in setup.py (libraries=['m', 'fastfm', 'cxsparse', 'blas']) to (libraries=['m', 'fastfm', 'cxsparse', 'openblas']).

I also added "....anaconda2/pkgs/openblas-0.2.14-4/include/" and "..../anaconda2/pkgs/openblas-0.2.14-4/lib/" to include_dirs in setup.py. Not sure if this is necessary.

Note: anaconda2 is my conda environment.

Hope this will help others who have similar problems.

chunguo avatar Apr 27 '16 21:04 chunguo

@chunguo Thanks

ibayer avatar Apr 28 '16 08:04 ibayer

@chunguo Nice!Thanks!

lamalu111232 avatar Jul 10 '16 02:07 lamalu111232

I just build with "make TARGET=HASWELL" and it works! :-)

italoPontes avatar Feb 11 '18 05:02 italoPontes