OpenMathLib / OpenMathLib/OpenBLAS
Memory related issues with OpenMP + OneDAL and OpenMP + Scikit-learn
Nobody has claimed this yet.
- Dominant language
- C
- Stars
- 7.6k
- Forks
- 1.7k
- Avg merge
- 1d 3h
- Merged PRs (30d)
- 42
Description
OneDAL: When build with OpenBLAS with OpenMP backend and running DBScan, it throws memory related error as follows:
OpenBLAS warning: precompiled NUM_THREADS exceeded, adding auxiliary array for thread metadata.
To avoid this warning, please rebuild your copy of OpenBLAS with a larger NUM_THREADS setting
or set the environment variable OPENBLAS_NUM_THREADS to 32 or lower
BLAS : Bad memory unallocation! : 576 0xff4e09000000
OpenBLAS Build Command (OneDAL): make USE_OPENMP=1
Scikit-learn: When build with OpenBLAS with NUM_PARALLEL>=30 (I am trying to modify OpenBLAS and it requires to use NUM_PARALLEL=30) and using KMeans it throws similar memory related error as above
OpenBLAS Build Command (Scikit-learn): make USE_OPENMP=1 NUM_PARALLEL=30
I suspect this is happening because of how locks are used around buffer allocation and de-allocation in memory.c. I am not able to find the exact cause and would love to have some help from the community in resolving it.
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by inspecting memory.c, focusing on the buffer allocation and de-allocation paths and their locks. Reproduce the issue with the reported OpenBLAS build settings while running DBScan or KMeans, then verify that the memory warning and bad unallocation no longer occur.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- c, scikit-learn
- Domain
- performance
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 32/100