From db363c9d800eec81ac0ddbf77dcdf703f270a7d2 Mon Sep 17 00:00:00 2001 From: Pablo San-Jose Date: Fri, 14 May 2021 19:25:26 +0200 Subject: [PATCH] bypass LAPACK bug in tests --- test/test_greens.jl | 14 ++++++-------- 1 file changed, 6 insertions(+), 8 deletions(-) diff --git a/test/test_greens.jl b/test/test_greens.jl index aa81e8a2..28ec48e0 100644 --- a/test/test_greens.jl +++ b/test/test_greens.jl @@ -21,33 +21,31 @@ end end @testset "greens singleshot spectra" begin - # Broken until https://github.com/Reference-LAPACK/lapack/issues/477 comes to julia h = LP.honeycomb() |> hamiltonian(hopping(1)) |> unitcell((1,-1), region = r->abs(r[2])<3) g = greens(h, Schur1D()) dos = [-imag(tr(g(w))) for w in range(-3.2, 3.2, length = 101)] @test all(x -> Quantica.chop(x) >= 0, dos) - # Broken until https://github.com/Reference-LAPACK/lapack/issues/477 comes to julia h = LP.honeycomb() |> hamiltonian(hopping(1, range = 2)) |> unitcell((1,-1), region = r->abs(r[2])<3) g = greens(h, Schur1D()) dos = [-imag(tr(g(w))) for w in range(-6, 6, length = 101)] @test all(x -> Quantica.chop(x) >= 0, dos) - # Broken until https://github.com/Reference-LAPACK/lapack/issues/477 comes to julia h = LatticePresets.honeycomb() |> hamiltonian(hopping(1)) |> unitcell((1,-1),(2,2)) |> wrap(2) g = greens(h, Schur1D()) dos = [-imag(tr(g(w))) for w in range(-3.2, 3.2, length = 101)] @test all(x -> Quantica.chop(x) >= 0, dos) # Broken until https://github.com/Reference-LAPACK/lapack/issues/477 comes to julia - h = LatticePresets.honeycomb() |> hamiltonian(hopping((r, dr) -> 1/(dr'*dr), range = 1)) |> unitcell((1,-1),(2,2)) |> wrap(2) - g = greens(h, Schur1D()) - dos = [-imag(tr(g(w))) for w in range(-3.2, 3.2, length = 101)] - @test all(x -> Quantica.chop(x) >= 0, dos) + if VERSION >= v"1.7.0-DEV" + h = LatticePresets.honeycomb() |> hamiltonian(hopping((r, dr) -> 1/(dr'*dr), range = 1)) |> unitcell((1,-1),(2,2)) |> wrap(2) + g = greens(h, Schur1D()) + dos = [-imag(tr(g(w))) for w in range(-3.2, 3.2, length = 101)] + @test all(x -> Quantica.chop(x) >= 0, dos) + end h = LP.honeycomb() |> hamiltonian(hopping(1)) |> unitcell((2,-2),(3,3)) |> unitcell(1, 1, indices = not(1)) |> wrap(2) g = greens(h, Schur1D()) - # @test_broken Quantica.chop(imag(tr(g(0.2)))) <= 0 g = greens(h, Schur1D()) @test Quantica.chop(imag(tr(g(0.2)))) <= 0 dos = [-imag(tr(g(w))) for w in range(-3.2, 3.2, length = 101)]