Install openmc on windows10

Hello, I’m trying to install OpenMc on Windows 10. I installed Docker. I wrote the necessary commands in Windows Power Shell. Some files were loaded. Then I couldn’t understand what to do.
.Please, can you help

Hello, please take a look at my tutorial on window WSL and Openmc Setting and Installation.

@gk61, I struggled with the same issue for a while. If you don’t get it to work let me know. Happy to help.

Hello, new user here. I know ideally nothing about wsl and Linux operating systems. I was having the same issue with docker on Windows. I followed the tutorial @Sivakorn.SSW posted, but I’m stuck trying to download the endf files. I’m not getting the same results when I try to copy the file to a new folder in my system. I’ve used 7-zip to get them from the .tar.xz form. So I don’t think I can link from Ubuntu to Windows. I tried setting up the environment path, the echo command works but the cat command will say ‘cannot find the cross_section.xml’.

I’ve also tried following these instructions:
https://docs.openmc.org/en/stable/devguide/docker.html

I think I got the interactive shell to work and run in docker but I have no idea how to access openmc. Any help would be greatly appreciated. Thanks.

Whoops, wrong screenshots.

Hi,
First, you will turn off windows features from here. Secondly, you can install wsl from https://ubuntu.com/tutorials/install-ubuntu-on-wsl2-on-windows-11-with-gui-support#2-install-wsl. Then If you follow the steps on this site,(GitHub - fusion-energy/neutronics-workshop: A workshop covering a range of fusion relevant analysis and simulations with OpenMC, DAGMC, Paramak and other open source fusion neutronics tools) you can install it. I only installed it on Windows, so I don’t know if it is for Linux.

After looking into windows features, I wasn’t sure which ones I should turn off or what that would do to help if I’m working on Ubuntu. I did not disable them and followed the directions at the Github. I’m currently stuck trying to install moab.

@keelza Unless you expect to be working with CAD geometries, it will be a lot easier to compile with DAGMC disabled (in which case you don’t need to build MOAB).

@paulromano I’ve gone ahead and tried the rest of the code from neutronics-workshop/install_scripts/compile_install_ubuntu_20.04.sh at main · fusion-energy/neutronics-workshop · GitHub. Starting at line 111 I was able to run every line with one exception. After adding the installation location to my path and executing line 132 I get: ‘No module named ‘openmc’’. I did follow the note to not compile with dagmc and just used cmake…

Hi there.

I remember making that script and naming it Ubuntu 20.04 as that was the version it was built for. It does not work for other versions of Ubuntu, so you might want to check the version of Ubuntu you have installed via wsl. I guess you have Ubuntu 22.04 as 20.04 is not the default any more.

However if i understand then you are skipping the first 111 lines of the install script anyway and then doing a minimal openmc install. So perhaps you dont need this script and can just use the offical openmc install instructions

https://docs.openmc.org/en/stable/quickinstall.html#installing-from-source-on-linux-or-mac-os-x

Can you try this and post a screen shot of any errors

git clone --recurse-submodules https://github.com/openmc-dev/openmc.git
cd openmc
mkdir build && cd build
cmake ..
make
sudo make install
python -m pip install .

Hi @Shimwell

I got rid of and then redownloaded Ubuntu, this time version 22.04 and ran your installation script. I did not run into any issues or errors to the best of my knowledge, so I believe that was the problem. Sorry for any misunderstanding, but I previously just skipped the lines for MOAB.

I want to try and run openmc in Jupyter, while I have the Anaconda navigator app and Jupyter installed I believe I need to run it in Ubuntu and port to a windowed Jupyter with openmc? Could you help with this or point me in the right direction?

Thanks for all the help and scripts by the way.