# Calculation efficiency

**URL:** <https://openmc.discourse.group/t/calculation-efficiency/891>\
**Category:** User Support\
**Created:** [December 13, 2020, 3:29pm UTC](https://openmc.discourse.group/t/calculation-efficiency/891 "2020-12-13T15:29:04Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![YimingZ](https://avatars.discourse-cdn.com/v4/letter/y/f19dbf/32.png) [@YimingZ](https://openmc.discourse.group/u/YimingZ)\
**Post date:** [December 13, 2020, 3:29pm UTC](https://openmc.discourse.group/t/calculation-efficiency/891/1 "2020-12-13T15:29:04Z")

</div>

Hi Guys,

I’m running a depletion calculation of a small PWR with 330 MWth on the University High performance computing cluster. Usually, for each calculation, I require 40 core and memory per CPU as 4096 MB. However, the output file present the calculation rate (inactive) = 1261.07 particles/second, calculation Rate (active) = 644.439 particles/second. On my laptop, the calculation Rate (inactive) = 30976.0 particles/second and calculation Rate (active) = 30298.8 particles/second. The calculation rates on HPC are lower than that on my laptop.

Does anyone know what’s going on? And how to accelerate the calculation? I tried to call the OpenMPI with calculation but that lead to the ‘bus error’ many times. Therefore, I think I should try to extend OpenMP threads, but how to set the number of thread?

Thanks,  
Yiming

---

<div class="post-metadata">

**Author:** ![paulromano](https://yyz2.discourse-cdn.com/free1/user_avatar/openmc.discourse.group/paulromano/32/486_2.png) [@paulromano](https://openmc.discourse.group/u/paulromano)\
**Post date:** [December 17, 2020, 12:44pm UTC](https://openmc.discourse.group/t/calculation-efficiency/891/2 "2020-12-17T12:44:18Z")

</div>

@YimingZ I’d suggest reading through the user’s manual section on [running in parallel](https://docs.openmc.org/en/latest/usersguide/parallel.html#running-in-parallel). If you’re running from the Python API, you can set the number of threads with:

```auto
openmc.run(threads=...)

```

From the command line, you can use the `-s` command-line argument. However, note that the default behavior is to use OpenMP and to use as many threads as there are cores available on a system.
