Put something like this at the top of the jupyter notebook
Code:
from ctypes import CDLL, RTLD_GLOBAL
# these are the libraries that are preloaded by ngspy, we can replace all the MKL libraries by
# the runtime library libmkl_rt
libs = ["/home/lkogler/local/openmpi-3.1-gcc-8.1/lib/libmpi.so", "/opt/intel/mkl/lib/intel64/libmkl_rt.so"]
for lib in libs:
CDLL(lib, RTLD_GLOBAL)
from ngsolve import *
Generally, I have found that you really only need to preload the libmkl_rt library when you do it this way.
Best,
Lukas