diff --git a/Project.toml b/Project.toml index 3bbcdd9..67501e8 100644 --- a/Project.toml +++ b/Project.toml @@ -8,6 +8,7 @@ ArgParse = "c7e460c6-2fb9-53a9-8c5b-16f535851c63" Dagger = "d58978e5-989f-55fb-8d15-ea34adc7bf54" DataFrames = "a93c6f00-e57d-5684-b7b6-d8193f3e46c0" Distributed = "8ba89e20-285c-5b6f-9357-94700520ee1b" +DistributedNext = "fab6aee4-877b-4bac-a744-3eca44acbb6f" FileIO = "5789e2e9-d7fb-5bc7-8068-2c6fae9b9549" GraphMLReader = "8e6830a9-644c-4485-8539-40ee18e3ca8c" GraphViz = "f526b714-d49f-11e8-06ff-31ed36ee7ee0" @@ -15,6 +16,7 @@ Graphs = "86223c79-3864-5bf0-83f7-82e725a168b6" JSON3 = "0f8b85d8-7281-11e9-16c2-39a750bddbf1" MetaGraphs = "626554b9-1ddb-594c-aa3c-2596fe9399a5" Plots = "91a5bcdd-55d7-5caf-9e0b-520d859cae80" +Preferences = "21216c6a-2e73-6563-6e65-726566657250" Printf = "de0858da-6303-5e67-8744-51eddeeeb8d7" [sources.GraphMLReader] @@ -27,6 +29,7 @@ ArgParse = "1.2" Dagger = "0.18.13" DataFrames = "1.6" Distributed = "1.11" +DistributedNext = "1.0" FileIO = "1.16" GraphMLReader = "0.1" GraphViz = "0.2" @@ -35,6 +38,7 @@ JSON3 = "1.14" Logging = "1.11" MetaGraphs = "0.7, 0.8" Plots = "1.40" +Preferences = "1.4" Printf = "1.11" Test = "1.11" julia = "1.11" @@ -46,3 +50,10 @@ Test = "8dfed614-e22c-5e08-85e1-65c5234f0b40" [targets] test = ["Aqua", "Logging", "Test"] + +[preferences.Dagger] +distributed-package = "DistributedNext" +[preferences.MemPool] +distributed-package = "DistributedNext" +[preferences.TimespanLogging] +distributed-package = "DistributedNext" diff --git a/bin/schedule.jl b/bin/schedule.jl index 01355f5..1cf4939 100644 --- a/bin/schedule.jl +++ b/bin/schedule.jl @@ -1,6 +1,11 @@ #!/usr/bin/env julia -using Distributed +import Preferences +if Preferences.load_preference("Dagger", "distributed-package") == "DistributedNext" + using DistributedNext +else + using Distributed +end using Dagger using ArgParse using FrameworkDemo diff --git a/src/FrameworkDemo.jl b/src/FrameworkDemo.jl index 8f77357..e447038 100644 --- a/src/FrameworkDemo.jl +++ b/src/FrameworkDemo.jl @@ -1,5 +1,10 @@ module FrameworkDemo - +import Preferences +if Preferences.load_preference("Dagger", "distributed-package") == "DistributedNext" + using DistributedNext +else + using Distributed +end include("logging.jl") include("parsing.jl") include("scheduling.jl") diff --git a/src/scheduling.jl b/src/scheduling.jl index bda2057..d738110 100644 --- a/src/scheduling.jl +++ b/src/scheduling.jl @@ -1,5 +1,4 @@ import Dagger -using Distributed using MetaGraphs abstract type AbstractAlgorithm end diff --git a/test/runtests.jl b/test/runtests.jl index 4c678e0..2e91ad1 100644 --- a/test/runtests.jl +++ b/test/runtests.jl @@ -1,4 +1,9 @@ -using Distributed +import Preferences +if Preferences.load_preference("Dagger", "distributed-package") == "DistributedNext" + using DistributedNext +else + using Distributed +end using Test if abspath(PROGRAM_FILE) == @__FILE__ @@ -13,8 +18,8 @@ end @info("Execution environment details", julia_version=VERSION, - n_workers=Distributed.nworkers(), - n_procs=Distributed.nprocs(), + n_workers=nworkers(), + n_procs=nprocs(), n_threads=Threads.nthreads(), test_args=repr(ARGS))