Fuzzy Logic

Because things aren't confusing enough…

Thursday, July 22, 2010

Geant4 and the bad_alloc() error

I was having some problems running large simulations (500k+ particles) in Geant4. Every once in a while I would get a std::bad_alloc() error. A reboot seemed to fix it but I didn’t understand WHY this would be a problem. Anyhow, I found this post which seems to be onto a possible solution. Simply increasing the memory your shell has access to seems to fix this memory error. We’ll see….

whereas increasing the stack size by using the command
ulimit -s 900000
allowed the program to run apparently without a crash:

EDIT: Nevermind, I had created a bomb. Oops.

posted by Jason Young at 6:22 pm  

Powered by WordPress