Hi Lukas,
Thanks for the magic lines, it's all working now.
In my case, I have to preload libmpi.so and libpetsc.so. My ngspy doesn't preload libmkl_rt.so. (NO idea why this is the case, but the code runs anyway)
Also, I have a side question related to jupyter notebook: I would like to print out the convergence history and iteration counts for CGSolver, but it didn't show up in the notebook. Instead, the iteration counts are printed out in my terminal. Any suggestion how to bring these output to notebook?
Best,
Guosheng