I think there is a memory leak in py_alltoall, this simple example illustrates the leak.
Save this code as a file with the name test.py
import os
from neuron import h
import sys
tmp = {i:range(10) for i in range(3)}
data = [tmp for i in range(int(h.pc.nhost()))]
for i in range(10000):
data = h.pc.py_alltoall(data)
if h.pc.id()==0:
if i%150==0:
tot_m, used_m, free_m = map(int, os.popen('free -t -m').readlines()[-1].split()[1:])
print('mem used ' + str(used_m/1000.0))
sys.stdout.flush()
then save the following code as test.hoc and run it on an mpi machine, something like srun special -mpi -NFRAME 256 test.hoc
{load_file( "nrngui.hoc" )}
objref pc
pc = new ParallelContext()
nrnpython("exec(open('test.py').read())")
this is the output that I get from the python code:
srun special -mpi -NFRAME 256 test.hoc
numprocs=576
NEURON -- VERSION 7.6.2-28-gb3097b7+ HEAD (b3097b7+) 2018-10-18
Duke, Yale, and the BlueBrain Project -- Copyright 1984-2018
See http://neuron.yale.edu/neuron/credits
Additional mechanisms from files
m/ALU.mod m/ASCIIrecord.mod ...
load test.hoc 186
load nrngui.hoc 40
load stdgui.hoc 222
load stdlib.hoc 5062
load family.hoc 3911
load shapebox.hoc 5324
load pointbsr.hoc 1332
load wingroup.hoc 7374
load stdrun.hoc 19084
load atoltool.hoc 6191
load varmeth1.hoc 6655
load movierun.hoc 1073
load inserter.hoc 2892
load pointman.hoc 4475
mem used 11.012
mem used 12.317
mem used 13.502
mem used 14.686
mem used 15.873
mem used 17.058
mem used 18.24
mem used 19.421
mem used 20.606
mem used 21.794
mem used 22.976
mem used 24.166
mem used 25.347
mem used 26.533
mem used 27.714
mem used 28.897
mem used 30.083
Thanks
I think there is a memory leak in py_alltoall, this simple example illustrates the leak.
Save this code as a file with the name test.py
then save the following code as test.hoc and run it on an mpi machine, something like
srun special -mpi -NFRAME 256 test.hocthis is the output that I get from the python code:
Thanks