OpenMC with conda

Hi all,

I just installed OpenMC via conda and I have trouble understanding how OpenMC works in this situation (I used to install OpenMC from source before). I thus have two questions:

  1. I like to get the NNDC cross section data and I would use the the script openmc-get-nndc-data to get them. But I don’t see this script in my OpenMC directory in miniconda2. How I am supposed to download the nndc data?

  2. I prefer to use the Python API to create and run openmc input file. However, it does not look like the conda openmc install includes the Python modules necessary to use the Python API. I am wrong? May be I have completely missed something.

Thanks a lot for your help.

Julien

Hi Julien,

  1. This is an error on the part of our setup script (which didn’t indicate to install the openmc-get-nndc-data script). It has been fixed since the last release and will be reflected in our next release, but for now you can download a tarball of the 0.8.0 source, extract it, go to the data directory, and run get_nndc_data.py. Note that the name has also changed since the 0.8.0 release.

  2. It also looks like our conda recipe doesn’t correctly include the Python third-party dependencies. I will look into getting that fixed. For now, you should make sure you have numpy, scipy, h5py, and pandas installed.

Best,
Paul

Hi Paul,

Thanks a lot for this very quick response.

I actually prefer to install OpenMC from source. I just tried to install it with conda this time because of compatibility problem : I can’t have OpenMC and Pyne working together for the moment (they do not use the same version of hdf5 because OpenMC bugs with h5py2.6) so I tried to check their compatibility when installed via conda.

So if anyone knows about this OpenMC/Pyne compatibility problem, advices and help are very welcome.

Thanks again.

Julien

It is an unfortunate situation that h5py 2.6 does not work with OpenMC at present, but to be clear it is actually a bug in h5py 2.6 that affects OpenMC (namely, we use compound datatypes for a few datasets and h5py 2.6 doesn’t read them correctly). While the bug in h5py has since been fixed, they haven’t released a new version since February so we are stuck with the version incompatibility issue. I am considering removing the use of compound datatypes for the next version of OpenMC, but that unfortauntely won’t help you at present.

Is there no way to get PyNE to work with h5py 2.5? I’m not aware of any reason why it would need 2.6 specifically.

Best,
Paul

Paul,

Sorry for the bad phrasing; I know the bug with with h5py does not come from OpenMC but from h5py.

I have been playing around with different installations of Pyne and OpenMC API and here is what I found:

On conda, Pyne and OpenMC will probably not work together. The dependencies of Pyne and OpenMC API are as follow ( -> stands for “depends on”):
Pyne -> hdf5 1.8.17 (for all the versions of Pyne available on conda-forge)
OpenMC API -> h5py2.5 -> hdf5 1.8.15.1
Since conda is quite rigid in term of dependencies compatibility, it will automatically force hdf5 to update to 1.8.17 and h5py to 2.6 when installing Pyne.

I also tried to install OpenMC with the source (via Github) and keep Pyne on conda. I don’t really understand what happens here. When the miniconda bin directory is prepended to PATH, Pyne is recognised as a module by python but OpenMC API is not. If miniconda bin directory is append at the end of PATH, the reverse is true. Therefore, I can’t have Pyne and OpenMC API work together.

FInally, installing both OpenMC and Pyne from source (without conda) is not possible for me for the moment as it seems that Pyne installation is broken (at least on my two computers).

So the conclusion I draw is that for the moment, it is rather difficult to have both OpenMC and Pyne working hand in hand (pretty unfortunate for me since my project relies on both). However, I am completely new to software engineering so there are probably things I did not understand or try.

Hope this clarify the problem between OpenMC and Pyne.

Julien

Two ideas for you:

  1. When installing OpenMC from source, remove this line in CMakeLists.txt. This should ensure that when the conda version of Python is used, the OpenMC Python API will be accessible.
  2. After successfully installing OpenMC and PyNE, install h5py from source using the latest developmental branch. This will get around the incompatible version issue for the time being.

One more thought here. For now, I’d recommend avoiding the conda forge OpenMC package because apparently the Python API is not installed correctly from it. In lieu of that, you should install OpenMC from source making that one-line change as I mentioned.