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

Fix test failure in OSX with OpenMP called from multiple threads #1849

Closed
wants to merge 6 commits into from

Conversation

mdouze
Copy link
Contributor

@mdouze mdouze commented Apr 28, 2021

Need to add an ssh key to the circleci to be able to debug

For my own ref, how to connect to the job:

[matthijs@matthijs-mbp /Users/matthijs/Desktop/faiss_github/circleci_keys] ssh -p 54782 38.39.188.110 -i id_ed25519

@mdouze
Copy link
Contributor Author

mdouze commented Apr 28, 2021

I can repro:

bash-3.2$ PYTHONPATH=../build/faiss/python/build/lib/ python3 -m unittest test_index_binary
..nb tests 20 44
..WARNING clustering 200 points to 8 centroids: please provide at least 312 training points
..WARNING clustering 200 points to 10 centroids: please provide at least 390 training points
[7 7 8 8 8] [7 7 8 8 8]
[812 866 121 452 578] [812 866 452 578 121]
...WARNING clustering 256 points to 32 centroids: please provide at least 1248 training points
...OMP: Error #131: Thread identifier invalid.
Abort trap: 6
bash-3.2$ pwd
/Users/distiller/project/tests

@mdouze
Copy link
Contributor Author

mdouze commented Apr 28, 2021

More accurate:

bash-3.2$ PYTHONPATH=../build/faiss/python/build/lib/ python3 -m unittest test_index_binary.TestReplicasAndShards.test_replicas
OMP: Error #13: Assertion failure at kmp_runtime.cpp(3689).
OMP: Hint Please submit a bug report with this message, compile and run commands used, and machine configuration info including native compiler and operating system versions. Faster response will be obtained by including all program sources. For information on submitting this issue, please see https://bugs.llvm.org/.
Abort trap: 6

@mdouze
Copy link
Contributor Author

mdouze commented Apr 28, 2021

lldb backtrace:
https://gist.github.com/mdouze/d4f3bf7e2edec4ff207d4c869eacfd0c

Could be because an OMP parallel loop is called from several threads.

@mdouze
Copy link
Contributor Author

mdouze commented Apr 28, 2021

Works when setting nb threads to 1: https://gist.github.com/mdouze/3af918414f8cf6e90d996e0f3306008d

@mdouze
Copy link
Contributor Author

mdouze commented Apr 28, 2021

Same story with test_meta_index:

https://gist.github.com/mdouze/4e1f6573e9438583b7677a78f5c89f46

@mdouze
Copy link
Contributor Author

mdouze commented Apr 28, 2021

Hmm now homebrew is down on OSX. I guess I'll have to wait.

@mdouze mdouze changed the title Debug OSX job Fix test failure in OSX with OpenMP called from multiple threads Apr 28, 2021
@facebook-github-bot
Copy link
Contributor

@mdouze has imported this pull request. If you are a Facebook employee, you can view this diff on Phabricator.

@facebook-github-bot
Copy link
Contributor

@mdouze merged this pull request in 4dc5b27.

@junjieqi junjieqi deleted the circleci_with_ssh_key branch March 4, 2024 18:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants