Potential memory BUG in upgrade whenever there is a non-zero eigenvalue in OP_V !
ATTENTION:
In upgrade, we allocate a matrix grarr(Ndim,op_dim) where op_dim is an argument passed to this routine. It contains the N_non_zero number of non-zero eigenvalues of the operator. Hence, this number is smaller or equal to the size of the operator, e.g., the length of P. Later, we copy parts of the greens function to there, grarr = gr(:, Op_V(n_op,nf)%P, nf)
. As I read this line of code, we copy the columns, index by P to grarr. P can index more colomns than we actually need and this can/should lead to a segfault if the memory grarr(:,N_non_zero:size(P)) is not accessible for the program or it should override uncontrolled parts of the memory "owned" by the code.