My simulation on geant4 uses a lot of memory (RAM) how can I reduce the quantity

Hello

my simulation on geant4 uses a lot of memory (RAM) how can I reduce the quantity ??

The first thing to do would be to profile the application to find out where the major memory consumption is, or if there are memory leaks. Various tools exist on all platforms to do these tasks, so the choice will depend on whether Linux, macOS or Windows is being used.

How much memory is actually being used though, and do you have a limit on the amount the application can/is allowed to use?

1 Like

Thank you sure

How can i do that ? I use linux 18.

For memory i have 16gb ram ddr4 and 200gb as swap space.

Probably the best tool to start with is valgrind purely to track down memory leaks - which might be the cause of issues if you’re observing the memory increasing continually during the application lifetime. That may already be installed, or should have packages on all common Linux distributions - see its page to see how to use it (this is not something we can cover here). Searching for “linux memory profiling tools” will bring up others that may or may not be useful to your use case.