Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

RFC: Move iterative eigensolvers to the stdlib #24714

Merged
merged 1 commit into from
Nov 26, 2017
Merged

RFC: Move iterative eigensolvers to the stdlib #24714

merged 1 commit into from
Nov 26, 2017

Conversation

ararslan
Copy link
Member

@ararslan ararslan commented Nov 22, 2017

This PR moves eigs and svds into an Arnoldi package in the stdlib. This was very self-contained and was a pretty easy move. Julia's binary dependency on ARPACK is now only for this package, which can eventually be moved out entirely. thereby eliminating a GPL-licensed binary dependency. (Just kidding, ARPACK is 3-clause BSD.)

There might be a couple of uses of eigs that I missed, hence WIP. Done.

@ararslan ararslan added excision Removal of code from Base or the repository linear algebra Linear algebra stdlib Julia's standard library labels Nov 22, 2017
@ararslan ararslan force-pushed the aa/arnoldi branch 2 times, most recently from efc27ab to e61914f Compare November 22, 2017 22:49
@@ -127,9 +127,6 @@ function choosetests(choices = [])
"linalg/generic", "linalg/uniformscaling", "linalg/lq",
"linalg/hessenberg", "linalg/rowvector", "linalg/conjarray",
"linalg/blas"]
if Base.USE_GPL_LIBS
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is confusing to me. ARPACK is not GPL-licensed, so why did we only test the Arnoldi stuff if we were using GPL libraries?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Guessing: maybe because it depends on SuiteSparse which is partly GPL?

Copy link
Member Author

@ararslan ararslan Nov 23, 2017

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That would make sense. I guess I should modify the stdlib tests then to only run Arnoldi when we're okay with using GPL libraries? (i.e. when Base.USE_GPL_LIBS is true)

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

So ARPACK as such doesn't depend on anything in SuiteSparse but the wrappers use factorizations and when the input is sparse, which is the case in some of the tests, then the wrappers use sparse factorizations from SuiteSparse.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, the shift and invert solvers need SuiteSparse.

@ararslan ararslan changed the title WIP: Move Arnoldi iteration to the stdlib RFC: Move Arnoldi iteration to the stdlib Nov 23, 2017
@andreasnoack
Copy link
Member

So the way to think of arpack.jl and arnoldi.jl is that arpack.jl is like blas.jl and lapack.jl, i.e. fairly low-level wrappers of Fortran subroutines while arnoldi.jl is like cholesky.jl, qr.jl, and lu.jl, i.e. higher level functionality that utilizes the wrappers in arpack.jl.

We should consider a more recognizable name than Arnoldi for the module because many of the users of eigs will have no idea what Arnoldi is. Although these methods are (almost) agnostic to the storage format, it might be an idea to call it SparseEigen or something like that because they are most often used with sparse matrices. Any thoughts @Sacha0 and @fredrikekre?

@fredrikekre
Copy link
Member

We should consider a more recognizable name than Arnoldi

Yes, I also think that Arnoldi is a bad name. I suggested simply ARPACK in slack/linalg, but as @ararslan pointed out we are not wrapping all of ARPACK (but perhaps that will change in the future, and then ARPACK would be an appropriate name). Brainstorming some other names: EigenIterations, IterativeEigen, IterativeEigenSolvers. I kind of like EigenIterations.

@stevengj
Copy link
Member

We should also avoid a name that sounds like it is about iterators. Maybe EigSubspace?

@Sacha0
Copy link
Member

Sacha0 commented Nov 23, 2017

A better name than Arnoldi would be great. @fredrikekre's IterativeEigenSolvers strikes me as the most descriptive and accurate from those above. Best!

@ararslan
Copy link
Member Author

IterativeEigenSolvers seems fine, though it's quite similar to JuliaMath/IterativeSolvers (not sure whether that's good or bad). According to Andreas, we do wrap most of ARPACK, but I suppose I would expect a package with a name like ARPACK to be a lower level wrapper over the library rather than providing higher level APIs as we do in this package.

I'm pretty indifferent toward what this is called, so once a consensus is reached I'll just move forward with the agreed upon name.

@Sacha0
Copy link
Member

Sacha0 commented Nov 23, 2017

I would expect a package with a name like ARPACK to be a lower level wrapper over the library rather than providing higher level APIs as we do in this package.

Likewise, i.e. I would expect the package IterativeEigenSolvers to potentially implement some subset of its operations via calls to the package ARPACK. Best

@ViralBShah
Copy link
Member

I thought that eventually, the ARPACK wrappers would move to ARPACK.jl, and the rest of the higher level functionality would move to IterativeSolvers.jl.

@ararslan
Copy link
Member Author

That also seems like a good option.

@ViralBShah
Copy link
Member

Let's go ahead with IterativeEigenSolvers for now, and get this done.

@ararslan
Copy link
Member Author

Sounds great. Thanks all for the feedback.

@ararslan ararslan changed the title RFC: Move Arnoldi iteration to the stdlib RFC: Move iterative eigensolvers to the stdlib Nov 25, 2017
@ararslan ararslan force-pushed the aa/arnoldi branch 3 times, most recently from d40d009 to af67190 Compare November 25, 2017 23:26
@ararslan
Copy link
Member Author

CI failures are unrelated (32-bit Windows couldn't connect, macOS couldn't load OpenBLAS). Unless there are any further comments, I plan to merge this soon.

Copy link
Member

@Sacha0 Sacha0 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks great! Thanks @ararslan! :)

@ararslan ararslan merged commit eace3e9 into master Nov 26, 2017
@ararslan ararslan deleted the aa/arnoldi branch November 26, 2017 19:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
excision Removal of code from Base or the repository linear algebra Linear algebra stdlib Julia's standard library
Projects
None yet
Development

Successfully merging this pull request may close these issues.

7 participants