added support for arbitrary number of restarts (in the initCG stage) and support for magma-1.5.x library