Skip to content

Instructions for configuring OpenMC with Workbench 5.0.0

This should be a comprehensive update to instructions and scripts that allow one to use OpenMC in Workbench 5.0.0.

Details on what is included here:

  • There is a change in Workbench/Python 3 that causes sonvalidxml to return type bytes instead of str. This required the addition of decode() on the input in PyARCUtils.py. If-statement should make it backwards compatible with Workbench 4.0.0. (This change was the cause of the error I was receiving that caused me to think all of conda was broken yesterday. It is not, PyARC just needs this quick fix.)
  • I made a script called setup_openmc.sh. This script just needs to be run one time to setup openmc in the conda environment for workbench. It saves the original conda environment information into a .yml file so that it can be reset if needed. The README.md hopefully includes detailed enough information on what is required to run this and setup OpenMC. However, do let me know what is not clear.
  • The way that Workbench uses conda is not traditional, meaning it sees all the python packages in its conda environment, but it doesn't do the standard conda activation that adds things to PATH. Because of this, the executables openmc and mpiexec are not readily available when it comes time to run (but the openmc python library is available). To get around this, I added some logic that searches for and explicitly specifies the openmc and mpiexec executables in the precheck if they aren't found. This does require that the workbench_path is specified in the .pyarc.rc file because it searches for the executables there.

I have tested this all locally and it works on a clean workbench 5.0.0 installation and also works to run from the command line. I have not been able to test it with a remote configuration because I don't have permission to edit/conda install in the Workbench-5.0.0 folder there. I also have in mind an update to CI such that Workbench 5.0.0 can be used instead of using the pyarc_ci_omc0.13.1 conda environment, but I don't want to push those changes until we configure the remote properly for openmc.

Edited by Kiesling, Kalin Rose

Merge request reports