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

Superlinear scaling of build time for ParametricHamiltonians #65

Closed
pablosanjose opened this issue Jun 12, 2020 · 1 comment · Fixed by #198
Closed

Superlinear scaling of build time for ParametricHamiltonians #65

pablosanjose opened this issue Jun 12, 2020 · 1 comment · Fixed by #198

Comments

@pablosanjose
Copy link
Owner

It seems the scaling with system size of the build time of a ParametricHamiltonian is quite bad. While allocations are perfectly under control, build time seems to be quite superlinear with the number of sites. This leads to unacceptable overhead when combining them with O(N) methods such as KPM.

(Thanks @fernandopenaranda for the heads up!)

@pablosanjose
Copy link
Owner Author

Upon a quick check I cannot confirm this with latest master in Julia 1.7.

julia> h! = @hopping!((t; x) -> x*t)

julia> @btime LP.honeycomb() |> hamiltonian(hopping(1)) |> unitcell(100, 100) |> parametric(h!);
  12.787 ms (612 allocations: 13.27 MiB)

julia> @btime LP.honeycomb() |> hamiltonian(hopping(1)) |> unitcell(100, 200) |> parametric(h!);
  25.778 ms (629 allocations: 24.21 MiB)

julia> @btime LP.honeycomb() |> hamiltonian(hopping(1)) |> unitcell(100, 300) |> parametric(h!);
  39.227 ms (641 allocations: 36.18 MiB)

julia> @btime LP.honeycomb() |> hamiltonian(hopping(1)) |> unitcell(100, 400) |> parametric(h!);
  48.913 ms (646 allocations: 44.09 MiB)

Seems linear to me.

@fernandopenaranda, could you confirm this is still an issue?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant