# Using thermal scattering 'c\_D\_in\_D2O' provokes segmentation fault error

**URL:** <https://openmc.discourse.group/t/using-thermal-scattering-c-d-in-d2o-provokes-segmentation-fault-error/415>\
**Category:** User Support\
**Created:** [March 22, 2019, 10:45pm UTC](https://openmc.discourse.group/t/using-thermal-scattering-c-d-in-d2o-provokes-segmentation-fault-error/415 "2019-03-22T22:45:17Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![Julien](https://yyz2.discourse-cdn.com/free1/user_avatar/openmc.discourse.group/julien/32/1082_2.png) [@Julien](https://openmc.discourse.group/u/Julien)\
**Post date:** [March 22, 2019, 10:45pm UTC](https://openmc.discourse.group/t/using-thermal-scattering-c-d-in-d2o-provokes-segmentation-fault-error/415/1 "2019-03-22T22:45:17Z")

</div>

Hi all,

I am running a model with heavy water. When I add thermal scattering for deuterium in the D2O, the simulation crashes and produce a segmentation fault. The error messages I receive can vary. This is one of the message I receive:

Program received signal SIGSEGV: Segmentation fault - invalid memory reference.

Backtrace for this error:

---

<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:** [March 24, 2019, 8:23pm UTC](https://openmc.discourse.group/t/using-thermal-scattering-c-d-in-d2o-provokes-segmentation-fault-error/415/2 "2019-03-24T20:23:52Z")

</div>

Hi Julien,

A few questions for you:

- What version of OpenMC are you running and how did you install it?
- What library are you using and how was it produced?

Also, note that we do have a short section in the user’s guide on handling [segmentation faults](https://openmc.readthedocs.io/en/latest/usersguide/troubleshoot.html#segmentation-fault). If you recompile OpenMC with debug flags on, you should be able to get a traceback that gives us more information on what’s going wrong.

Best,  
Paul

---

<div class="post-metadata">

**Author:** ![Julien](https://yyz2.discourse-cdn.com/free1/user_avatar/openmc.discourse.group/julien/32/1082_2.png) [@Julien](https://openmc.discourse.group/u/Julien)\
**Post date:** [March 25, 2019, 4:02pm UTC](https://openmc.discourse.group/t/using-thermal-scattering-c-d-in-d2o-provokes-segmentation-fault-error/415/3 "2019-03-25T16:02:30Z")

</div>

Hi Paul,

I use use version 0.10.0.  
I use jeff3.2 and it was downloaded and converted by the script openmc-get-jeff-data.

I have recompiled OpenMC (with MPI) and HDF5.

However, it would still crash when using c\_D\_in\_D2O.

Now, c\_D\_in\_D2O was just positioned after the c\_H\_in\_H2O in my material.xml. When I put it before c\_H\_in\_H2O or when I just delete the c\_H\_in\_H2O from the xml file, there are no segmentation fault anymore. There are almost no H2O compared to D2O in my moderator so I am fine with that fix for now.

Could you try reproduce this error and see if you also have the same problem?

Thanks a lot.

Julien

---

<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:** [March 26, 2019, 12:43pm UTC](https://openmc.discourse.group/t/using-thermal-scattering-c-d-in-d2o-provokes-segmentation-fault-error/415/4 "2019-03-26T12:43:00Z")

</div>

Hi Julien,

Since the last release, a bug has been identified when using multiple S(a,b) tables (described a little bit in the last bullet point [here](https://github.com/openmc-dev/openmc/pull/1152)). If you need to use multiple S(a,b) tables, I would recommend reinstalling OpenMC using the latest “develop” branch which already has a fix for this issue. If you do decide to update, you can find pregenerated data libraries (including JEFF 3.2) [here](https://openmc.mcs.anl.gov/).

Best,  
Paul
