# Restart of Depletion calculation

**URL:** <https://openmc.discourse.group/t/restart-of-depletion-calculation/818>\
**Category:** User Support\
**Created:** [October 19, 2020, 8:30am UTC](https://openmc.discourse.group/t/restart-of-depletion-calculation/818 "2020-10-19T08:30:54Z")\
**Posts on this page:** 8\
**Page:** 1

<div class="post-metadata">

**Author:** ![zhaozelong](https://yyz2.discourse-cdn.com/free1/user_avatar/openmc.discourse.group/zhaozelong/32/1385_2.png) [@zhaozelong](https://openmc.discourse.group/u/zhaozelong)\
**Post date:** [October 19, 2020, 8:30am UTC](https://openmc.discourse.group/t/restart-of-depletion-calculation/818/1 "2020-10-19T08:30:54Z")

</div>

Hi all,  
When I use the “restart\_depletion.py” script, an error message occur. Detailed message in the terminal is as follows:

$ python ./restart\_depletion.py  
Traceback (most recent call last):  
File “./restart\_depletion.py”, line 44, in   
op = openmc.deplete.Operator(geometry, settings, chain\_file, previous\_results)  
File “/media/zhaozelong/CODE/home/mc-code/openmc-0.12.0/openmc/deplete/operator.py”, line 230, in **init**  
prev\_results[-1].transfer\_volumes(geometry)  
AttributeError: ‘str’ object has no attribute ‘transfer\_volumes’

---

<div class="post-metadata">

**Author:** ![Pranto](https://yyz2.discourse-cdn.com/free1/user_avatar/openmc.discourse.group/pranto/32/489_2.png) [@Pranto](https://openmc.discourse.group/u/Pranto)\
**Post date:** [October 19, 2020, 1:23pm UTC](https://openmc.discourse.group/t/restart-of-depletion-calculation/818/2 "2020-10-19T13:23:09Z")

</div>

@zhaozelong, welcome to the forum.

Use `ResultList.from_hdf5`

```python
prev_results = openmc.deplete.ResultsList.from_hdf5("depletion_results.h5")

```

---

<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, 2020, 2:12pm UTC](https://openmc.discourse.group/t/restart-of-depletion-calculation/818/3 "2020-10-19T14:12:51Z")

</div>

@Pranto do you want to submit a pull request fixing that script?

---

<div class="post-metadata">

**Author:** ![Pranto](https://yyz2.discourse-cdn.com/free1/user_avatar/openmc.discourse.group/pranto/32/489_2.png) [@Pranto](https://openmc.discourse.group/u/Pranto)\
**Post date:** [October 19, 2020, 2:35pm UTC](https://openmc.discourse.group/t/restart-of-depletion-calculation/818/4 "2020-10-19T14:35:58Z")

</div>

@gridley already fixed this issue [(tiny) Fix depletion restart example](https://github.com/openmc-dev/openmc/pull/1686).

---

<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, 2020, 4:10pm UTC](https://openmc.discourse.group/t/restart-of-depletion-calculation/818/5 "2020-10-19T16:10:57Z")

</div>

Ah, you’re right! Nevermind then 😄

---

<div class="post-metadata">

**Author:** ![zhaozelong](https://yyz2.discourse-cdn.com/free1/user_avatar/openmc.discourse.group/zhaozelong/32/1385_2.png) [@zhaozelong](https://openmc.discourse.group/u/zhaozelong)\
**Post date:** [October 20, 2020, 1:50am UTC](https://openmc.discourse.group/t/restart-of-depletion-calculation/818/6 "2020-10-20T01:50:12Z")

</div>

thanks so much @Pranto @paulromano it works well when the previous depletion results are loaded using from\_hdf5 function and the restart simualtion can be continued.

---

<div class="post-metadata">

**Author:** ![Javier\_Gonzalez](https://yyz2.discourse-cdn.com/free1/user_avatar/openmc.discourse.group/javier_gonzalez/32/1095_2.png) [@Javier\_Gonzalez](https://openmc.discourse.group/u/Javier_Gonzalez)\
**Post date:** [March 29, 2021, 2:34am UTC](https://openmc.discourse.group/t/restart-of-depletion-calculation/818/7 "2021-03-29T02:34:25Z")

</div>

Hi All,

Please, is there an example showing how to restart a depletion analysis? If so, where I can find it?

Thanks,  
Javier

---

<div class="post-metadata">

**Author:** ![Javier\_Gonzalez](https://yyz2.discourse-cdn.com/free1/user_avatar/openmc.discourse.group/javier_gonzalez/32/1095_2.png) [@Javier\_Gonzalez](https://openmc.discourse.group/u/Javier_Gonzalez)\
**Post date:** [March 29, 2021, 1:21pm UTC](https://openmc.discourse.group/t/restart-of-depletion-calculation/818/8 "2021-03-29T13:21:23Z")

</div>

Hi everyone.

I believe I found the example [here](https://github.com/openmc-dev/openmc/tree/develop/examples/pincell_depletion).

Thanks,  
Javier
