Running the example pin cell code on mac, jupyter notebook via conda.
The first parts worked fine until I try to run “universe.plot(width=(2.0, 2.0))”. It won’t plot the figure and throws the error “No such file or directory: ‘openmc’”.
Thanks for posting and welcome to the community.
It sounds like openmc is not fully installed.
There is a python package to install and also a binary executable.
The error message described suggests that the binary executable is not being found
There are a few different ways of installing OpenMC which is helpful for solving this error
Thanks for your reply. I downloaded openmc with conda as described in the install guide.
- Downloaded anaconda navigator from the download link in the guide
- ran the following commands in mac terminal:
conda config --add channels conda-forge
conda create -n openmc-env
conda activate openmc-env
conda install mamba
mamba search openmc
mamba install openmc
I then installed Jupyter notebook through anaconda navigator, on openmc-env, opened it and tried to run the example code, which, as explained above, ran fine until it needed to plot something.
Do you have any idea why the binary executable isn’t being found? I’m pretty new to working with command lines so might’ve missed something.
I’ve got further on in the example code and have ran into the same issue when trying openmc.run()
That looks right to me. Perhaps we can have a call and I can figure it out from a share screen.
sure, that’d be great
Any chance you are free to join this gather link Gather
Thanks for the catch up just now.
We solved the problem of openmc.run()
not finding openmc
I suspect the cause of the error was Anaconda Navigator not loading Jupyter with the correct environment
To solve the problem we used the terminal to activate the conda environment and to launched jupyter notebook from the terminal
Thanks so much for the help. The XML file is downloaded and I put the following line in my code:
openmc.config[‘cross_sections’]=“/Users/sr/opt/x_sections/cross_sections.xml”
This is the path to the cross sections file.
I then run the code and it throws up the following error:
I looked and “/Users/sr/opt/anaconda3/envs/open-env/lib/hdf5/plugin” doesn’t exist; I can’t find a folder called hdf5.
I also got:
RuntimeError: Failed to open HDF5 file with mode ‘r’: /Users/sr/opt/x_sections/neutron/U235.h5 application called MPI_Abort(MPI_COMM_WORLD, -1) - process 0 [unset]: write_line error; fd=-1 buf=:cmd=abort exitcode=-1 : system msg for write_line failure : Bad file descriptor