jonaslb / psiesta

Python bindings for "Siesta as a subroutine" DFT
https://github.com/jonaslb/psiesta
GNU General Public License v3.0
2 stars 2 forks source link

Using sile.read_geometry before loading fsiesta lib can cause crash if nc-files are read #2

Closed jonaslb closed 4 years ago

jonaslb commented 4 years ago

If using sisl to read a geometry before having instantiated an fsiesta lib, importing will fail with the exception:

Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/zhome/01/4/88971/git/psiesta/psiesta/psiesta.py", line 146, in __init__
    super().__init__(working_dir=working_dir, comm=comm)
  File "/zhome/01/4/88971/git/psiesta/psiesta/psiesta.py", line 76, in __init__
    self._module = importlib.util.module_from_spec(self._spec)
  File "<frozen importlib._bootstrap>", line 583, in module_from_spec
  File "<frozen importlib._bootstrap_external>", line 1043, in create_module
  File "<frozen importlib._bootstrap>", line 219, in _call_with_frames_removed
ImportError: /dtu/sw/dcc/SL73/2019-jun/XeonE5-2660v3/gnu/9.1.0/hdf5/1.10.5/lib/libhdf5_fortran.so.102: undefined symbol: H5FD_mpio_init

This only happens if sisl has nc-files to read from, ie. having .ion.nc-files is sufficient.

Presumably sisl loads a non-mpi-enabled hdf5 library which then somehow blocks siesta from loading an mpi-enabled one.

If a FilePSiesta calculator is instantiated first, then sisl can still read without problems, and a crash is averted even on following FilePSiesta instantiations. So perhaps a workaround is to load an fsiesta instance on psiesta import.