# Segmentation Error

**URL:** <https://openmc.discourse.group/t/segmentation-error/5736>\
**Category:** User Support\
**Created:** [August 5, 2025, 7:49am UTC](https://openmc.discourse.group/t/segmentation-error/5736 "2025-08-05T07:49:12Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![buk](https://avatars.discourse-cdn.com/v4/letter/b/54ee81/32.png) [@buk](https://openmc.discourse.group/u/buk)\
**Post date:** [August 5, 2025, 7:49am UTC](https://openmc.discourse.group/t/segmentation-error/5736/1 "2025-08-05T07:49:12Z")

</div>

While im trying to run a homogeneous geometry which should read the mgxs file that i created with the same geometry with using ENDFB.VIII library i get the error _Segmentation fault (core dumped)._

I tried everything, i checked the directories in my mgxs file which looks fine: _HDF5 “mgxs.h5” {  
FILE\_CONTENTS {  
group /  
group /H1  
group /H1/294K  
dataset /H1/294K/absorption  
group /H1/294K/scatter\_data  
dataset /H1/294K/scatter\_data/g\_max  
dataset /H1/294K/scatter\_data/g\_min  
dataset /H1/294K/scatter\_data/scatter\_matrix  
dataset /H1/294K/total  
group /H1/kTs  
dataset /H1/kTs/294K  
group /O16  
group /O16/294K  
dataset /O16/294K/absorption  
group /O16/294K/scatter\_data  
dataset /O16/294K/scatter\_data/g\_max  
dataset /O16/294K/scatter\_data/g\_min  
dataset /O16/294K/scatter\_data/scatter\_matrix  
dataset /O16/294K/total  
group /O16/kTs  
dataset /O16/kTs/294K  
group /U235  
group /U235/294K  
dataset /U235/294K/absorption  
dataset /U235/294K/chi  
dataset /U235/294K/fission  
dataset /U235/294K/nu-fission  
group /U235/294K/scatter\_data  
dataset /U235/294K/scatter\_data/g\_max  
dataset /U235/294K/scatter\_data/g\_min  
dataset /U235/294K/scatter\_data/scatter\_matrix  
dataset /U235/294K/total  
group /U235/kTs  
dataset /U235/kTs/294K  
group /U238  
group /U238/294K  
dataset /U238/294K/absorption  
dataset /U238/294K/chi  
dataset /U238/294K/fission  
dataset /U238/294K/nu-fission  
group /U238/294K/scatter\_data  
dataset /U238/294K/scatter\_data/g\_max  
dataset /U238/294K/scatter\_data/g\_min  
dataset /U238/294K/scatter\_data/scatter\_matrix  
dataset /U238/294K/total  
group /U238/kTs  
dataset /U238/kTs/294K  
group /Zr90  
group /Zr90/294K  
dataset /Zr90/294K/absorption  
group /Zr90/294K/scatter\_data  
dataset /Zr90/294K/scatter\_data/g\_max  
dataset /Zr90/294K/scatter\_data/g\_min  
dataset /Zr90/294K/scatter\_data/scatter\_matrix  
dataset /Zr90/294K/total  
group /Zr90/kTs  
dataset /Zr90/kTs/294K  
}  
}_

i checked the geometry which im trying to run

_pin\_surf = openmc.ZCylinder(r=0.63)  
outside = openmc.Sphere(r=10.0, boundary\_type=‘reflective’)  
bottom = openmc.ZPlane(z0=-1.0, boundary\_type=‘reflective’)  
top = openmc.ZPlane(z0=1.0, boundary\_type=‘reflective’)  
region = -pin\_surf & -outside & +bottom & -top_

_cell = openmc.Cell(name=‘homojen\_pincell’, fill=fuel, region=region)  
universe = openmc.Universe(cells=[cell])  
geometry = openmc.Geometry(universe)  
geometry.export\_to\_xml()_

everything looks fine i really cant understand the problem can someone please help me

---

<div class="post-metadata">

**Author:** ![Jarret](https://yyz2.discourse-cdn.com/free1/user_avatar/openmc.discourse.group/jarret/32/4075_2.png) [@Jarret](https://openmc.discourse.group/u/Jarret)\
**Post date:** [August 5, 2025, 10:00pm UTC](https://openmc.discourse.group/t/segmentation-error/5736/2 "2025-08-05T22:00:26Z")

</div>

Hi Buk,

This shouldn’t have anything to do with your geometry/materials/settings, as errors in this are usually checked for and would give you an exact cause (unless it’s something really unique that the devs would like to know about) I would check out the following link,

> **[18. Troubleshooting — OpenMC Documentation](https://docs.openmc.org/en/v0.12.0/usersguide/troubleshoot.html)**

15.2.1 covers segmentation faults. I would complete this first and see if its an issue you can fix, and also compare it to the other links I posted to see if its the same issue.

I would also check these following posts, through the second one gets pretty technical.

> [@Segmentation fault (core dumped)](https://openmc.discourse.group/t/segmentation-fault-core-dumped/4521):
>
> Hi, all, When settings.inactive = 20 settings.batches = 60 settings.particles = 1000 there is no fault desplayed. when I improved the batches up to 100, it shows segmentation fault (core dumped), then I followed the munual, build-debug, the problem still exists. Any advice? thanks!

> [@Segmentation fault on simple model after many particles](https://openmc.discourse.group/t/segmentation-fault-on-simple-model-after-many-particles/3250/9):
>
> Bor, when I was dealing with this problem I did the same at certain point (see my post of 5th August): however, in my opinion this solution could just hide the real problem which is (in my opinion) the one described above. Moreover, this solution can create issues [here](https://github.com/openmc-dev/openmc/blob/cd13d3471da30213bf68b91739994b73bb07cb90/src/simulation.cpp#L740C34-L740C55): if (p.collision\_distance() \> p.boundary().distance) { p.event\_cross\_surface(); } else { p.event\_collide(); } p.collision\_distance() can be INFINITY (see [here](https://github.com/openmc-dev/openmc/blob/cd13d3471da30213bf68b91739994b73bb07cb90/src/particle.cpp#L197)) and if both are INFINITY the “if” statement would fail. Indee…

---

<div class="post-metadata">

**Author:** ![buk](https://avatars.discourse-cdn.com/v4/letter/b/54ee81/32.png) [@buk](https://openmc.discourse.group/u/buk)\
**Post date:** [August 7, 2025, 7:06am UTC](https://openmc.discourse.group/t/segmentation-error/5736/3 "2025-08-07T07:06:23Z")

</div>

Hi Jarret thank you for your reply. I checked the 2 other discussions you quoted before but my problem is different than both of them. I would also like to ask if the segmentation fault troubleshooting part should take a really long time to give me an answer or not? Because I followed the commands written there but the output I expected didn’t come out. I only could see few lines of the expected output after waiting for like half an hour. Is it normal to face this problem with debug command?

I’m pretty new to OpenMC and I’m trying to learn it all by myself. That’s why I’m asking this kind of question.

Thank you for your interest again.

Have a good day!😊

---

<div class="post-metadata">

**Author:** ![EthanG](https://avatars.discourse-cdn.com/v4/letter/e/f05b48/32.png) [@EthanG](https://openmc.discourse.group/u/EthanG)\
**Post date:** [August 8, 2025, 2:40am UTC](https://openmc.discourse.group/t/segmentation-error/5736/4 "2025-08-08T02:40:56Z")

</div>

Hello,  
I have recently had a similar issue with my new desktop computer. However, I figured out the source of this Segmentation Fault “core dump” issue. Basically, with newer (13th or 14th) gen intel cpus they no longer have an “instruction set” called AVX-512 which openmc or one of the dependencies uses. I have only tried to fix it on ubuntu and installed from the source so I don’t really know how applicable this will be if you are using docker. All I really had to do is add -DCMAKE\_CXX\_FLAGS=“-O3 -march=native -mno-avx512f” to the end of the cmake line when I installed openmc. So the commands for installing were:

git clone [GitHub - openmc-dev/openmc: OpenMC Monte Carlo Code](https://github.com/openmc-dev/openmc.git)

cd openmc

mkdir build

cd build

cmake .. -DCMAKE\_BUILD\_TYPE=Release -DCMAKE\_CXX\_FLAGS=“-O3 -march=native -mno-avx512f”

make -j$(nproc)

cd ..

pip install .

I hope this helps. I got stuck trying to install OpenMC for almost two months (thankfully I had it on my laptop but still).

---

<div class="post-metadata">

**Author:** ![buk](https://avatars.discourse-cdn.com/v4/letter/b/54ee81/32.png) [@buk](https://openmc.discourse.group/u/buk)\
**Post date:** [August 8, 2025, 7:03am UTC](https://openmc.discourse.group/t/segmentation-error/5736/5 "2025-08-08T07:03:17Z")

</div>

Hi Ethan,

Thank you so much 🙏 . This will probably work because I work on ubuntu as well, and had to redownload openmc for too many times.
