-
Notifications
You must be signed in to change notification settings - Fork 1
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
Fast basis #287
Fast basis #287
Conversation
Pull Request Test Coverage Report for Build 12002034438Details
💛 - Coveralls |
Benchmark resultJudge resultBenchmark Report for /home/runner/work/Rimu.jl/Rimu.jlJob Properties
ResultsA ratio greater than
Benchmark Group ListHere's a list of all the benchmark groups executed by this job:
Julia versioninfoTarget
Baseline
Target resultBenchmark Report for /home/runner/work/Rimu.jl/Rimu.jlJob Properties
ResultsBelow is a table of this job's results, obtained by running the benchmarks.
Benchmark Group ListHere's a list of all the benchmark groups executed by this job:
Julia versioninfo
Baseline resultBenchmark Report for /home/runner/work/Rimu.jl/Rimu.jlJob Properties
ResultsBelow is a table of this job's results, obtained by running the benchmarks.
Benchmark Group ListHere's a list of all the benchmark groups executed by this job:
Julia versioninfo
Runtime information
Architecture: x86_64
Benchmark resultJudge resultBenchmark Report for /home/runner/work/Rimu.jl/Rimu.jlJob Properties
ResultsA ratio greater than
Benchmark Group ListHere's a list of all the benchmark groups executed by this job:
Julia versioninfoTarget
Baseline
Target resultBenchmark Report for /home/runner/work/Rimu.jl/Rimu.jlJob Properties
ResultsBelow is a table of this job's results, obtained by running the benchmarks.
Benchmark Group ListHere's a list of all the benchmark groups executed by this job:
Julia versioninfo
Baseline resultBenchmark Report for /home/runner/work/Rimu.jl/Rimu.jlJob Properties
ResultsBelow is a table of this job's results, obtained by running the benchmarks.
Benchmark Group ListHere's a list of all the benchmark groups executed by this job:
Julia versioninfo
Runtime information
Architecture: x86_64
Benchmark resultJudge resultBenchmark Report for /home/runner/work/Rimu.jl/Rimu.jlJob Properties
ResultsA ratio greater than
Benchmark Group ListHere's a list of all the benchmark groups executed by this job:
Julia versioninfoTarget
Baseline
Target resultBenchmark Report for /home/runner/work/Rimu.jl/Rimu.jlJob Properties
ResultsBelow is a table of this job's results, obtained by running the benchmarks.
Benchmark Group ListHere's a list of all the benchmark groups executed by this job:
Julia versioninfo
Baseline resultBenchmark Report for /home/runner/work/Rimu.jl/Rimu.jlJob Properties
ResultsBelow is a table of this job's results, obtained by running the benchmarks.
Benchmark Group ListHere's a list of all the benchmark groups executed by this job:
Julia versioninfo
Runtime information
Architecture: x86_64
Benchmark resultJudge resultBenchmark Report for /home/runner/work/Rimu.jl/Rimu.jlJob Properties
ResultsA ratio greater than
Benchmark Group ListHere's a list of all the benchmark groups executed by this job:
Julia versioninfoTarget
Baseline
Target resultBenchmark Report for /home/runner/work/Rimu.jl/Rimu.jlJob Properties
ResultsBelow is a table of this job's results, obtained by running the benchmarks.
Benchmark Group ListHere's a list of all the benchmark groups executed by this job:
Julia versioninfo
Baseline resultBenchmark Report for /home/runner/work/Rimu.jl/Rimu.jlJob Properties
ResultsBelow is a table of this job's results, obtained by running the benchmarks.
Benchmark Group ListHere's a list of all the benchmark groups executed by this job:
Julia versioninfo
Runtime information
Architecture: x86_64
Benchmark resultJudge resultBenchmark Report for /home/runner/work/Rimu.jl/Rimu.jlJob Properties
ResultsA ratio greater than
Benchmark Group ListHere's a list of all the benchmark groups executed by this job:
Julia versioninfoTarget
Baseline
Target resultBenchmark Report for /home/runner/work/Rimu.jl/Rimu.jlJob Properties
ResultsBelow is a table of this job's results, obtained by running the benchmarks.
Benchmark Group ListHere's a list of all the benchmark groups executed by this job:
Julia versioninfo
Baseline resultBenchmark Report for /home/runner/work/Rimu.jl/Rimu.jlJob Properties
ResultsBelow is a table of this job's results, obtained by running the benchmarks.
Benchmark Group ListHere's a list of all the benchmark groups executed by this job:
Julia versioninfo
Runtime information
Architecture: x86_64
Benchmark resultJudge resultBenchmark Report for /home/runner/work/Rimu.jl/Rimu.jlJob Properties
ResultsA ratio greater than
Benchmark Group ListHere's a list of all the benchmark groups executed by this job:
Julia versioninfoTarget
Baseline
Target resultBenchmark Report for /home/runner/work/Rimu.jl/Rimu.jlJob Properties
ResultsBelow is a table of this job's results, obtained by running the benchmarks.
Benchmark Group ListHere's a list of all the benchmark groups executed by this job:
Julia versioninfo
Baseline resultBenchmark Report for /home/runner/work/Rimu.jl/Rimu.jlJob Properties
ResultsBelow is a table of this job's results, obtained by running the benchmarks.
Benchmark Group ListHere's a list of all the benchmark groups executed by this job:
Julia versioninfo
Runtime information
Architecture: x86_64 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good so far, but I haven't looked at MatrixBuilder properly yet. Just some comments and questions otherwise
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
A couple of comments. I'll need to find more time to read the code. So far this looks very nice.
- The keyword argument
max_depth
is not yet documented. It should be added to the docstrings ofbuild_basis
,build_sparse_matrix_from_LO
andBasisSetRepresentation
. - I found a minor performance regression for building a matrix with dimension 3000 (
ExtendedHubbardReal1D
withFermiFS{7,14}
):
New code (running with 4 threads):
julia> @benchmark sparse(h)
BenchmarkTools.Trial: 1202 samples with 1 evaluation.
Range (min … max): 3.452 ms … 21.207 ms ┊ GC (min … max): 0.00% … 81.37%
Time (median): 3.874 ms ┊ GC (median): 0.00%
Time (mean ± σ): 4.158 ms ± 1.034 ms ┊ GC (mean ± σ): 6.51% ± 11.58%
▁▅▇██▇▆▅▂ ▁
▇██████████▆▄▅▆██▇▆▇▇▇▄▆▄▄▆▇▆▇▇▆▇▇▅▄▇▆▆▅▇▆▆▆▁▅▆▆▆▁▆▁▄▁▄▁▅▄ █
3.45 ms Histogram: log(frequency) by time 7.76 ms <
Memory estimate: 2.46 MiB, allocs estimate: 830.
develop
branch:
julia> @benchmark sparse(h)
BenchmarkTools.Trial: 1551 samples with 1 evaluation.
Range (min … max): 2.822 ms … 12.322 ms ┊ GC (min … max): 0.00% … 74.36%
Time (median): 3.009 ms ┊ GC (median): 0.00%
Time (mean ± σ): 3.222 ms ± 610.801 μs ┊ GC (mean ± σ): 7.04% ± 11.34%
▂▆▇█▇▆▅▄▂ ▁▃▂▁ ▁ ▁ ▁
█████████▇▇▁▁▅▁▅▆▇██████████▇▆▆▇▄▇▇▅▇▅▆▄▆▁▆▄▆▄▅▅▁▄▁▁▁▅▄▅▅▁▅ █
2.82 ms Histogram: log(frequency) by time 5.41 ms <
Memory estimate: 3.60 MiB, allocs estimate: 131.
However, this may be acceptable as the situation reverses for a BoseFS{10,10}
with a dimension of ~92,000 (where the new code is faster).
build_basis
called on the address is now really fast. I like it!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice work. What a substantial PR!
See comments below.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks and runs great!
It would be great to enable the new keyword arguments max_depth
and stop_after
to be used in ExactDiagonalizationProblem
as well. Other arguments accepted by BasisSetRepresentation
are already passed through. See init_and_solvers.jl
lines 99-116 and the docstring of ExactDiagonalizationProblem
.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It looks good now.
I noticed that a couple of branches in basis_fock.jl
are missed by the tests. It would be good to see them covered.
Also, it looks like you got to manually merge develop
after the excited states PR was merged.
71eec68
to
21c2d2d
Compare
Pull Request Test Coverage Report for Build 12190887807Details
💛 - Coveralls |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks great and ready to be merged.
New features
build_basis
andbuild_sparse_matrix_from_LO
are now parallel.build_basis
andbuild_sparse_matrix_from_LO
now support an argumentmax_depth
which limits the number of steps of the breadth first search to perform.build_basis(::AbstractFockAddress)
which is much faster.Bugfixes
OccupationNumberFS
now has the same ordering asBoseFS
.MatrixHamiltonian
would not work with sparse matrices that have implicit zeros on the diagonal.