# \[0\]MOAB ERROR: dagmc.h5m: File is not HDF5!

**URL:** https://openmc.discourse.group/t/0-moab-error-dagmc-h5m-file-is-not-hdf5/4372
**Category:** User Support
**Created:** [June 8, 2024, 9:44pm UTC](https://openmc.discourse.group/t/0-moab-error-dagmc-h5m-file-is-not-hdf5/4372 "2024-06-08T21:44:37Z")
**Posts on this page:** 4
**Page:** 1

<div class="post-metadata">

### Author: ![nnelso13](https://avatars.discourse-cdn.com/v4/letter/n/91b2a8/32.png) [@nnelso13](https://openmc.discourse.group/u/nnelso13)
#### Post date: [June 8, 2024, 9:44pm UTC](https://openmc.discourse.group/t/0-moab-error-dagmc-h5m-file-is-not-hdf5/4372/1 "2024-06-08T21:44:37Z")

</div>

Hello! This is my first post on here and I am having some trouble getting OpenMC to run on my computer. I followed the instructions [here](https://docs.openmc.org/en/stable/usersguide/install.html#usersguide-python-prereqs) using the Mamba and Conda-forge method. I am currently using OpenMC=0.14.0=dagmc\_mpi\_openmpi\_py310hdacdb64\_101 build, but seem to be having issues when I run my job. The output error is:

```auto
[0]MOAB ERROR: --------------------- Error Message ------------------------------------
[0]MOAB ERROR: dagmc.h5m: File is not HDF5!
[0]MOAB ERROR: set_up_read() line 449 in src/io/ReadHDF5.cpp
[0]MOAB ERROR: --------------------- Error Message ------------------------------------
[0]MOAB ERROR: NULL file handle.!
[0]MOAB ERROR: is_error() line 134 in src/io/ReadHDF5.hpp
[0]MOAB ERROR: --------------------- Error Message ------------------------------------
[0]MOAB ERROR: Failed to load file after trying all possible readers!
[0]MOAB ERROR: serial_load_file() line 588 in src/Core.cpp
[0]MOAB ERROR: load_file() line 471 in src/Core.cpp
Loading file dagmc.h5m
ERROR: DagMC Couldn't read file dagmc.h5m
Error message: Failed to load file after trying all possible readers
[0]MOAB ERROR: init_dagmc() line 131 in dagmc.cpp
[0]MOAB ERROR: --------------------- Error Message ------------------------------------
[0]MOAB ERROR: Failed to join the obb trees!
[0]MOAB ERROR: construct_obb_tree() line 491 in src/GeomTopoTool.cpp
[0]MOAB ERROR: --------------------- Error Message ------------------------------------
[0]MOAB ERROR: Failed to construct obb tree for volume!
[0]MOAB ERROR: construct_obb_trees() line 591 in src/GeomTopoTool.cpp
[0]MOAB ERROR: --------------------- Error Message ------------------------------------
[0]MOAB ERROR: Failed to build obb trees!
[0]MOAB ERROR: setup_obbs() line 204 in DagMC.cpp
[0]MOAB ERROR: --------------------- Error Message ------------------------------------
[0]MOAB ERROR: Failed to setup the OBBs!
[0]MOAB ERROR: init_OBBTree() line 685 in DagMC.cpp
[0]MOAB ERROR: init_dagmc() line 135 in dagmc.cpp

```

I have found a similar post with this issue [here](https://openmc.discourse.group/t/unstructured-mesh-tests-failing-moab-error/1398), but this differs slightly to my issue and I could not find a solution. I also do not know if I need to include this, but I am running OpenMC on an Intel Mac running Sonoma 14.5.

Any guidance would be greatly appreciated!

-Nik

---

<div class="post-metadata">

### Author: ![Shimwell](https://yyz2.discourse-cdn.com/free1/user_avatar/openmc.discourse.group/shimwell/32/3876_2.png) [@Shimwell](https://openmc.discourse.group/u/Shimwell)
#### Post date: [June 9, 2024, 1:28am UTC](https://openmc.discourse.group/t/0-moab-error-dagmc-h5m-file-is-not-hdf5/4372/2 "2024-06-09T01:28:56Z")

</div>

Looks like the error is that the dagmc file is not a hdf5 file. Can you tell us how you made the dagmc referee to in the script

---

<div class="post-metadata">

### Author: ![nnelso13](https://avatars.discourse-cdn.com/v4/letter/n/91b2a8/32.png) [@nnelso13](https://openmc.discourse.group/u/nnelso13)
#### Post date: [June 9, 2024, 3:12am UTC](https://openmc.discourse.group/t/0-moab-error-dagmc-h5m-file-is-not-hdf5/4372/3 "2024-06-09T03:12:23Z")

</div>

Thank you for the reply!

I should have also stated that I normally run jobs in a cluster at my university and the same dagmc.h5m file works in the same script when run remotely. This error only arises on my local install of OpenMC which I did via the Conda method.

In my actual job script I referred to the .h5m file as:

```auto
dagmc_univ = openmc.DAGMCUniverse(filename="/Users/Desktop/TEST/dagmc.h5m")

```

To create the dagmc.h5m file, I used the stl\_to\_h5m package.

---

<div class="post-metadata">

### Author: ![teade](https://avatars.discourse-cdn.com/v4/letter/t/41988e/32.png) [@teade](https://openmc.discourse.group/u/teade)
#### Post date: [April 1, 2025, 2:53pm UTC](https://openmc.discourse.group/t/0-moab-error-dagmc-h5m-file-is-not-hdf5/4372/4 "2025-04-01T14:53:20Z")

</div>

This is a bit late but in case anyone else has this same issue, I found that using the -DENABLE\_HDF5=ON option is also needed when using cmake to build MOAB and not just -DENABLE\_NETCDF=ON as per the issue [here](https://openmc.discourse.group/t/unstructured-mesh-tests-failing-moab-error/1398).
