Skip to content

Commit

Permalink
use DistributedNext
Browse files Browse the repository at this point in the history
  • Loading branch information
m-fila committed Dec 5, 2024
1 parent c4d86c8 commit b77d6d6
Show file tree
Hide file tree
Showing 5 changed files with 31 additions and 6 deletions.
11 changes: 11 additions & 0 deletions Project.toml
Original file line number Diff line number Diff line change
Expand Up @@ -8,13 +8,15 @@ 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"
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]
Expand All @@ -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"
Expand All @@ -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"
Expand All @@ -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"
7 changes: 6 additions & 1 deletion bin/schedule.jl
Original file line number Diff line number Diff line change
@@ -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
Expand Down
7 changes: 6 additions & 1 deletion src/FrameworkDemo.jl
Original file line number Diff line number Diff line change
@@ -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")
Expand Down
1 change: 0 additions & 1 deletion src/scheduling.jl
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
import Dagger
using Distributed
using MetaGraphs

abstract type AbstractAlgorithm end
Expand Down
11 changes: 8 additions & 3 deletions test/runtests.jl
Original file line number Diff line number Diff line change
@@ -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__
Expand All @@ -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))

Expand Down

0 comments on commit b77d6d6

Please sign in to comment.