ERROR: 'energy_groups' attribute must exist!

Hello,
Please see in the first file attached the given error when I run openmc code in multigroup mode, and the second file is the simulation in continuous mode of energy, I configured it successfully in my machine ubuntu and it seems to work very well.
Why in multigroup mode this error show up?

image1.png

Hi Mohamed,

In order to run in multi-group mode, you will need to have a multi-group cross section HDF5 library. My guess is that you are trying to run in multi-group mode but are using continuous-energy cross sections.

Best,
Paul

Thanks for the reply
I tried to run an example “pincell multigroup” provided with the code. By following these steps. Here’s what I got I think that my own library section HDF5 multi-group -mgxs.h5- was well generated but I do not know how to set the OPENMC_MG_CROSS_SECTIONS environment variable to the absolute path

Hi Mohamed,

That’s interesting. You shouldn’t need to set OPENMC_MG_CROSS_SECTIONS for this problem as the materials.xml file (or settings.xml depending on the exact point in time of the code base you’re using) should contain a cross_sections attribute which states that the file is the mgxs.h5 file in your directory. Can you confirm that line is there?

Hi Adam
Here is the contents of the materials.xml file

<?xml version='1.0' encoding='utf-8'?>

<cross_sections>./mgxs.h5</cross_sections>








Interesting. Let’s see if the mgxs.h5 file at least has that data in it or if it somehow was corrupted during the course of build_xml.py. Can you run the following command in the examples/python/pincell_multigroup problem and include the output here:

h5dump -a energy_groups ./mgxs.h5

Also, does the examples/xml/pincell_multigroup problem run successfully?

Thanks,
Adam

Hi Adam
the output of command : h5dump -a energy_groups ./mgxs.h5 shows that the attribute energy_groups is absent

HDF5 “./mgxs.h5” {
ATTRIBUTE “energy_groups” {h5dump error: unable to open attribute “energy_groups”

}
}

Thanks Mohamed. Sounds like a malformed library, which is odd considering you had no error messages. Would you mind attaching the mgxs.h5 file to this message?

mgxs.h5 (16.3 KB)

Sorry I didn’t realize I had the attachment to my message still - that is an mgxs file that my machine created but it is for a version that wont be compatible with the one you are using so disregard it.