#I have changed flags in CMakeLists.txt as following: set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -fopenmp -static-openmp") set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fopenmp -static-openmp")