You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When IS_PARALLEL is False, no memory leak occurs. To check this I run mprof run --include-children python bug.py using the standard memory_profiler package. The exported profile I get with mprof plot --output memory.png is shown below:
However, when IS_PARALLEL is True, I get completely different picture:
The leak gets worse as the size of arrays and the number of internal iterations in the loop increases. In my experiments with real code I observed several hundreds gigabytes of RAM consumed by the process, where normally it requires less then a gigabyte.
Note that when racing conditions are resolved via accumulation of temporary results, everything works normally again. I.e., whis this modification:
I Found that numba does not do garbage collection also. I created an API and ran a function 3 to 5 time it started consuming RAM from 1 gb and eventually end up with 8 gb.
Reporting a bug
visible in the change log (https://github.com/numba/numba/blob/master/CHANGE_LOG).
i.e. it's possible to run as 'python bug.py'.
Simple reproducing example:
When
IS_PARALLEL
isFalse
, no memory leak occurs. To check this I runmprof run --include-children python bug.py
using the standardmemory_profiler
package. The exported profile I get withmprof plot --output memory.png
is shown below:However, when
IS_PARALLEL
isTrue
, I get completely different picture:The leak gets worse as the size of arrays and the number of internal iterations in the loop increases. In my experiments with real code I observed several hundreds gigabytes of RAM consumed by the process, where normally it requires less then a gigabyte.
Note that when racing conditions are resolved via accumulation of temporary results, everything works normally again. I.e., whis this modification:
I get the following memory profile:
The problem with this workaround is that
n_tries
in my real experiments is very large, so it's not an option to accumulate intermediate results.The text was updated successfully, but these errors were encountered: