[Gate-users] Geometry causes simulation run to abort

Jasper C jaspercwork at gmail.com
Tue Nov 29 03:42:46 CET 2011


Hello Didier, Hermann,

Thank you for your replies, and sorry to be slow to reply, but I've
been running a long simulation and haven't been able to test this
further till now.

I tracked the memory usage, and with the "faulty" geometry, Ubuntu's
System Monitor shows that the memory usage ramps at a constant rate to
3.1 GB at which point the simulation aborts.  This takes less than 5
minutes.

I'm running the same simulation now with the "fixed" geometry, and
after 10 minutes the memory usage is holding at about 415 MB.

I've also used the "fixed" geometry for some simulation runs - 90s of
simulation time which takes about 72 hrs of real time.  Those runs
completed successfully, though I did not remember to check the memory
usage.

> Especially with high resolution output, memory can run out pretty fast.

How do we change the resolution of the output?  Is this in terms of
time or geometry?

Thanks and best regards,

Jasper





On 23 November 2011 23:12, Hermann Fuchs <hermann.fuchs at meduniwien.ac.at> wrote:
> Hello
>
> Have you checked your memory consumtion?
> Especially with high resolution output, memory can run out pretty fast.
> Bad_alloc could also mean that there is no more memory to use...
>
>
> Cheers,
> Hermann
> On Fri, 2011-11-18 at 09:51 +0800, Jasper C wrote:
>> Hello all,
>>
>> I've been trying to run simulations with a line source phantom,
>> consisting of a glass tube filled with water.  My F18 source is
>> modeled as a cylinder the same size as the water.
>>
>> My simulation will abort (GATE will crash) within 10 minutes, with the
>> following error message:
>>
>> --------------------------------------------------
>> terminate called after throwing an instance of 'std::bad_alloc'
>>   what():  std::bad_alloc
>> Aborted
>> --------------------------------------------------
>>
>> I have been able to track this down to my use of a cylindrical
>> phantom.  My code is as follows:
>>
>> --------------------------------------------------
>> #     Phantom body
>>
>> /gate/world/daughters/name                    phntmBody
>> /gate/world/daughters/insert                  cylinder
>> /gate/phntmBody/placement/setTranslation      10.0 0.0 0.0 mm
>> /gate/phntmBody/geometry/setRmax              0.9 mm
>> /gate/phntmBody/geometry/setRmin              0.5 mm
>> /gate/phntmBody/geometry/setHeight            128.0 mm
>> /gate/phntmBody/setMaterial                   Glass
>> /gate/phntmBody/vis/forceWireframe
>> /gate/phntmBody/vis/setColor          yellow
>> /gate/phntmBody/vis/setVisible                1
>>
>> #     Radioactive media in body
>>
>> /gate/phntmBody/daughters/name                phntmMedia
>> /gate/phntmBody/daughters/insert              cylinder
>> /gate/phntmMedia/placement/setTranslation     0.0 0.0 0.0 mm
>> /gate/phntmMedia/geometry/setRmax             0.5 mm
>> /gate/phntmMedia/geometry/setRmin             0.0 mm
>> /gate/phntmMedia/geometry/setHeight           128.0 mm
>> /gate/phntmMedia/setMaterial          Water
>> /gate/phntmMedia/vis/forceSolid
>> /gate/phntmMedia/vis/setColor         red
>> /gate/phntmMedia/vis/setVisible               1
>>
>>
>> /gate/phntmBody/attachPhantomSD
>> /gate/phntmMedia/attachPhantomSD
>> --------------------------------------------------
>>
>> What I have found is that having the Rmax of the inner cylinder set
>> equal to the Rmin of the outer cylinder causes this crash.  If I set
>> the outer Rmin to be slightly larger than the inner Rmax the
>> simulation will run fine, ie:
>>
>> --------------------------------------------------
>> /gate/phntmBody/geometry/setRmin              0.5001 mm
>> /gate/phntmMedia/geometry/setRmax             0.5 mm
>> --------------------------------------------------
>>
>> or
>>
>> --------------------------------------------------
>> /gate/phntmBody/geometry/setRmin              0.5 mm
>> /gate/phntmMedia/geometry/setRmax             0.4999 mm
>> --------------------------------------------------
>>
>> My question is is this a bug in the implementation of the geometry, or
>> is the correct way of implementing such things to leave a tiny gap in
>> between the two objects?
>>
>> Curiously, I have not seen this problem with my previous phantom,
>> which was a solid sphere of sodium defined in (as a daughter of) a
>> solid cube of plastic.
>>
>> Thanks and best regards,
>>
>> Jasper
>> _______________________________________________
>> Gate-users mailing list
>> Gate-users at lists.opengatecollaboration.org
>> http://lists.opengatecollaboration.org/mailman/listinfo/gate-users
>>
>
> --
> -------------
> DI Hermann Fuchs
> Div. Medical Radiation Physics
> Department of Radiotherapy
> Med. Univ. Vienna / AKH Vienna
> Währinger Gürtel 18-20
> A-1090 Wien
>
> Tel.  + 43 / 1 / 40 400 7271
> Mail. hermann.fuchs at meduniwien.ac.at
>
>


More information about the Gate-users mailing list