Segmentation fault in volume calculation

                           %%%%%%%%%%%%%%%
                       %%%%%%%%%%%%%%%%%%%%%%%%
                    %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
                  %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
                %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
               %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
                                %%%%%%%%%%%%%%%%%%%%%%%%
                                 %%%%%%%%%%%%%%%%%%%%%%%%
             ###############      %%%%%%%%%%%%%%%%%%%%%%%%
            ##################     %%%%%%%%%%%%%%%%%%%%%%%
            ###################     %%%%%%%%%%%%%%%%%%%%%%%
            ####################     %%%%%%%%%%%%%%%%%%%%%%
            #####################     %%%%%%%%%%%%%%%%%%%%%
            ######################     %%%%%%%%%%%%%%%%%%%%
            #######################     %%%%%%%%%%%%%%%%%%
             #######################     %%%%%%%%%%%%%%%%%
             ######################     %%%%%%%%%%%%%%%%%
              ####################     %%%%%%%%%%%%%%%%%
                #################     %%%%%%%%%%%%%%%%%
                 ###############     %%%%%%%%%%%%%%%%
                   ############     %%%%%%%%%%%%%%%
                      ########     %%%%%%%%%%%%%%
                                  %%%%%%%%%%%

               | The OpenMC Monte Carlo Code
     Copyright | 2011-2020 MIT and OpenMC contributors
       License | https://docs.openmc.org/en/latest/license.html
       Version | 0.12.1-dev
      Git SHA1 | c5f66a3af5c1a57087e330f7b870e89a82267e4b
     Date/Time | 2020-10-15 11:25:39
OpenMP Threads | 24
 Reading settings XML file...
 Reading cross sections HDF5 file...
 Reading materials XML file...
 Reading geometry XML file...
 Loading cross section data...
 Loading UO2 data...
 WARNING: Cross sections for  are only available at one temperature.  Reverting
          to the nearest temperature method.
 Loading MOX43 data...
 Loading MOX70 data...
 Loading MOX87 data...
 Loading FC data...
 Loading GT data...
 Loading CRD data...
 Loading MOD data...
 Preparing distributed cell instances...
[New Thread 0x7ffff7374700 (LWP 325919)]
[New Thread 0x7ffff6b73700 (LWP 325920)]
[New Thread 0x7ffff6372700 (LWP 325921)]
[New Thread 0x7ffff5b71700 (LWP 325922)]
[New Thread 0x7ffff5370700 (LWP 325923)]
[New Thread 0x7ffff4b6f700 (LWP 325924)]
[New Thread 0x7ffff436e700 (LWP 325925)]
[New Thread 0x7ffff3b6d700 (LWP 325926)]
[New Thread 0x7ffff336c700 (LWP 325927)]
[New Thread 0x7ffff2b6b700 (LWP 325928)]
[New Thread 0x7ffff236a700 (LWP 325929)]
[New Thread 0x7ffff1b69700 (LWP 325930)]
[New Thread 0x7ffff1368700 (LWP 325931)]
[New Thread 0x7ffff0b67700 (LWP 325932)]
[New Thread 0x7ffff0366700 (LWP 325933)]
[New Thread 0x7fffefb65700 (LWP 325934)]
[New Thread 0x7fffef364700 (LWP 325935)]
[New Thread 0x7fffeeb63700 (LWP 325936)]
[New Thread 0x7fffee362700 (LWP 325937)]
[New Thread 0x7fffedb61700 (LWP 325938)]
[New Thread 0x7fffed360700 (LWP 325939)]
[New Thread 0x7fffecb5f700 (LWP 325940)]
[New Thread 0x7fffec35e700 (LWP 325941)]

 =================>     STOCHASTIC VOLUME CALCULATION     <=================

 Running volume calculation 1

Thread 1 "openmc" received signal SIGSEGV, Segmentation fault.
0x00007ffff7eb868b in openmc::VolumeCalculation::execute (this=) at /home/yuejin/Cloud/OpenMC/src/vendor/xtensor/include/xtensor/xstorage.hpp:402
402         inline auto uvector::operator[](size_type i) -> reference
(gdb) backtrace
#0  0x00007ffff7eb868b in openmc::VolumeCalculation::execute (this=) at /home/yuejin/Cloud/OpenMC/src/vendor/xtensor/include/xtensor/xstorage.hpp:402
#1  0x00007ffff7ebb1aa in openmc_calculate_volumes () at /home/yuejin/Cloud/OpenMC/src/src/volume_calc.cpp:475
#2  0x000055555555521a in main (argc=, argv=) at /home/yuejin/Cloud/OpenMC/src/src/main.cpp:44

@kingyue Can you share a model that results in this segmentation fault? Otherwise it’s hard for us to reproduce it and figure out what’s going on.

This is a C5G7 model converted to openmc input by a toolkit from another neutronics code, so I don’t have a single python script.
Here are all the xml inputfiles:
geometry.xml (5.2 KB) materials.xml (1.0 KB) settings.xml (527 Bytes)

h5 macroscopic library:
mgxs.h5

@kingyue Volume calculations in OpenMC normally calculate both the volume of a cell/material as well as the number of atoms of specific nuclides within it. Right now, it unfortunately doesn’t work in conjunction with multigroup data (see this issue). A workaround for now would be to change your materials to use continuous-energy data; if you’re only interested in the volumes, the composition of the materials doesn’t matter.