Faiss: disable-openmp but IndexHNSW still using openmp

Created on 18 Oct 2018  路  3Comments  路  Source: facebookresearch/faiss

Summary

Platform

macOS 10.14

Faiss version: 87721af1294c0dc2008d0537d9082198a477ac3a

Faiss compilation options: --with-python-config=python3.6-config --disable-openmp

Running on:

  • [*] CPU
  • [ ] GPU

Interface:

  • [* ] C++
  • [ ] Python

Reproduction instructions

./configure --with-python-config=python3.6-config --disable-openmp
make -j7

./IndexHNSW.h:14:10: fatal error: 'omp.h' file not found
#include <omp.h>

install question

Most helpful comment

Worth to mention openmp as a prerequisite. For MacOS the simplest way to fix it: brew install libomp

More on this: https://iscinumpy.gitlab.io/post/omp-on-high-sierra/

All 3 comments

yep you still need a dummy openmp lib. You can provide it in a few functions:

omp_get_num_threads -> should return 1
omp_get_max_threads -> 1
omp_get_thread_num -> 0

then I think it should work

no activity, closing.

Worth to mention openmp as a prerequisite. For MacOS the simplest way to fix it: brew install libomp

More on this: https://iscinumpy.gitlab.io/post/omp-on-high-sierra/

Was this page helpful?
0 / 5 - 0 ratings

Related issues

cherryPotter picture cherryPotter  路  3Comments

siva2k16 picture siva2k16  路  3Comments

zoe-cheung picture zoe-cheung  路  3Comments

linghuang picture linghuang  路  3Comments

jukaradayi picture jukaradayi  路  3Comments