← Back to team overview

yade-users team mailing list archive

Re: [Question #702325]: Abnormal increase in memory usage

 

Question #702325 on Yade changed:
https://answers.launchpad.net/yade/+question/702325

    Status: Answered => Open

Gao Xiang is still having a problem:
Hello,  Robert 
Thanks your reply,  in fact, I have used the addScene method, seen the following code, firstly, adding the new secens by O.addScene(), and loading the yade packing from files, therefore, there are many scenes in a single simulation.

And for every scenes, I used switchToScene to convert to the
corresponding scene, and started some calculation by  O.run(nsteps,
True) , everything works well except the increasing memory.

I used the tools "psutil"  to  monitor memory for every line code, and I find the memory increasing occurs always  after the code
“O.run(nsteps, True) ”,I'm really confused,maybe “O.run(nsteps, True) ”  creat the new scene (allocate memory)and not delete the old scene( free memory)?

forwaing to your reply!

Thank You!!!
 
###########################
def loadallRVE():
    inputPack(0)#load the initial pack as scene0
    pack_list=inputPack3() #load all the RVEs file and return list
    scenes=[0]
    for i in range(len(pack_list)):

       scenesID=O.addScene() #add new scenes and return the scenes' ID

       scenes.append(scenesID) 
       #print(scenesID)
       O.switchToScene(scenes[i+1])  #switch to new scene
       scenestring=pack_list[i] #load the pack
       Omega().stringToScene(scenestring) #from pack string to scene
    return scenes
#############################################

-- 
You received this question notification because your team yade-users is
an answer contact for Yade.