# ERROR in opening \*.h5 file

**URL:** <https://openmc.discourse.group/t/error-in-opening-h5-file/288>\
**Category:** User Support\
**Created:** [August 17, 2017, 6:59pm UTC](https://openmc.discourse.group/t/error-in-opening-h5-file/288 "2017-08-17T18:59:51Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![Ingrid](https://avatars.discourse-cdn.com/v4/letter/i/d9b06d/32.png) [@Ingrid](https://openmc.discourse.group/u/Ingrid)\
**Post date:** [August 17, 2017, 6:59pm UTC](https://openmc.discourse.group/t/error-in-opening-h5-file/288/1 "2017-08-17T18:59:51Z")

</div>

Hello!

I am modelling detailed reactor in openmc. But I am having some problems with simulations.

First I am having error when I want to get the tallys from .h5 file. The error is:

_Traceback (most recent call last):_

_File ˝test.py˝, line 3, in_

_sp = openmc.StatePoint(‘statepoint.2.h5’)_

_File ˝/usr/lib/python2.7/dist-packages/openmc/statepoint.py˝, line 143, in **init** _

_su = openmc.Summary(path\_summary)_

_File ˝/usr/lib/python2.7/dist-packages/openmc/summary.py˝, line 47, in **init** _

_self.\_read\_geometry()_

_File ˝/usr/lib/python2.7/dist-packages/openmc/summary.py˝, line 96, in \_read\_geometry_

_self.\_read\_cells()_

_File ˝/usr/lib/python2.7/dist-packages/openmc/summary.py˝, line 300, in \_read\_cells_

_region, {s.id: s for s in self.surfaces.values()})_

_File ˝/usr/lib/python2.7/dist-packages/openmc/region.py˝, line 121, in from\_expression_

_tokens.append(+surfaces[abs(j)])_

_KeyError: 1_

And the second problem is that when the simulation is running there appear warning: Particle (number of particle) underwent maximum number of events. I have a limited model with vacuum boundary conditions and the same problem was with reflective boundary conditions. With reflective boundary condition there was another problem that I was losing some particles which couldn’t be found after reflecting.

Has anyone already had a similar problem and can help me?

Best regards,

Ingrid Vavtar

---

<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:** [August 18, 2017, 11:09am UTC](https://openmc.discourse.group/t/error-in-opening-h5-file/288/2 "2017-08-18T11:09:40Z")

</div>

Hi Ingrid,

What version of OpenMC are you using, and how did you install it?

Best,  
Paul

---

<div class="post-metadata">

**Author:** ![Ingrid](https://avatars.discourse-cdn.com/v4/letter/i/d9b06d/32.png) [@Ingrid](https://openmc.discourse.group/u/Ingrid)\
**Post date:** [August 21, 2017, 8:42am UTC](https://openmc.discourse.group/t/error-in-opening-h5-file/288/3 "2017-08-21T08:42:36Z")

</div>

Hi Paul,

I am using OpenMC version 0.8.0 and I am runing it via virtual machine on »Ubuntu« (Release 16.04.2 LTS (Xenial Xerus) 64-bit, Kernel Linux 4.10.0-32-generic x86\_64, MATE 1.12.1). OpenMC was installed by default commands:

sudo apt-add-repository ppa:paulromano/staging

sudo apt-get update

sudo apt-get install openmc

Best regards,

Ingrid Vavtar

---

<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:** [August 24, 2017, 11:30am UTC](https://openmc.discourse.group/t/error-in-opening-h5-file/288/4 "2017-08-24T11:30:58Z")

</div>

Hi Ingrid,

A newer version of OpenMC should be available from the PPA. One thing you can do is to try updating your version and see if that fixes the problem. Note that some things [have changed](http://openmc.readthedocs.io/en/v0.9.0/releasenotes.html) in version 0.9.0.

Another thing you can try in your script is to not automatically link in geometry information when reading the statepoint. When you run:

sp = openmc.StatePoint(‘statepoint.2.h5’)

It will look also for a file named summary.h5 that contains information about your model and try to read that in too. If instead you run:

sp = openmc.StatePoint(‘statepoint.2.h5’, autolink=False)

it will not look for that summary file (which seems to be what’s causing problems based on the traceback.

Best,  
Paul

---

<div class="post-metadata">

**Author:** ![Ingrid](https://avatars.discourse-cdn.com/v4/letter/i/d9b06d/32.png) [@Ingrid](https://openmc.discourse.group/u/Ingrid)\
**Post date:** [September 30, 2017, 4:02pm UTC](https://openmc.discourse.group/t/error-in-opening-h5-file/288/5 "2017-09-30T16:02:07Z")

</div>

Hello Paul,

Thank you for your recommendations. After reviewing my code I also found an overlapping where I used a quadratic function. After implementing improvements and removing overlapping my code worked.

Best regards,

Ingrid Vavtar

Dne četrtek, 24. avgust 2017 13.31.01 UTC+2 je oseba Paul Romano napisala:
