Hi all,
When running the following MWE in a container from openmc/openmc:latest
, I get the following error:
MWE.py
import openmc
mat = openmc.Material()
mat.add_nuclide('Zr90', 1.0)
mat.set_density('g/cm3', 1.0)
model = openmc.Model()
sph = openmc.Sphere(r=25.0, boundary_type='vacuum')
cell = openmc.Cell(fill=mat, region=-sph)
model.geometry = openmc.Geometry([cell])
model.settings.run_mode = 'fixed source'
model.settings.batches = 2
model.settings.particles = 50
model.run()
To reproduce:
docker run -ti openmc/openmc
cd home
git clone https://github.com/openmc-dev/openmc
cd openmc
pip install -e .
python MWE.py
I get the following error:
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/home/openmc/openmc/model/model.py", line 553, in run
if self.is_initialized:
File "/home/openmc/openmc/model/model.py", line 115, in is_initialized
import openmc.lib
File "/home/openmc/openmc/lib/__init__.py", line 32, in <module>
_dll = CDLL(_filename)
File "/usr/lib/python3.9/ctypes/__init__.py", line 374, in __init__
self._handle = _dlopen(self._name, mode)
OSError: /home/openmc/openmc/lib/libopenmc.so: cannot open shared object file: No such file or directory
Is something broken with the openmc docker images?
I’m also surprised I have to clone openmc