Installing Arpack in the containers #3323
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Proposed changes
Installs Arpack in the containers
Why we need Arpack
Short version
Using Arpack makes the finding the spin of black hole with highly deformed horizons much faster.
Slightly longer version
StrahlkorperGr needs to solve a generalized eigenvalue problem (M x = \lambda B x) to find the spin of a Black Hole. Right now we are using Lapack's dggev to solve this but dggev has a very bad scaling O(L^6), where L is the highest degree spherical harmonic used to describe the horizon. The reason dggev is not ideal for us is because it finds all the eigenvectors of the system while we only need those corresponding to the three smallest eigenvalues.
In Arpack we can specify the eigenvectors that we want and it will solve only for those. Because the matrices that we are working with can get quite large (number of rows = L^2) there is a significant time difference in finding all the eigenvectors and finding just the three that we need.
Two most costly steps in finding the spin are generation of the matrices (M and B) and then solving the eigenvalue problem.
When L is around 80, dggev takes close to 30minutes to run and the matrix generation takes around 2mins. If we use Arpack then the time to find the three eigenvectors goes below 10seconds (majority of this is doing the LU decomposition required by Arpack) and the matrix generation still takes 2mins. Thus, we reduce the total time from 30mins to 2mins.
Note that this becomes relevant only when L goes beyond 60-70. Before that the generation of the matrices is the slowest step. Another advantage is that the matrix generation, which is the bottleneck when using Arpack, scales as O(L^4) unlike dggev which scales as O(L^6).
#3211 is the PR which replaces dggev with Arpack