Skip to content

Use geqp3rk routine in LAPACK 3.12 for performing pqrfact  #60

@ajinkya-k

Description

@ajinkya-k

Starting in LAPACK v3.12.0, there is a routine geqp3rk (double precision subroutine here), that performs a truncated QR factorization based on of three stopping conditions:

  • kmax: if an integer kmax is provided, it provides a QR factorization truncated at kmax columns, i.e. its the same as pqrfact(A; sketch=:none, rank = kmax)
  • abstol: if provided stops when pivot element has value less than the tolerance, similar to pqrfact(A; sketch=:none, atol = abstol)
  • reltol: similar to above but uses reltol instead, similar to pqrfact(A; sketch=:none, rtol = reltol)

That is, there is now a lapack routine to do exactly what perfect does.

I think we should be using this going forward, since it seems to be a little bit faster than the Julia native implementation that is the function geqp3_adap_main!.

There is one major caveat: I am still not sure why but the R factor differs a little when the stopping criteria are abstol or reltol. Submitting a PR related to this.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions