Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

call ivf search coredump through multithreads #3321

Open
shaozhixue opened this issue Mar 27, 2024 · 2 comments
Open

call ivf search coredump through multithreads #3321

shaozhixue opened this issue Mar 27, 2024 · 2 comments

Comments

@shaozhixue
Copy link

shaozhixue commented Mar 27, 2024

Summary

my program call ivf's search coredump through multithreads. if the parameter nprobe is the same in all requests, problem disappeared. single thread has not the problem.

Platform

centos 7 x86_64

Faiss version: 1.70

Installed from: compile source code

Running on:
-CPU

Interface:

  • C++

error information:

terminate called after throwing an instance of 'faiss::FaissException'
what(): Error in faiss::IndexIVF::search_preassigned(faiss::Index::idx_t, const float*, faiss::Index::idx_t, const idx_t*, const float*, float*, faiss::Index::idx_t*, bool, const faiss::IVFSearchParameters*, faiss::IndexIVFStats*) const::__lambda4 at /data1/minisearch/upload/zhixue3/git/vs/third-64/faiss/faiss/IndexIVF.cpp:459: Error: 'key < (idx_t)nlist' failed: Invalid key=4537784286748968700 nlist=20480

I suspect this issue is related to OpenMP.

How should this issue be resolved?

@alexanderguzhva
Copy link
Contributor

Do I get it correctly that you'd like to run index.search() using multiple threads, and search thread wants to use its own nprobe? If so, then you need to pass up const faiss::IVFSearchParameters* parameter, which allows to configure nprobe for each search request

@shaozhixue
Copy link
Author

Do I get it correctly that you'd like to run index.search() using multiple threads, and search thread wants to use its own nprobe? If so, then you need to pass up const faiss::IVFSearchParameters* parameter, which allows to configure nprobe for each search request

Thank you for your reply, I will try it right away

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants