Unstructured Mesh Tests Failing: MOAB Error


New OpenMC user here trying to install from source so I can have DAGMC enabled. When I run the test suite, I get several failures on the unstructured_mesh regression test. One example of the failure output:

MOAB ERROR: --------------------- Error Message ------------------------------------
MOAB ERROR: test_mesh_tets_w_holes.e: File is not HDF5!
MOAB ERROR: set_up_read() line 447 in src/io/ReadHDF5.cpp
MOAB ERROR: --------------------- Error Message ------------------------------------
MOAB ERROR: NULL file handle.!
MOAB ERROR: is_error() line 133 in src/io/ReadHDF5.hpp
MOAB ERROR: --------------------- Error Message ------------------------------------
MOAB ERROR: Expected Keyword!
MOAB ERROR: load_file() line 176 in src/io/ReadABAQUS.cpp
MOAB ERROR: --------------------- Error Message ------------------------------------
MOAB ERROR: Invalid/unrecognized line!
MOAB ERROR: load_file() line 274 in src/io/ReadOBJ.cpp
MOAB ERROR: --------------------- Error Message ------------------------------------
MOAB ERROR: This doesn't appear to be a .cub file!
MOAB ERROR: load_file() line 319 in src/io/Tqdcfr.cpp
MOAB ERROR: --------------------- Error Message ------------------------------------
MOAB ERROR: Parsing error at line 1: expected one of { $NOD $MeshFormat } got "CDF"!
MOAB ERROR: match_token() line 378 in src/io/FileTokenizer.cpp
MOAB ERROR: --------------------- Error Message ------------------------------------
MOAB ERROR: test_mesh_tets_w_holes.e.node: cannot read file!
MOAB ERROR: open_file() line 59 in src/io/ReadTetGen.cpp
MOAB ERROR: --------------------- Error Message ------------------------------------
MOAB ERROR: test_mesh_tets_w_holes.e: Trouble reading vertices!
MOAB ERROR: read_vertices() line 129 in src/io/ReadTemplate.cpp
MOAB ERROR: --------------------- Error Message ------------------------------------
MOAB ERROR: Failed to load file after trying all possible readers!
MOAB ERROR: serial_load_file() line 623 in src/Core.cpp
MOAB ERROR: load_file() line 514 in src/Core.cpp
 ERROR: Failed to load the unstructured mesh file: test_mesh_tets_w_holes.e

I am running Ubuntu 20.04 on WSL. I installed MOAB 5.1.0 from the source and HDF5 using apt install libhdf5-dev. Anyone know how I could resolve these failures?


Hi @kevinm387,

Thanks for trying out DAGMC! The reason for this error is that we use Exodus mesh files in our test suite. These files are readable by both MOAB and libMesh, so using this format allows us to reduce the number of binary finals we keep in the repository. MOAB’s default configuration does not support these files, however. To enable reading of Exodus files in MOAB, you’ll want to install the netcdf library (apt install libnetcdf-dev) and enable this option in the CMake configuration step when installing MOAB (-DENABLE_NETCDF=ON).

That should do the trick. If you still have issues after these steps, report back and we’ll go from there!

1 Like

Thank you for your reply! You’re absolutely right, I should’ve realized that. I reinstalled MOAB with NetCDF enabled, albeit a slightly different way than you described since I was following the instructions here. I simply added the command --download-netcdf to the ../src/configure step. That solved the failures on the unstructured mesh tests I was seeing before.

However, I’m now seeing two new failures when I run the test suite. First, several of the test_neutron_data.py unit tests give me the following error from the reconstruct function:

E           RuntimeError: Resonance reconstruction not available.
../openmc/data/resonance.py:228: RuntimeError

Second, one of the test_endf.py unit tests gives the following error from the py_float_endf function:

E       ValueError: could not convert string to float: '+ 2 . 3+ 1'
../openmc/data/endf.py:91: ValueError

Any insights on how best to solve these new errors would be greatly appreciated!

We have a few modules in the Python API that rely on Cython and have to be compiled. Cython extension modules are built when you install the Python API. If you try to add the openmc directory to PYTHONPATH without installing, these types of test failures will occur.

1 Like

Of course. Thank you! I reinstalled the Python API and also reran the command pip install -e .[test]. Now these failures have gone away. Thank you so much!

I have some a few other unrelated errors in the test suite, but I will start a new topic for those. Thank you @paulromano and @pshriwise!!!

Hi! Pshriwise,
I compiled openmc in conda , I want to get the power distribution in unstructured mesh , But i dont know how to do it .
could you guide me? The problem has bothered me for a long time.
Thank U very much And hope to get me out.