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