O.reset() does not free memory
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Yade |
New
|
Low
|
Unassigned |
Bug Description
O.reset() does not free the memory, i.e. if you run a series of simulations in a loop the memory usage is accumulating. Here is a script which reproduces the issue (it should affect all versions):
# -*- coding: utf-8
import subprocess
numberTests = 10
for z in range(numberTests):
O.reset()
O.bodies.
print "number of bodies:", len(O.bodies)
cmd = "ps -o vsz -p `pgrep yade` | grep -v VSZ"
process = subprocess.
meminfo = process.
print "Yade memory usage: ", meminfo, "kB"
cmd = "egrep 'MemFree' /proc/meminfo"
process = subprocess.
meminfo = process.
print meminfo
sys.exit(0)
Changed in yade: | |
importance: | Undecided → Low |
I can confirm this bug.
Some time ago I wrote a (python) script which calls yade for performing a sphere drop with changing parameters. IN this script yade way invoked once and after a sphere drop was finished simulation was reset for the next parameter set. It ended up in about 30.000 parameter combinations that were simulated. This took about 5 days and at the end 128 GB Ram plus the same for Swap file was used...