# Continue-run

**URL:** <https://openmc.discourse.group/t/continue-run/498>\
**Category:** User Support\
**Created:** [October 17, 2019, 1:32am UTC](https://openmc.discourse.group/t/continue-run/498 "2019-10-17T01:32:33Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![Kristina\_Zhang](https://avatars.discourse-cdn.com/v4/letter/k/2acd7d/32.png) [@Kristina\_Zhang](https://openmc.discourse.group/u/Kristina_Zhang)\
**Post date:** [October 17, 2019, 1:32am UTC](https://openmc.discourse.group/t/continue-run/498/1 "2019-10-17T01:32:33Z")

</div>

Dear All,

Regarding time complexity of OpenMC, I want to know if OpenMC has capability like MCNP where we can continue the run at a later stage?

Thanks,  
Kristina

---

<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:** [October 19, 2019, 10:13am UTC](https://openmc.discourse.group/t/continue-run/498/2 "2019-10-19T10:13:09Z")

</div>

Hi Kristina,

Yes, if you are running from the command-line, you can supply a -r argument that specifies a statepoint file to be used to restart the simulation. If you are using the Python API to execute openmc, you can use the restart\_file argument of the [openmc.run](https://docs.openmc.org/en/latest/pythonapi/generated/openmc.run.html#openmc.run) function. When you are restarting a simulation, you can change the number of batches in settings.xml so that the run will continue longer than it originally was.

Best regards,  
Paul

---

<div class="post-metadata">

**Author:** ![kingyue](https://yyz2.discourse-cdn.com/free1/user_avatar/openmc.discourse.group/kingyue/32/507_2.png) [@kingyue](https://openmc.discourse.group/u/kingyue)\
**Post date:** [November 12, 2020, 6:13am UTC](https://openmc.discourse.group/t/continue-run/498/3 "2020-11-12T06:13:19Z")

</div>

Hi Paul,  
Is it possible to modify settings or tallies in a re-run? I want to take advantage of the source of which the distribution has already converged.

---

<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:** [November 17, 2020, 8:36pm UTC](https://openmc.discourse.group/t/continue-run/498/4 "2020-11-17T20:36:42Z")

</div>

@kingyue There are a limited set of things you can change for a restart run, and unfortunately they are not well documented/tested. I believe most settings can be changed for a restart run, but it is not possible to change tallies because OpenMC will look for the previous results from the statepoint file you are loading. You can however start a new simulation using the source from a previous simulation as the starting source:

```auto
settings = openmc.Settings()
settings.source = openmc.Source(filename=<previous statepoint>)

```

---

<div class="post-metadata">

**Author:** ![kingyue](https://yyz2.discourse-cdn.com/free1/user_avatar/openmc.discourse.group/kingyue/32/507_2.png) [@kingyue](https://openmc.discourse.group/u/kingyue)\
**Post date:** [February 6, 2023, 6:39am UTC](https://openmc.discourse.group/t/continue-run/498/5 "2023-02-06T06:39:06Z")

</div>

@paulromano does `openmc.Source(filename=<previous statepoint>)` include photon?

I want to obtain neutron and photon source in core from an eigenvalue calculation, and then tally the current of neutron and photon on the outer surface of the reactor with fixed-source calculation.

If not possible, are there any recommended ways to make such a shielding calculation?  
As the number of photons finally escaping the reactor is very small, it seems that runing a single eigenvalue calculation with large number of batches or particles cannot reduce the variance effectively.

---

<div class="post-metadata">

**Author:** ![abc](https://avatars.discourse-cdn.com/v4/letter/a/2bfe46/32.png) [@abc](https://openmc.discourse.group/u/abc)\
**Post date:** [February 15, 2023, 3:42pm UTC](https://openmc.discourse.group/t/continue-run/498/6 "2023-02-15T15:42:00Z")

</div>

I am also interested in this problem, may I ask if there is a better solution now?@paulromano@kingyue
