diff --git a/benchmarks/pegasus_rau_bench.jl b/benchmarks/pegasus_rau_bench.jl index 7093e756..8b8e182f 100644 --- a/benchmarks/pegasus_rau_bench.jl +++ b/benchmarks/pegasus_rau_bench.jl @@ -1,23 +1,26 @@ -using MPI +#using MPI using LinearAlgebra using MKL using SpinGlassEngine using SpinGlassNetworks using SpinGlassTensors -using SpinGlassExhaustive +#using SpinGlassExhaustive using Logging using CSV using DataFrames using Memoization using JSON3 +#= function brute_force_gpu(ig::IsingGraph; num_states::Int) brute_force(ig, :GPU, num_states=num_states) end +=# + +#MPI.Init() +size = 1 #MPI.Comm_size(MPI.COMM_WORLD) +rank = 0 #MPI.Comm_rank(MPI.COMM_WORLD) -MPI.Init() -size = MPI.Comm_size(MPI.COMM_WORLD) -rank = MPI.Comm_rank(MPI.COMM_WORLD) M, N, T = 7, 7, 3 INSTANCE_DIR = "$(@__DIR__)/../test/instances/pegasus_random/P8/RAU/SpinGlass/inst3-5" @@ -29,10 +32,10 @@ end BETAS = [0.5,] LAYOUT = (GaugesEnergy,) -TRANSFORM = all_lattice_transformations +TRANSFORM = all_lattice_transformations GAUGE = NoUpdate -STRATEGY = Zipper +STRATEGY = Zipper SPARSITY = Sparse graduate_truncation = :graduate_truncate @@ -48,10 +51,11 @@ ITERS_VAR = 1 DTEMP_MULT = 2 METHOD = :psvd_sparse I = [1,] -eng = [40, ] -hamming_dist = 74 +eng = [40, ] +hamming_dist = 74 + disable_logging(LogLevel(1)) -BLAS.set_num_threads(1) +#BLAS.set_num_threads(1) function pegasus_sim(inst, trans, β, Layout, bd, ms, eng, hamming_dist, mstates) δp = 0.0 @@ -61,7 +65,7 @@ function pegasus_sim(inst, trans, β, Layout, bd, ms, eng, hamming_dist, mstates spectrum=full_spectrum, cluster_assignment_rule=pegasus_lattice((M, N, T)) ) - + params = MpsParameters(bd, VAR_TOL, ms, TOL_SVD, ITERS_SVD, ITERS_VAR, DTEMP_MULT, METHOD) search_params = SearchParameters(mstates, δp) @@ -87,7 +91,7 @@ function run_bench(inst::String, β::Real, t, l, bd, ms, eng, hamming_dist, msta else data = try tic_toc = @elapsed sol, ctr, cRAM, schmidts, ldrop, droplets, ig_states = pegasus_sim(inst, t, β, l, bd, ms, eng, hamming_dist, mstates) - + data = DataFrame( :instance => inst, :β => β, diff --git a/benchmarks/run_bench.sh b/benchmarks/run_bench.sh index f7167e3f..6dd0a1de 100755 --- a/benchmarks/run_bench.sh +++ b/benchmarks/run_bench.sh @@ -1 +1 @@ - mpiexec -n 1 ~/julia-1.8.1/bin/julia ./pegasus_rau_bench.jl + mpiexec -n 1 ~/julia-1.9.0/bin/julia ./pegasus_rau_bench.jl