Problem with using Jupyter Notebook

Hi all,
I am new to OpenMC. I have installed the OpenMC 0.10.0 on Ubuntu 20.04 via Windows Subsystem for Linux (WSL). And then I update OpenMC to 0.11.0 version


And then, I have installed Jupyter notebook

I have created python files on visual studio code and get xml files followed by this

I try to run simulation and get statepoint.50.h5 but when I open jupyter notebook and load the statepoint file it shows.


Can’t anyone help me.

import openmc
Sp=openmc.statepoint(‘statepoint.100.h5’)

This should solve your problem.

Thank you @imtiaj_hossain for your suggestion but when I import openmc it shows error.

I don’t know why.

I’m not sure why it is happening though.but try to install openmc using conda forge as per the instruction given here.

https://anaconda.org/conda-forge/openmc

Hello @imtiaj_hossain, I have installed openmc as per your suggestion.


And then I try to open jupyter notebook and run it again but it still shows an error.

I create ipynb in the same location as the statepoint.50.h5 file.

Cheers,

You’ve installed openmc successfully. But sorry to say, i don’t know why it isn’t working now.

That’s ok. Thank you for helping. I appreciate it.

Hi @imtiaj_hossain , I have a few wonders about the jupyter notebook on window sub linux. I wonder the jupyter notebook can not support on the WSL? so it shows the red error.

This maybe effects when I use jupyter notebook to load statepoint h5 file and It show error that it can not find the data. Do you have any ideas?

Cheers,

@Yos The error you’re getting says that the statepoint file is not compatible with your version of OpenMC. You’ll need to rerun your simulation to get a new statepoint file, at which point you should be able to load it in the Python API.

Thank you @paulromano for your suggestions. Now I can load it. I think it is because I don’t upgrade h5py to the latest version when I upgraded openmc-10 to openmc-11.