[Gate-users] Jobs killed "memory exceeded"?

Amy Meldrum ameldru at g.clemson.edu
Wed Sep 17 13:46:43 CEST 2014


Hello,

I am still a relatively new user to GATE, and I am just trying to finish
some simulations before I graduate in December. If I understand this thread
correctly, are you suggesting that I install the newest version of Gate to
correct these errors?

I will say that initially I was able to run [short] simulations with the
alpha particle source without the memory issue after I changed two surfaces
from being touching to being ~1nm apart. Yet when I try this 'trick' with
another simulation, I still ran into the memory leak issue. I guess an
alternative I could try would be to run many, many short simulations so
that the chances of running into the memory problem is less; this would not
be too difficult since I run Gate on a computing cluster at my school.

I am hoping to find an easy, quick fix for this problem, as I need to have
my simulation data soon for my thesis.

-Amy

On Tue, Sep 16, 2014 at 5:01 PM, Dávid Völgyes <david.volgyes at gmail.com>
wrote:

> Hi David,
>
> Yes, I just checked a minute ago, and all three of the patches are
> incorporated into the develop branch.
> So I would modify my advice to this one:
> Amy could try the latest development code, maybe it solves the memory
> leak problem.
> (This is actually better idea than just applying our patches, because
> there is at least another one memory leak fix in the development
> branch. (I did not check all the commits, so there may be more.))
>
> In general, if somebody can create a short test GATE macro (the
> shorter the better) for any bug, and he/she can share it, then it is
> very useful for the actual code development.
>
> Best,
>   David
>
>
> On Tue, Sep 16, 2014 at 9:12 PM, David Sarrut
> <David.Sarrut at creatis.insa-lyon.fr> wrote:
> > Hello,
> >
> > David : correct me if I am wrong, but those patches are already included
> in
> > the develop branch of the git version, right ?
> >
> > thanks,
> > David
> >
> > On Tue, Sep 16, 2014 at 1:43 PM, Dávid Völgyes <david.volgyes at gmail.com>
> > wrote:
> >>
> >> Hi Amy,
> >>
> >> Hopefully, Sebastiens suggestion will help you, but if not, you can try
> >> the followings:
> >>
> >> Gergely Patay and me sent some source code patches in June to the
> mailing
> >> list, they could help.
> >> The only drawback is that you have to compile GATE from source.
> >>
> >> Most of my fixes are related to memory leaks, but actually most of them
> >> are ITK related, and I do not see any alfa/beta source specific
> >> modification. Anyway, you can try these patches, it will not harm. If
> you do
> >> so, please let us (the mailing list) know the result (helped or did
> not).
> >>
> >> Applying the patches is actually quite easy:
> >>
> >> First you have to download the patch files (see below), and uncompress
> >> them with gunzip.
> >>
> >> After that you have to do everything exactly like the GATE install
> manual
> >> says, except this part:
> >>
> >> - when you get a copy from the source:
> >> git clone http://git.opengatecollaboration.org/git/opengate-public.git
> >>
> >> - then you have to enter to the GATE source directory:
> >> cd opengate-public
> >>
> >> - and you have to apply the patches:
> >> git apply  cppfix_dvolgyes.patch geant4-geometry.patch interfile.patch
> >>
> >> (the actual filenames can contain path-parts, like
> >> ../patches/cppfix_dvolgyes.patch, it depends on your actual directory
> >> layout.)
> >>
> >> After that you should follow the manual. (cmake, compile, install, etc.)
> >>
> >> As a last hope without actually debugging the code, you can try
> different
> >> geant/root/gate/clhep versions,
> >> maybe it comes from a recently introduced or recently fixed bug. Of
> >> course, this takes a lot of time, and there is no guarantee for the
> success.
> >>
> >> (The original e-mail what contained the patches is quoted below my
> >> signature.)
> >>
> >> Good luck!
> >>
> >> Cheers,
> >>   David
> >>
> >> On Wed, Jun 18, 2014 at 10:54 AM, Patay Gergely <
> patay.gergely at mediso.hu>
> >> wrote:
> >> > Dear Gaters,
> >> >
> >> > here are a few patches against the upstream (ie. master branch) Gate
> >> > source
> >> > code. Since I am not a member of the collaboration, I cannot directly
> >> > commit
> >> > them into the git repository.
> >> >
> >> > The first patch was written by Dávid Völgyes (formerly at Mediso and
> at
> >> > COMPET). These are C++ bugfixes (unchecked ranges, memory
> corruptions).
> >> > [1]
> >> >
> >> >
> https://dl.dropboxusercontent.com/u/43097994/gate7/cppfix_dvolgyes.patch.gz
> >> >
> >> > The second patch contains Gate wrappers to all the missing Geant4
> solid
> >> > objects from
> >> >
> >> >
> http://geant4.web.cern.ch/geant4/UserDocumentation/UsersGuides/ForApplicationDeveloper/html/ch04.html
> >> > .
> >> > With this patch the following extra shapes will be available: cut
> tube,
> >> > elliptical cone, generic trapezoid, hyperbolic tube, parallelepiped,
> >> > paraboloid tube, tetrahedron, torus, twisted box, twisted trapezoid,
> >> > generic
> >> > twisted trapezoid and twisted tube segment.
> >> > [2]
> >> >
> >> >
> https://dl.dropboxusercontent.com/u/43097994/gate7/geant4-geometry.patch.gz
> >> >
> >> > The third patch is a heavy modification of the Interfile reader.
> Besides
> >> > some code cleaning and refactoring, it solves the following issues:
> >> > - if the key 'name of data file' is present in the header file then it
> >> > won't
> >> > guess the name
> >> > - the 'number of bytes per pixel' key (1,2,4,8...) is implemented
> >> > - the 'data offset in bytes' key is implemented
> >> > - the 'number format' key now accepts 'signed integer', 'unsigned
> >> > integer',
> >> > 'short float', 'long float' and (for convenience) 'float', as seen in
> >> > the
> >> > Interfile 3.3 standard.
> >> > The interfile reader thus accepts signed or unsigned 8, 16, 32 or 64
> bit
> >> > integer as well as 32 (float) or 64 bit (double) floating point data
> >> > from
> >> > little or big endian binary file.
> >> > [3]
> >> > https://dl.dropboxusercontent.com/u/43097994/gate7/interfile.patch.gz
> >> >
> >> > cheers,
> >> >  Gergely
> >> >
> >> > ---
> >> > Gergely Patay
> >> > physicist
> >> > Mediso Medical Imaging Systems Ltd.
> >> > Hungary
> >>
> >>
> >>
> >> On Tue, Sep 16, 2014 at 11:40 AM, JAN Sebastien <sebastien.jan at cea.fr>
> >> wrote:
> >>>
> >>>
> >>>
> >>> Hi Amy,
> >>>
> >>> As explained by Marc, this is a memory leak…probably du to the fact
> that
> >>> the energy of optical photons which are generated is out of the range
> >>> defined in the xml files (material & surface). Try to correct that
> point and
> >>> fell free to tell us if the problem is solved.
> >>>
> >>> Cheers
> >>>
> >>> Sebastien
> >>>
> >>>
> >>>
> >>>
> >>>
> >>> De : gate-users-bounces at lists.opengatecollaboration.org
> >>> [mailto:gate-users-bounces at lists.opengatecollaboration.org] De la
> part de
> >>> Marc Chamberland
> >>> Envoyé : lundi 15 septembre 2014 16:06
> >>> À : Amy Meldrum
> >>> Cc : Gate Users
> >>> Objet : Re: [Gate-users] Jobs killed "memory exceeded"?
> >>>
> >>>
> >>>
> >>> Hi Amy,
> >>>
> >>>
> >>>
> >>> Perhaps there is a memory leak? If there is, it's gonna be very
> annoying
> >>> for you to troubleshoot if you have no C++ experience.
> >>>
> >>>
> >>>
> >>> I'd suggest you look at using Valgrind to detect memory leaks. You can
> >>> find Valgrind here: http://valgrind.org
> >>>
> >>>
> >>>
> >>> The Quick Start page should help you run it. Feel free to post the
> output
> >>> to the mailing list or send it to me and I'll have a quick look.
> >>>
> >>>
> >>>
> >>> Good luck!
> >>>
> >>> Marc
> >>>
> >>>
> >>>
> >>>
> >>>
> >>>
> >>>
> >>> __________________________
> >>>
> >>>
> >>>
> >>> Marc Chamberland, MSc
> >>>
> >>> PhD candidate
> >>> Department of Physics
> >>> Carleton University
> >>> Ottawa (ON)
> >>>
> >>>
> >>>
> >>> On Sep 14, 2014, at 8:55, Amy Meldrum <ameldru at g.clemson.edu> wrote:
> >>>
> >>>
> >>>
> >>> Gate users,
> >>>
> >>>
> >>>
> >>> I have been running simulations using optical photons that run to
> >>> completion when I am using a beta source. However, when I change the
> source
> >>> to an alpha source, suddenly all of my simulations only run for a few
> >>> minutes before being killed. It seems like the memory usage skyrockets
> >>> beyond some limit and get killed.
> >>>
> >>>
> >>>
> >>> Why would changing only the source do this? Is there something I can do
> >>> to stop this from happening? The simulation runs fine for a few
> particles,
> >>> but I am not sure why it would behave like this.
> >>>
> >>>
> >>>
> >>>
> >>>
> >>> Please help. Thank you,
> >>>
> >>>
> >>>
> >>> Amy
> >>>
> >>> _______________________________________________
> >>> Gate-users mailing list
> >>> Gate-users at lists.opengatecollaboration.org
> >>> http://lists.opengatecollaboration.org/mailman/listinfo/gate-users
> >>>
> >>>
> >>>
> >>>
> >>> _______________________________________________
> >>> Gate-users mailing list
> >>> Gate-users at lists.opengatecollaboration.org
> >>> http://lists.opengatecollaboration.org/mailman/listinfo/gate-users
> >>
> >>
> >>
> >> _______________________________________________
> >> Gate-users mailing list
> >> Gate-users at lists.opengatecollaboration.org
> >> http://lists.opengatecollaboration.org/mailman/listinfo/gate-users
> >
> >
> >
> >
> > --
> > David Sarrut, Phd
> > Directeur de recherche CNRS
> > CREATIS, UMR CNRS 5220, Inserm U 1044
> > Centre de lutte contre le cancer Léon Bérard
> > 28 rue Laënnec, 69373 Lyon cedex 08
> > Tel : 04 78 78 51 51 / 06 74 72 05 42
> > http://www.creatis.insa-lyon.fr/~dsarrut
> > _________________________________
> >  "2 + 2 = 5,  for extremely large values of 2"
> > _________________________________
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.opengatecollaboration.org/mailman/private/gate-users/attachments/20140917/64346748/attachment-0001.html>


More information about the Gate-users mailing list