I have installed openMC on Ubuntu16lts-x86_64 system by cmake after I installed mpich, libmpich-dev, openmpi, libopenmpi-dev, libhdf5-dev and hdf5. The python API has been installed by `python3 steup.py install`. Everything seems fine when I tested examples.
However, when I tested `import openmc.lib` or `import openmc.deplete`, error happened as following:
import openmc.lib
>>>
---------------------------------------------------------------------------
OSError Traceback (most recent call last)
in ()
9 print(os.environ.get('READTHEDOCS', None))
10
---> 11 import openmc.lib
12
~/anaconda3/lib/python3.6/site-packages/openmc-0.12.0.dev0-py3.6-linux-x86_64.egg/openmc/lib/__init__.py in ()
30 _filename = pkg_resources.resource_filename(
31 __name__, 'libopenmc.{}'.format(_suffix))
---> 32 _dll = CDLL(_filename)
33 else:
34 # For documentation builds, we don't actually have the shared library
~/anaconda3/lib/python3.6/ctypes/__init__.py in __init__(self, name, mode, handle, use_errno, use_last_error)
346
347 if handle is None:
--> 348 self._handle = _dlopen(self._name, mode)
349 else:
350 self._handle = handle
OSError: /home/ma/anaconda3/lib/python3.6/site-packages/openmc-0.12.0.dev0-py3.6-linux-x86_64.egg/openmc/lib/libopenmc.so: undefined symbol: H5Tget_native_type
I checked the libopenmc.so in terminal which showed:
$ ldd -r /usr/local/lib/libopenmc.so
linux-vdso.so.1 => (0x00007fffd9da5000)
libdl.so.2 => /lib/x86_64-linux-gnu/libdl.so.2 (0x00007f1b8d04a000)
libmpi.so.12 => /home/ma/RMC/lib/libmpi.so.12 (0x00007f1b8cbc0000)
libstdc++.so.6 => /usr/lib/x86_64-linux-gnu/libstdc++.so.6 (0x00007f1b8c83e000)
libm.so.6 => /lib/x86_64-linux-gnu/libm.so.6 (0x00007f1b8c535000)
libgomp.so.1 => /usr/lib/x86_64-linux-gnu/libgomp.so.1 (0x00007f1b8c313000)
libgcc_s.so.1 => /lib/x86_64-linux-gnu/libgcc_s.so.1 (0x00007f1b8c0fd000)
libpthread.so.0 => /lib/x86_64-linux-gnu/libpthread.so.0 (0x00007f1b8bee0000)
libc.so.6 => /lib/x86_64-linux-gnu/libc.so.6 (0x00007f1b8bb17000)
/lib64/ld-linux-x86-64.so.2 (0x00007f1b8d9b1000)
librt.so.1 => /lib/x86_64-linux-gnu/librt.so.1 (0x00007f1b8b90f000)
undefined symbol: H5Tget_native_type (/usr/local/lib/libopenmc.so)
undefined symbol: H5Tget_tag (/usr/local/lib/libopenmc.so)
undefined symbol: H5Tset_tag (/usr/local/lib/libopenmc.so)
undefined symbol: H5Tget_cset (/usr/local/lib/libopenmc.so)
undefined symbol: H5Tget_member_value (/usr/local/lib/libopenmc.so)
undefined symbol: H5Tset_cset (/usr/local/lib/libopenmc.so)
undefined symbol: H5Tenum_insert (/usr/local/lib/libopenmc.so)
undefined symbol: H5Tenum_create (/usr/local/lib/libopenmc.so)
I searched the Internet. Someone advised to install the HDF5. However, after I downloaded hdf5-1.10.5.tar.gz and manually installed it, the error still exist.
Thanks!