Undefined behaviour in `magma_z_precond`

Issue #17 new
codecircuit created an issue

The object psolver_par declared here: https://bitbucket.org/icl/magma/src/2450379e9843ba0a59f21170fd4407c7ff283c6c/sparse/src/magma_z_precond_wrapper.cpp#lines-60

Is initialized with some members variables of object *precond , but psolver_par.atol is not initialized, but used in case of solver Magma_BICGSTAB here https://bitbucket.org/icl/magma/src/2450379e9843ba0a59f21170fd4407c7ff283c6c/sparse/src/zbicgstab.cpp#lines-165

In the worst case the solver stops immediately, because atol has some randomly high value.

My suggestion is to add psolver_par.atol = precond->atol; after line https://bitbucket.org/icl/magma/src/2450379e9843ba0a59f21170fd4407c7ff283c6c/sparse/src/magma_z_precond_wrapper.cpp#lines-60

Then it is up to the user to initialize the precond->atol variable correctly.

Comments (1)

  1. Log in to comment