# Problem with openmc.MeshSurfaceFilter (OpenMC hangs)

**URL:** <https://openmc.discourse.group/t/problem-with-openmc-meshsurfacefilter-openmc-hangs/3813>\
**Category:** User Support\
**Created:** [January 10, 2024, 3:17pm UTC](https://openmc.discourse.group/t/problem-with-openmc-meshsurfacefilter-openmc-hangs/3813 "2024-01-10T15:17:41Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![riwa](https://yyz2.discourse-cdn.com/free1/user_avatar/openmc.discourse.group/riwa/32/3218_2.png) [@riwa](https://openmc.discourse.group/u/riwa)\
**Post date:** [January 10, 2024, 3:17pm UTC](https://openmc.discourse.group/t/problem-with-openmc-meshsurfacefilter-openmc-hangs/3813/1 "2024-01-10T15:17:41Z")

</div>

Hello OpenMC community,

I ran recently in a problem when using the `openmc.MeshSurfaceFilter`

At a certain point the simulations just hangs at a certain batch (and most likely a particle)  
and just won’t continue.

I put below a version of our model that is reduced to the bare minimum to demonstrate the issue.

A simple mono-energetic Source of quadratic-plane shape and a little farther away a rectangular  
`RegularMesh`. On this mesh the current is tallied with the `openmc.MeshSurfaceFilter`.  
All with `fill = None`, so no materials involved.

With the particular setting of seed to `settings.seed = 21` the simulation hengs forever in the third simulated batch.  
Changing the seed value just shifts the time, when the problem occurs

I am using the last versi

on of OpenMC ( 0.14.1), but the error occurred at the previous release, too

I tried to get some debug info by increasing verbosity and even by using a debugBuild of OpenMC, but got no leads from that.

Any help would be appreciated. I can of course run more tests on demand and advice.

Best  
Richard

[Simple\_model\_meshsurface\_debug.ipynb](https://openmc.discourse.group/uploads/short-url/u836Ya4xPfmKRPYd4sr9Z1me6mC.ipynb) (111.6 KB)

---

<div class="post-metadata">

**Author:** ![riwa](https://yyz2.discourse-cdn.com/free1/user_avatar/openmc.discourse.group/riwa/32/3218_2.png) [@riwa](https://openmc.discourse.group/u/riwa)\
**Post date:** [January 15, 2024, 4:35pm UTC](https://openmc.discourse.group/t/problem-with-openmc-meshsurfacefilter-openmc-hangs/3813/2 "2024-01-15T16:35:04Z")

</div>

Hi,

Since there was no response -  
would it be better to open an issue so someone can hava a look at the problem?  
Or look for workarounds as to not use `MeshSurfaceFilter` for e.g.?

I suspect a pure geometric reason since there is no material involved in the test case.

Thanks,

Richard

```auto
                                %%%%%%%%%%%%%%%
                           %%%%%%%%%%%%%%%%%%%%%%%%
                        %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
                      %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
                    %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
                   %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
                                    %%%%%%%%%%%%%%%%%%%%%%%%
                                     %%%%%%%%%%%%%%%%%%%%%%%%
                 ############### %%%%%%%%%%%%%%%%%%%%%%%%
                ################## %%%%%%%%%%%%%%%%%%%%%%%
                ################### %%%%%%%%%%%%%%%%%%%%%%%
                #################### %%%%%%%%%%%%%%%%%%%%%%
                ##################### %%%%%%%%%%%%%%%%%%%%%
                ###################### %%%%%%%%%%%%%%%%%%%%
                ####################### %%%%%%%%%%%%%%%%%%
                 ####################### %%%%%%%%%%%%%%%%%
                 ###################### %%%%%%%%%%%%%%%%%
                  #################### %%%%%%%%%%%%%%%%%
                    ################# %%%%%%%%%%%%%%%%%
                     ############### %%%%%%%%%%%%%%%%
                       ############ %%%%%%%%%%%%%%%
                          ######## %%%%%%%%%%%%%%
                                      %%%%%%%%%%%

                 | The OpenMC Monte Carlo Code
       Copyright | 2011-2023 MIT, UChicago Argonne LLC, and contributors
         License | https://docs.openmc.org/en/latest/license.html
         Version | 0.14.1-dev
        Git SHA1 | ec8850deac2046668ab087f1f5f14a9df4614008
       Date/Time | 2024-01-15 17:11:07
  OpenMP Threads | 48

 Reading model XML file './model.xml' ...
 WARNING: Other XML file input(s) are present. These files may be ignored in
          favor of the ./model.xml file.
 Reading cross sections XML file...
 Minimum neutron data temperature: 1.7976931348623157e+308 K
 Maximum neutron data temperature: 0 K
 Preparing distributed cell instances...
 Writing summary.h5 file...

 ===============> FIXED SOURCE TRANSPORT SIMULATION <===============

 Simulating batch 1
 Simulating batch 2
 Simulating batch 3

-- ENDLESS LOOP --

```
