← Back to team overview

yade-users team mailing list archive

Re: [Question #192224]: MemoryError in saveTmp

 

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

    Status: Open => Answered

Jan Stránský proposed the following answer:
Hello,

according to Omega.*pp files, the content should be overwritten in the
memory if the same name is passed to O.saveTmp, but I have never worked
with iostreams more tham just on basic level, so I can't say for sure if
the memory is really overwritten..

Could you please send the whole MemoryError? One (not very nice) workarond
would be to save the content into file, not to memory. Could you also run
the simulation without actual running (or run only a few steps) and
save/load it many times so you can see the memory usage?

I will also write to yade-dev abot the yadeimport soltion

Jan


Dne 2. dubna 2012 14:56 ceguo <question192224@xxxxxxxxxxxxxxxxxxxxx>napsal(a):

> Question #192224 on Yade changed:
> https://answers.launchpad.net/yade/+question/192224
>
>     Status: Answered => Open
>
> ceguo is still having a problem:
> Hi Bruno,
>
> Thanks for your reply.
> -To encapsulate a simulation and call from python, I use the module
> `yadeimport` adapted from `yade-trunk`. Actually it is provided by Jan. My
> previous solution is copying all the libraries to the python lib directory
> properly, which also works smoothly. Here I show how to use yadeimport:
>
> =====================================================
> from yadeimport import *
> from yade.wrapper import *
> from yade import pack
>
> class simDEM(object):
>    def __init__(self,sd=1):
>        self.__id='thread'+str(sd)
>        self.__O=Omega()
>
>  self.__O.materials.append(FrictMat(young=1e9,poisson=1.,frictionAngle=.3,density=2650))
>        self.__sp=pack.SpherePack()
>
>  self.__sp.makeCloud(minCorner=(0,0,0),maxCorner=(20,20,0),rRelFuzz=.5,num=2000,periodic=True,porosity=0.28,seed=sd)
>        self.__sp.toSimulation()
>        self.__O.cell.hSize=utils.Matrix3(20,0,0, 0,20,0, 0,0,1)
>        for p in self.__O.bodies:
>            p.state.blockedDOFs='zXY'
>        self.__O.dt=.5*utils.PWaveTimeStep()
>
>    def consolidate(self,stress=(-2.e6,-2.e6,0,0,0,0)):
>        ...
>
>    def finalize(self):
>        self.__O.exitNoBacktrace()
>
> For `yadeimport`, I can send to anyone interested in this method (Jan
> sent to me). This method is useful for coupled problems as in my case I
> coupled yade with another FEM code.
>
> -As my test is very time-consuming, I usually run during night. So I
> didn't monitor the RAM usage. Just when I came back in the morning, I
> saw the error message.
>
> Ning
>
> --
> You received this question notification because you are a member of
> yade-users, which is an answer contact for Yade.
>
> _______________________________________________
> Mailing list: https://launchpad.net/~yade-users
> Post to     : yade-users@xxxxxxxxxxxxxxxxxxx
> Unsubscribe : https://launchpad.net/~yade-users
> More help   : https://help.launchpad.net/ListHelp
>

-- 
You received this question notification because you are a member of
yade-users, which is an answer contact for Yade.