# Problem executing example named "basic"

**URL:** <https://openmc.discourse.group/t/problem-executing-example-named-basic/39>\
**Category:** User Support\
**Created:** [August 27, 2013, 5:05pm UTC](https://openmc.discourse.group/t/problem-executing-example-named-basic/39 "2013-08-27T17:05:41Z")\
**Posts on this page:** 9\
**Page:** 1

<div class="post-metadata">

**Author:** ![khurrum](https://avatars.discourse-cdn.com/v4/letter/k/bc79bd/32.png) [@khurrum](https://openmc.discourse.group/u/khurrum)\
**Post date:** [August 27, 2013, 5:05pm UTC](https://openmc.discourse.group/t/problem-executing-example-named-basic/39/1 "2013-08-27T17:05:41Z")

</div>

hi every one

i have recently installed openmc code and was testing it on cygwin. i converted my mcnp library using convert\_xsdir.py script and tried to use it to run sample problem “basic” supplied with the code. but i am getting an error.

Reading settings XML file…  
Reading cross sections XML file…  
Reading geometry XML file…  
Reading materials XML file…  
Reading tallies XML file…  
Building neighboring cells lists for each surface…  
Loading ACE cross section table: 92235.66c

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

Backtrace for this error:  
Segmentation fault (core dumped)

i can’t understand what is the problem. can anyone help me with that please.

---

<div class="post-metadata">

**Author:** ![khurrum](https://avatars.discourse-cdn.com/v4/letter/k/bc79bd/32.png) [@khurrum](https://openmc.discourse.group/u/khurrum)\
**Post date:** [August 27, 2013, 5:23pm UTC](https://openmc.discourse.group/t/problem-executing-example-named-basic/39/2 "2013-08-27T17:23:37Z")

</div>

Hi again.

the problem is now running ok but i had to change the cross section files. now i am using some file which i have generated by myself using NJOY. still can’t figure what is the problem that with one kind of cross section file the problem is working fine but for other it gives error.

Any suggestions?

---

<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 28, 2013, 2:55am UTC](https://openmc.discourse.group/t/problem-executing-example-named-basic/39/3 "2013-08-28T02:55:28Z")

</div>

One thing you can do is to recompile with debug flags turned on. That way if you hit a segmentation fault, it will tell you what line of the code it occurred on. To recompile, go to your openmc/src folder and run:

make distclean  
make DEBUG=yes

In the meantime, I’ll see if I can reproduce your issue by trying to run with 66c cross sections.

Best regards,  
Paul

---

<div class="post-metadata">

**Author:** ![khurrum](https://avatars.discourse-cdn.com/v4/letter/k/bc79bd/32.png) [@khurrum](https://openmc.discourse.group/u/khurrum)\
**Post date:** [August 28, 2013, 3:31am UTC](https://openmc.discourse.group/t/problem-executing-example-named-basic/39/4 "2013-08-28T03:31:13Z")

</div>

Hi,

Thank you for your suggestions. i recompiled the code with DEBUG turned on. the error this time in using 66c cross section files is given below.

At line 1293 of file ace.F90  
Fortran runtime error: Index ‘1381908’ of dimension 1 of array ‘xss’ outside of expected range (722105:1)

---

<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 29, 2013, 3:57am UTC](https://openmc.discourse.group/t/problem-executing-example-named-basic/39/5 "2013-08-29T03:57:17Z")

</div>

I was able to reproduce this error. I will have to dig a bit deeper to figure out what is going on with those cross sections. Thanks for reporting the issue.

Best regards,  
Paul

---

<div class="post-metadata">

**Author:** ![Darpan\_S](https://avatars.discourse-cdn.com/v4/letter/d/59ef9b/32.png) [@Darpan\_S](https://openmc.discourse.group/u/Darpan_S)\
**Post date:** [September 8, 2014, 10:57am UTC](https://openmc.discourse.group/t/problem-executing-example-named-basic/39/6 "2014-09-08T10:57:52Z")

</div>

I am also getting same error while using Jeff 3.2 files of “Segmentation Fault in valid memory reference”  
Is there any solution for the same.

---

<div class="post-metadata">

**Author:** ![Darpan\_S](https://avatars.discourse-cdn.com/v4/letter/d/59ef9b/32.png) [@Darpan\_S](https://openmc.discourse.group/u/Darpan_S)\
**Post date:** [September 11, 2014, 5:52am UTC](https://openmc.discourse.group/t/problem-executing-example-named-basic/39/7 "2014-09-11T05:52:09Z")

</div>

I think I have probably solve for right now this problem of Segmentation Fault.

I have increased swap memory to the doubled the ram using below link:[https://www.digitalocean.com/community/tutorials/how-to-add-swap-on-ubuntu-14-04](https://www.digitalocean.com/community/tutorials/how-to-add-swap-on-ubuntu-14-04)

I have changed geometry file where initially I have mentioned twice same region with same material (so it has not shows error) Now I have made only one declaration of the same region.

Is this is the solution?

---

<div class="post-metadata">

**Author:** ![Darpan\_S](https://avatars.discourse-cdn.com/v4/letter/d/59ef9b/32.png) [@Darpan\_S](https://openmc.discourse.group/u/Darpan_S)\
**Post date:** [September 25, 2014, 2:41am UTC](https://openmc.discourse.group/t/problem-executing-example-named-basic/39/8 "2014-09-25T02:41:00Z")

</div>

I think I found one of the error solution, in current score needs mesh as filter. If it does not have than it will gave segmentation fault error.  
I have seen this in my work.

Thank you.

---

<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:** [September 25, 2014, 11:45am UTC](https://openmc.discourse.group/t/problem-executing-example-named-basic/39/9 "2014-09-25T11:45:00Z")

</div>

Hi Darpan- the “current” score tallies surface currents on mesh faces, so it does indeed need to have a mesh filter. That being said, OpenMC should abort gracefully if the “current” score is specified with no mesh filter; I’ll look at getting that fixed.

Thanks,  
Paul
