MRChemSoft/vampyr

Dead kernels

Opened this issue · 5 comments

When mrcpp hits a MSG_ABORT. It kills the notebook kernel. We should make sure we find all of these and deal with them
from the vampyr side of the code.

I suggest we list code that lead to a dead kernel here, so that it's easier for us til fix them in the future:

  • fetchEndNode when index is out of bound

Do we know how to handle them on the Python side?

No, but we need to hack it some way. I believe we make sure we never have empty FunctionTrees on the Python side. Am I correct?

Or is this "fixed" in mrcpp?

Using std::optional is another option: https://en.cppreference.com/w/cpp/utility/optional But it's MRCPP-side, not VAMPyR-side.

I was thinking something like this

 .def("fetchEndNode", [](MWTree<D> &tree, int i) {
    if (does i make sense?) return tree.getMWEndNode(i)

    return pybind11::none;
})

I haven't tested if this actually will work. I'll look at it when I have time