Hi, the above prints to stdout// Inputs:

// Eigen::SparseMatrix<double> A

// Eigen::VectorXd b

magma_dopts opts;

// Choose a solver, preconditioner, etc. - see documentation for options.

opts.solver_par.solver = Magma_PIDRMERGE;

opts.solver_par.restart = 8;

opts.solver_par.maxiter = 1000;

opts.solver_par.rtol = 1e-10;

opts.solver_par.maxiter = 1000;

opts.precond_par.solver = Magma_ILU;

opts.precond_par.levels = 0;

opts.precond_par.trisolver = Magma_CUSOLVE;

magma_d_matrix mA = { Magma_CSR };

magma_d_matrix mb = { Magma_CSR };

magma_d_matrix mx = { Magma_CSR };

magma_queue_t queue; // opaque queue structure

magma_queue_create(0, &queue);

cout << "Solving A(" << A.rows() << ", " << A.cols() << ") . x = b(" << b.size() << ", 1)" << endl;

// Pass the system to MAGMA.

magma_dcsrset(A.rows(), A.cols(), Arows.data(), Acols.data(), Avals.data(), &mA, queue);

magma_dvset(b.rows(), 1, b.data(), &mb, queue);

// Generate the preconditioner.

//magma_d_precondsetup(mA, mb, &opts.solver_par, &opts.precond_par, queue);

magma_dlsqr(mA, mb, &mx, &opts.solver_par, &opts.precond_par, queue);

cout << "Solved." << endl;

Code: Select all

```
Solving A(732, 380) . x = b(732, 1)
Memory Free Error.
Memory Free Error.
Memory Free Error.
```

Can you quickly spot something that is "obviously" missing?

Thank you