updated version of inv_eigcg_quda.cpp