Conda installation of OpenMC with DAGMC on?

Hello, I was wondering if there was a conda distribution of OpenMC with the DAGMC capability. I wasn’t able to find it on the website, and the building is quite tricky, and I do not have sudo privilleges on this machine, which makes it harder.

Is it possible to have a conda distribution of OpenMC with DAGMC capabilities?

Thank you,

Hi @nuclearbae. Our conda-forge distribution does not include DAGMC capability at present. I do see that both MOAB and DAGMC are available through conda-forge, so in principle it might be possible to update our build recipe to include it. @pshriwise might know whether this is feasible.

In the meantime, we do have docker images with DAGMC included that may serve your needs. I’m not a docker expert but there are others on the forum here who may be able assist if you run into any issues with it.

I did have a go at this a while back and was planning to pick it up again after the next DAGMC release.

Here is where I got to staged-recipes/recipes/openmc-dagmc at openmc-dagmc · Shimwell/staged-recipes · GitHub

I put it on hold as I was not able to include the the idea DAGMC build with Embree and Double Down (which speeds up the simulations). But I think a more straight forward OpenMC build is possible to put together.

Also I think the resulting Conda build would not be windows compatible

We’re not building for Windows currently on conda so that’s not a big deal, but good to know for future reference in case we ever do a Windows build.

I think MOAB is also not currently available as a Conda installable option on Windows.

I believe @nuclearbae is keen on testing the simulation time for OpenMC and in this case I think it might be worth including to Double Down and Embree options to get the best possible speed

I’ve just been looking over the recipe and I think the current block on a combined conda-dagmc install is that we can’t currently compile openmc with DAGMC when the DAGMC comes from a Conda install. However this will be fixed in the next DAGMC release

Thank you for the discussion! I’ll look forward to the next release.

We may be close to having this work. Any thoughts/preferences about whether this should be a configuration option for the main OpenMC conda-forge package, or a separate conda-forge package? I think the former will save some effort in maintaining them both.

1 Like

I agree with Paul, he has this working nicely for the moab conda packages.

The user would then install openmc in the normal way

conda install -c conda-forge openmc=0.13.0

I believe the install openmc with dagmc then be done in the following options

# with exact build hash
conda install openmc=0.13.0=dagmcpy37h7cd2321_0
# Any build of openmc with dagmc included
conda install openmc=0.13.0=dagmc*
# Any build of openmc with dagmc included for python 3.8
conda install openmc=0.13.0=dagmc_py38*
1 Like

All the credit goes to @Shimwell

There may be some finessing needed to decide which is the default configuration. I think the example @Shimwell (edited to correct attribution) gave above would actually install the DAGMC version as the default because of it’s alphabetic ordering - but I’m sure we can work that out.

1 Like

Just to confirm that DAGMC now installs by default when installing OpenMC with Conda

There are might be others but here are three popular Conda distributions

Once you have Conda install is an example of how to install openmc.

First create a new empty environment, I’ve called mine new_env but you can call it whatever you like. Note that a python version of at least 3.7 is required. I have opted for python 3.8 in this example

conda create --name new_env python=3.8

activate the environment

conda activate new_env

install openmc with conda

conda install -c conda-forge openmc

You should see the packages that will be installed in the terminal includes OpenMC 0.13.0 and DAGMC 3.2.1

Then enter y for yes to proceed with the install

2 Likes