From e44ef77ba4fc60ba7dbd0d588cacf8858443ad98 Mon Sep 17 00:00:00 2001 From: Anton Reinhard Date: Wed, 23 Aug 2023 13:38:02 +0200 Subject: [PATCH] Move input text files --- examples/import_bench.jl | 2 +- examples/plot_chain.jl | 2 +- examples/plot_star.jl | 2 +- {examples => input}/AB->AB.txt | 0 {examples => input}/AB->ABBB.txt | 0 {examples => input}/AB->ABBBBB.txt | 0 {examples => input}/AB->ABBBBBBB.txt | 0 {examples => input}/AB->ABBBBBBBBB.txt | Bin {examples => input}/ABAB->ABAB.txt | 0 {examples => input}/ABAB->ABC.txt | 0 results/FWKHIP8999 | 2 +- test/known_graphs.jl | 2 +- test/node_reduction.jl | 10 +++++----- 13 files changed, 10 insertions(+), 10 deletions(-) rename {examples => input}/AB->AB.txt (100%) rename {examples => input}/AB->ABBB.txt (100%) rename {examples => input}/AB->ABBBBB.txt (100%) rename {examples => input}/AB->ABBBBBBB.txt (100%) rename {examples => input}/AB->ABBBBBBBBB.txt (100%) rename {examples => input}/ABAB->ABAB.txt (100%) rename {examples => input}/ABAB->ABC.txt (100%) diff --git a/examples/import_bench.jl b/examples/import_bench.jl index c52463d..d199d28 100644 --- a/examples/import_bench.jl +++ b/examples/import_bench.jl @@ -7,7 +7,7 @@ function bench_txt(filepath::String, bench::Bool = true) name = basename(filepath) name, _ = splitext(name) - filepath = joinpath(@__DIR__, filepath) + filepath = joinpath(@__DIR__, "../input/", filepath) if !isfile(filepath) println("File ", filepath, " does not exist, skipping bench") return diff --git a/examples/plot_chain.jl b/examples/plot_chain.jl index f66861f..10b8a83 100644 --- a/examples/plot_chain.jl +++ b/examples/plot_chain.jl @@ -6,7 +6,7 @@ function gen_plot(filepath) name = basename(filepath) name, _ = splitext(name) - filepath = joinpath(@__DIR__, filepath) + filepath = joinpath(@__DIR__, "../input/", filepath) if !isfile(filepath) println("File ", filepath, " does not exist, skipping") return diff --git a/examples/plot_star.jl b/examples/plot_star.jl index dfc34cf..8c9495b 100644 --- a/examples/plot_star.jl +++ b/examples/plot_star.jl @@ -6,7 +6,7 @@ function gen_plot(filepath) name = basename(filepath) name, _ = splitext(name) - filepath = joinpath(@__DIR__, filepath) + filepath = joinpath(@__DIR__, "../input/", filepath) if !isfile(filepath) println("File ", filepath, " does not exist, skipping") return diff --git a/examples/AB->AB.txt b/input/AB->AB.txt similarity index 100% rename from examples/AB->AB.txt rename to input/AB->AB.txt diff --git a/examples/AB->ABBB.txt b/input/AB->ABBB.txt similarity index 100% rename from examples/AB->ABBB.txt rename to input/AB->ABBB.txt diff --git a/examples/AB->ABBBBB.txt b/input/AB->ABBBBB.txt similarity index 100% rename from examples/AB->ABBBBB.txt rename to input/AB->ABBBBB.txt diff --git a/examples/AB->ABBBBBBB.txt b/input/AB->ABBBBBBB.txt similarity index 100% rename from examples/AB->ABBBBBBB.txt rename to input/AB->ABBBBBBB.txt diff --git a/examples/AB->ABBBBBBBBB.txt b/input/AB->ABBBBBBBBB.txt similarity index 100% rename from examples/AB->ABBBBBBBBB.txt rename to input/AB->ABBBBBBBBB.txt diff --git a/examples/ABAB->ABAB.txt b/input/ABAB->ABAB.txt similarity index 100% rename from examples/ABAB->ABAB.txt rename to input/ABAB->ABAB.txt diff --git a/examples/ABAB->ABC.txt b/input/ABAB->ABC.txt similarity index 100% rename from examples/ABAB->ABC.txt rename to input/ABAB->ABC.txt diff --git a/results/FWKHIP8999 b/results/FWKHIP8999 index 6b671c8..001731f 100644 --- a/results/FWKHIP8999 +++ b/results/FWKHIP8999 @@ -24,7 +24,7 @@ Node Splits... Waiting... 0.000001 seconds 1.096006 seconds (581.46 k allocations: 38.180 MiB, 0.66% gc time, 1677.26% compilation time) - rvim umount + AB->ABBB: Graph: Nodes: Total: 280, ComputeTaskS2: 24, ComputeTaskU: 6, diff --git a/test/known_graphs.jl b/test/known_graphs.jl index beaca4b..b4cb310 100644 --- a/test/known_graphs.jl +++ b/test/known_graphs.jl @@ -2,7 +2,7 @@ using Random function test_known_graph(name::String, n, fusion_test=true) @testset "Test $name Graph ($n)" begin - graph = parse_abc(joinpath(@__DIR__, "..", "examples", "$name.txt")) + graph = parse_abc(joinpath(@__DIR__, "..", "input", "$name.txt")) props = graph_properties(graph) if (fusion_test) diff --git a/test/node_reduction.jl b/test/node_reduction.jl index 5b060df..decb724 100644 --- a/test/node_reduction.jl +++ b/test/node_reduction.jl @@ -61,7 +61,7 @@ import MetagraphOptimization.make_edge @test length(opt) == (nodeFusions = 6, nodeReductions = 1, nodeSplits = 1) - println("Initial State:\n", opt) + #println("Initial State:\n", opt) nr = first(opt.nodeReductions) @test Set(nr.input) == Set([B1C_1, B1C_2]) @@ -69,7 +69,7 @@ import MetagraphOptimization.make_edge opt = get_operations(graph) @test length(opt) == (nodeFusions = 4, nodeReductions = 1, nodeSplits = 1) - println("After 1 Node Reduction:\n", opt) + #println("After 1 Node Reduction:\n", opt) nr = first(opt.nodeReductions) @test Set(nr.input) == Set([B1D_1, B1D_2]) @@ -77,18 +77,18 @@ import MetagraphOptimization.make_edge opt = get_operations(graph) @test length(opt) == (nodeFusions = 4, nodeReductions = 0, nodeSplits = 1) - println("After 2 Node Reductions:\n", opt) + #println("After 2 Node Reductions:\n", opt) pop_operation!(graph) opt = get_operations(graph) @test length(opt) == (nodeFusions = 4, nodeReductions = 1, nodeSplits = 1) - println("After reverting the second Node Reduction:\n", opt) + #println("After reverting the second Node Reduction:\n", opt) reset_graph!(graph) opt = get_operations(graph) @test length(opt) == (nodeFusions = 6, nodeReductions = 1, nodeSplits = 1) - println("After reverting to the initial state:\n", opt) + #println("After reverting to the initial state:\n", opt) end println("Node Reduction Unit Tests Complete!")