Skip to content

Commit

Permalink
Merge branch 'lp/fix-tests' of https://github.com/euro-hpc-pl/SpinGla…
Browse files Browse the repository at this point in the history
…ssEngine.jl into lp/fix-tests
  • Loading branch information
tomsmierz committed Apr 7, 2024
2 parents 500a3ac + fc88048 commit bd59d6c
Show file tree
Hide file tree
Showing 9 changed files with 10 additions and 36 deletions.
4 changes: 0 additions & 4 deletions test/chimera_overlap_python.jl
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,6 @@ using SpinGlassNetworks
using SpinGlassTensors
using SpinGlassEngine

function my_brute_force(ig::IsingGraph; num_states::Int)
brute_force(ig, onGPU ? :GPU : :CPU, num_states=num_states)
end

m = 4
n = 4
t = 8
Expand Down
4 changes: 4 additions & 0 deletions test/runtests.jl
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,10 @@ push!(my_tests,
# "experimental/gauges.jl"
)

function my_brute_force(ig::IsingGraph; num_states::Int)
brute_force(ig, onGPU ? :GPU : :CPU, num_states=num_states)
end

@time begin
for my_test my_tests
include(my_test)
Expand Down
4 changes: 0 additions & 4 deletions test/search_chimera_droplets.jl
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,6 @@ using SpinGlassEngine

using SpinGlassExhaustive

function my_brute_force(ig::IsingGraph; num_states::Int)
brute_force(ig, onGPU ? :GPU : :CPU, num_states=num_states)
end

function bench(instance::String)
m, n, t = 16, 16, 8

Expand Down
4 changes: 0 additions & 4 deletions test/search_pegasus_droplets.jl
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,6 @@ using SpinGlassEngine

using SpinGlassExhaustive

function my_brute_force(ig::IsingGraph; num_states::Int)
brute_force(ig, onGPU ? :GPU : :CPU, num_states=num_states)
end

function bench(instance::String)
m, n, t = 3, 3, 3

Expand Down
4 changes: 1 addition & 3 deletions test/search_pegasus_nodiag_square_cross.jl
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
using SpinGlassExhaustive

function my_brute_force(ig::IsingGraph; num_states::Int)
brute_force(ig, onGPU ? :GPU : :CPU, num_states=num_states)
end


function bench(instance::String)
m, n, t = 4, 4, 24
Expand Down
4 changes: 0 additions & 4 deletions test/search_pegasus_square_cross.jl
Original file line number Diff line number Diff line change
@@ -1,9 +1,5 @@
using SpinGlassExhaustive

function my_brute_force(ig::IsingGraph; num_states::Int)
brute_force(ig, onGPU ? :GPU : :CPU, num_states=num_states)
end

function bench(instance::String)
m, n, t = 2, 2, 24

Expand Down
10 changes: 3 additions & 7 deletions test/search_square_double_node_basic.jl
Original file line number Diff line number Diff line change
@@ -1,10 +1,6 @@
using SpinGlassEngine

# function my_brute_force(ig::IsingGraph; num_states::Int)
# brute_force(ig, onGPU ? :GPU : :CPU, num_states=num_states)
# end

function run_test(instance, m, n, t)
function run_test_square_double_node(instance, m, n, t)
β = 2
bond_dim = 16
δp = 1e-10
Expand Down Expand Up @@ -80,12 +76,12 @@ end

instance = "$(@__DIR__)/instances/pegasus_nondiag/3x2x1.txt"
m, n, t = 3, 2, 1
run_test(instance, m, n, t)
run_test_square_double_node(instance, m, n, t)

# instance = "$(@__DIR__)/instances/chimera_droplets/128power/001.txt"
# m, n, t = 4, 4, 1
# run_test(instance, m, n, t)

instance = "$(@__DIR__)/instances/pathological/pegasus_nd_3_4_1.txt"
m, n, t = 3, 4, 1
run_test(instance, m, n, t)
run_test_square_double_node(instance, m, n, t)
4 changes: 0 additions & 4 deletions test/search_square_lattice.jl
Original file line number Diff line number Diff line change
@@ -1,9 +1,5 @@
using SpinGlassExhaustive

function my_brute_force(ig::IsingGraph; num_states::Int)
brute_force(ig, onGPU ? :GPU : :CPU, num_states=num_states)
end

function bench(instance::String)
m, n, t = 5, 5, 4

Expand Down
8 changes: 2 additions & 6 deletions test/search_squarecross_double_node_basic.jl
Original file line number Diff line number Diff line change
@@ -1,11 +1,7 @@
using SpinGlassEngine
using Test

# function my_brute_force(ig::IsingGraph; num_states::Int)
# brute_force(ig, onGPU ? :GPU : :CPU, num_states=num_states)
# end

function run_test(instance, m, n, t)
function run_test_squarecross_double_node(instance, m, n, t)
β = 2
bond_dim = 16
δp = 1e-10
Expand Down Expand Up @@ -84,4 +80,4 @@ end

instance = "$(@__DIR__)/instances/pathological/pegasus_3_4_1.txt"
m, n, t = 3, 4, 1
run_test(instance, m, n, t)
run_test_squarecross_double_node(instance, m, n, t)

0 comments on commit bd59d6c

Please sign in to comment.