# Testing burnups(run\_depletion.py) example in development mode

**URL:** <https://openmc.discourse.group/t/testing-burnups-run-depletion-py-example-in-development-mode/442>\
**Category:** User Support\
**Created:** [May 21, 2019, 1:24pm UTC](https://openmc.discourse.group/t/testing-burnups-run-depletion-py-example-in-development-mode/442 "2019-05-21T13:24:25Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![shabudarda](https://yyz2.discourse-cdn.com/free1/user_avatar/openmc.discourse.group/shabudarda/32/497_2.png) [@shabudarda](https://openmc.discourse.group/u/shabudarda)\
**Post date:** [May 21, 2019, 1:24pm UTC](https://openmc.discourse.group/t/testing-burnups-run-depletion-py-example-in-development-mode/442/1 "2019-05-21T13:24:25Z")

</div>

Hello,

Hello, As Dr. Paul said openmc development version support the depletion example in the guihub (pincell depletion)[https://github.com/openmc-dev/openmc/blob/develop/examples/python/pincell\_depletion/run\_depletion.py](https://github.com/openmc-dev/openmc/blob/develop/examples/python/pincell_depletion/run_depletion.py). I was trying to test the example myself. I have python installed as miniconda. So far to get the development branch of openmc I run the below commands:

```auto
git clone [https://github.com/mit-crpg/openmc.git](https://github.com/mit-crpg/openmc.git)
cd openmc
mkdir build && cd build
cmake ..
cmake -DCMAKE_INSTALL_PREFIX=$HOME/.local ..
make
sudo make install

```

```auto

```

```auto
Now, I have a openmc folder in my home directory. inside it i have the example and If I go into the examples of depletion and run "python run_depletion.py" i see the error there is no module openmc.deplete. I tried putting the run_depletion.py file in the build folder of openmc and tried running there. still the same issue. 

```

```auto

```

```auto
Than, I see I have to have to do the for development mode.

```

```auto

```

```auto
pip install -e .[test]

```

```auto

```

```auto

```

```auto
After, doing that I tried putting the run_depletion.py file in the build folder and again tried running there. Now, the interesting thing is the error changed to this 

```

```auto

```

```auto
Traceback (most recent call last):

```

```auto
  File "run_depletion.py", line 132, in <module>

```

```auto
    op = openmc.deplete.Operator(geometry, settings_file, chain_file)

```

```auto
  File "/home/gate/openmc/openmc/deplete/operator.py", line 113, in __init__

```

```auto
    super(). __init__ (chain_file)

```

```auto
  File "/home/gate/openmc/openmc/deplete/abc.py", line 67, in __init__

```

```auto
    self.chain = Chain.from_xml(chain_file)

```

```auto
  File "/home/gate/openmc/openmc/deplete/chain.py", line 326, in from_xml

```

```auto
    root = ET.parse(str(filename))

```

```auto
  File "src/lxml/etree.pyx", line 3435, in lxml.etree.parse

```

```auto
  File "src/lxml/parser.pxi", line 1840, in lxml.etree._parseDocument

```

```auto
  File "src/lxml/parser.pxi", line 1866, in lxml.etree._parseDocumentFromURL

```

```auto
  File "src/lxml/parser.pxi", line 1770, in lxml.etree._parseDocFromFile

```

```auto
  File "src/lxml/parser.pxi", line 1163, in lxml.etree._BaseParser._parseDocFromFile

```

```auto
  File "src/lxml/parser.pxi", line 601, in lxml.etree._ParserContext._handleParseResultDoc

```

```auto
  File "src/lxml/parser.pxi", line 711, in lxml.etree._handleParseResult

```

```auto
  File "src/lxml/parser.pxi", line 638, in lxml.etree._raiseParseError

```

```auto
OSError: Error reading file './chain_simple.xml': failed to load external entity "./chain_simple.xml"

```

```auto

```

```auto
What am I missing here?

```

```auto

```

```auto
Dr, can you please guide me how I can try out the depletion example (run_depletion.py) in development branch of openmc. Can you please guide me how I can test the depeltion example of openmc in development branch? An chronological steps to follow guide for testing this will be much helpful. Thanks.

```

---

<div class="post-metadata">

**Author:** ![shabudarda](https://yyz2.discourse-cdn.com/free1/user_avatar/openmc.discourse.group/shabudarda/32/497_2.png) [@shabudarda](https://openmc.discourse.group/u/shabudarda)\
**Post date:** [May 21, 2019, 11:36pm UTC](https://openmc.discourse.group/t/testing-burnups-run-depletion-py-example-in-development-mode/442/2 "2019-05-21T23:36:41Z")

</div>

Hello, So, now, I have a different issue. I go into the openmc/examples/python/pincell\_depletion/ folder and tried running python run\_depletion.py. I see this error.

ERROR: HDF5 data format uses version 1.0 whereas your installation of OpenMC  
expects version 2.x data.

Now, where can I get the 2.x version of cross section library? I have the cross section library by “openmc-get-nndc-data” command.

---

<div class="post-metadata">

**Author:** ![pshriwise](https://yyz2.discourse-cdn.com/free1/user_avatar/openmc.discourse.group/pshriwise/32/3863_2.png) [@pshriwise](https://openmc.discourse.group/u/pshriwise)\
**Post date:** [May 22, 2019, 12:33am UTC](https://openmc.discourse.group/t/testing-burnups-run-depletion-py-example-in-development-mode/442/3 "2019-05-22T00:33:14Z")

</div>

Hi Sharif,

Probably the easiest way to get an updated version of the data is using the _download-xs.sh_ script found in _/tools/ci/_ in the OpenMC repo.

This script will place the new data in a folder named _nndc\_hdf5_ in your $HOME directory.

After updating your OPENMC\_CROSS\_SECTIONS environment variable to the new _cross\_sections.xml_ , this error should go away.

Cheers,
