OpenMC "stalls" when running 2e9 or more particles

Hi,

I’m writing to help debug a problem I’ve been having to figure out if it a code limitation or a hardware one. Currently if I run OpenMC via the PythonAPI with 2e9 or more particles, it stalls when it reaches the part where it allocates the banks. If left long enough it crashes out right. I haven’t seen any errors either as it crashes the terminal window I’m running it in. Is this a limitation of OpenMC or a problem caused by something else?

I’ve included my as an attachment so you can see what I’m doing.

Thanks,
Matt

PythonCode.py (10.6 KB)

Hi Matt,

This is most likely due to insufficient memory on your machine. OpenMC will fill a source particle bank with as many sites as you request for Settings.particles. If I’m doing my calculations right, the size of the Particle bank struct is 72 bytes, so with 2e9 particles you’d need 144 GB of memory. To reduce the memory usage, you can reduce the number of particles and increase the number of batches (by the same factor).

Best,
Paul