From 0f3e4311b33090190b7b224e37947b82e48d5a90 Mon Sep 17 00:00:00 2001 From: Marek Kaluba Date: Mon, 19 Feb 2024 18:47:29 +0100 Subject: [PATCH] =?UTF-8?q?add=20scripts=20for=20SpNZ=20and=20G=E2=82=82?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- scripts/G₂_Adj.jl | 16 ++++++++-------- scripts/SpNZ_has_T.jl | 13 ++++++------- scripts/SpN_Adj.jl | 29 ++++++++++++++--------------- 3 files changed, 28 insertions(+), 30 deletions(-) diff --git a/scripts/G₂_Adj.jl b/scripts/G₂_Adj.jl index 8a499d0..3594b78 100644 --- a/scripts/G₂_Adj.jl +++ b/scripts/G₂_Adj.jl @@ -1,17 +1,17 @@ using LinearAlgebra -BLAS.set_num_threads(8) -using MKL_jll +BLAS.set_num_threads(4) ENV["OMP_NUM_THREADS"] = 4 +include(joinpath(@__DIR__, "../test/optimizers.jl")) +using SCS_MKL_jll using Groups import Groups.MatrixGroups -include(joinpath(@__DIR__, "../test/optimizers.jl")) using PropertyT -using PropertyT.SymbolicWedderburn -using PropertyT.PermutationGroups -using PropertyT.StarAlgebras +import PropertyT.SW as SW +using PropertyT.PG +using PropertyT.SA include(joinpath(@__DIR__, "argparse.jl")) include(joinpath(@__DIR__, "utils.jl")) @@ -31,10 +31,10 @@ RG, S, sizes = @time PropertyT.group_algebra(G, halfradius = HALFRADIUS) @info "computing WedderburnDecomposition" wd = let Σ = Weyl, RG = RG act = PropertyT.AlphabetPermutation{eltype(Σ),Int64}( - Dict(g => PermutationGroups.perm(g) for g in Σ), + Dict(g => PermutationGroups.AP.perm(g) for g in Σ), ) - @time SymbolicWedderburn.WedderburnDecomposition( + @time SW.WedderburnDecomposition( Float64, Σ, act, diff --git a/scripts/SpNZ_has_T.jl b/scripts/SpNZ_has_T.jl index 7a40d27..6c9d173 100644 --- a/scripts/SpNZ_has_T.jl +++ b/scripts/SpNZ_has_T.jl @@ -1,18 +1,17 @@ using LinearAlgebra -using MKL_jll BLAS.set_num_threads(4) - ENV["OMP_NUM_THREADS"] = 4 +include(joinpath(@__DIR__, "../test/optimizers.jl")) +using SCS_MKL_jll using Groups import Groups.MatrixGroups -include(joinpath(@__DIR__, "../test/optimizers.jl")) using PropertyT -using PropertyT.SymbolicWedderburn -using PropertyT.PermutationGroups -using PropertyT.StarAlgebras +import PropertyT.SW as SW +using PropertyT.PG +using PropertyT.SA include(joinpath(@__DIR__, "argparse.jl")) include(joinpath(@__DIR__, "utils.jl")) @@ -36,7 +35,7 @@ wd = let RG = RG, N = N Σ = Groups.Constructions.WreathProduct(PermGroup(perm"(1,2)"), P) act = PropertyT.action_by_conjugation(G, Σ) - wdfl = @time SymbolicWedderburn.WedderburnDecomposition( + wdfl = @time SW.WedderburnDecomposition( Float64, Σ, act, diff --git a/scripts/SpN_Adj.jl b/scripts/SpN_Adj.jl index 35b9a6b..bc73354 100644 --- a/scripts/SpN_Adj.jl +++ b/scripts/SpN_Adj.jl @@ -1,17 +1,17 @@ using LinearAlgebra -BLAS.set_num_threads(8) - -ENV["OMP_NUM_THREADS"] = 1 +BLAS.set_num_threads(4) +ENV["OMP_NUM_THREADS"] = 4 +include(joinpath(@__DIR__, "../test/optimizers.jl")) +using SCS_MKL_jll using Groups import Groups.MatrixGroups -include(joinpath(@__DIR__, "../test/optimizers.jl")) using PropertyT -using PropertyT.SymbolicWedderburn -using PropertyT.PermutationGroups -using PropertyT.StarAlgebras +import PropertyT.SW as SW +using PropertyT.PG +using PropertyT.SA include(joinpath(@__DIR__, "argparse.jl")) include(joinpath(@__DIR__, "utils.jl")) @@ -20,30 +20,29 @@ const N = parsed_args["N"] const HALFRADIUS = parsed_args["halfradius"] const UPPER_BOUND = parsed_args["upper_bound"] -const GENUS = 2N - -G = MatrixGroups.SymplecticGroup{GENUS}(Int8) +G = MatrixGroups.SymplecticGroup{2N}(Int8) +@info "Running Adj_C₂ - λ·Δ sum of squares decomposition for " G +@info "computing group algebra structure" RG, S, sizes = @time PropertyT.group_algebra(G, halfradius = HALFRADIUS) +@info "computing WedderburnDecomposition" wd = let RG = RG, N = N G = StarAlgebras.object(RG) P = PermGroup(perm"(1,2)", Perm(circshift(1:N, -1))) Σ = Groups.Constructions.WreathProduct(PermGroup(perm"(1,2)"), P) - # Σ = P act = PropertyT.action_by_conjugation(G, Σ) - @info "Computing WedderburnDecomposition" - wdfl = @time SymbolicWedderburn.WedderburnDecomposition( + wdfl = @time SW.WedderburnDecomposition( Float64, Σ, act, basis(RG), StarAlgebras.Basis{UInt16}(@view basis(RG)[1:sizes[HALFRADIUS]]), ) - @info wdfl wdfl end +@info wd Δ = RG(length(S)) - sum(RG(s) for s in S) Δs = PropertyT.laplacians( @@ -72,7 +71,7 @@ solve_in_loop( logdir = "./log/Sp($N,Z)/r=$HALFRADIUS/Adj_C₂-$(UPPER_BOUND)Δ", optimizer = cosmo_optimizer(; eps = 1e-10, - max_iters = 20_000, + max_iters = 50_000, accel = 50, alpha = 1.95, ),