alexeygrigorev/libftrl-python

openmp problem in mac OS

hamidmaei opened this issue · 1 comments

Hi Alexey, Thanks for providing your libftrl-python code. I tried to install it on my mac, after installing all dependencies, but got this error:

[ 50%] Building CXX object CMakeFiles/ftrl.dir/src/ftrl.cpp.o
clang: error: unsupported option '-fopenmp'
make[2]: *** [CMakeFiles/ftrl.dir/src/ftrl.cpp.o] Error 1
make[1]: *** [CMakeFiles/ftrl.dir/all] Error 2
make: *** [all] Error 2

It seems there is an issue with openMP in Mac and I couldn't fix it. Would appreciate for your comments and helps.

Hi,

Quick googling suggests that there is a way to install gcc with openmp on mac, try, e.g. "openmp mac".

Alternatively you can disable openmp and compile without it. For that, remove the line set(CMAKE_CXX_FLAGS "-fopenmp -DUSEOMP") from CMakeLists.txt (line #4). Of course, it will make training a lot slower, but not prohibitively.