Question about running depletion in parallel

Hi all,
I am running a simulation of depletion. In the depletion calculation of OpenMC, 4 threads are used by default, but this does not meet my calculation needs. So I would like to ask if there is a way to specify in the Python scripts the number of threads used by the computation? Any suggesstions would be appreciated.

Regards,
Zhiying

Hi,
Maybe it is what you need:
https://docs.openmc.org/en/stable/usersguide/scripts.html
Hope it help!


Zhuangli

Thank you for your reply. In my calculation, the burnup simulation is controlled via python scripts. Therefore, I cannot control the parallel execution of the program through the command line. By the way, openmc on my computer was installed using conda. So I can’t use mpi4py to achieve multi-threaded or multi-core parallel computing. Thanks again for your advice, maybe I need to reinstall openmc from the source.

I use C++ to control my openmc run, so my command line is like:

system(openmc -s <number of threads>)

Guys should have a wonderful answer for your question.
With regards.


Zhuangli

Right now there is no way to specify the number of OpenMP threads directly using the Operator or Integrator classes. However, you can set the OMP_NUM_THREADS environment variable, which will be used by OpenMC.

1 Like

Thank you so much for your suggestion.