You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: src/studies/TGLF_database.jl
+1-1Lines changed: 1 addition & 1 deletion
Original file line number
Diff line number
Diff line change
@@ -68,7 +68,7 @@ function _run(study::StudyTGLFdb)
68
68
sty = study.sty
69
69
act = study.act
70
70
71
-
@assert sty.n_workers == length(Distributed.workers()) "The number of workers = $(length(Distributed.workers())) isn't the number of workers you requested = $(sty.n_workers)"
71
+
@assert (sty.n_workers ==0|| sty.n_workers ==length(Distributed.workers())) "The number of workers = $(length(Distributed.workers())) isn't the number of workers you requested = $(sty.n_workers)"
72
72
@assert ismissing(getproperty(sty, :sat_rules, missing)) ⊻ ismissing(getproperty(sty, :custom_tglf_models, missing)) "Specify either sat_rules or custom_tglf_models"
Copy file name to clipboardExpand all lines: src/studies/database_generator.jl
+1-1Lines changed: 1 addition & 1 deletion
Original file line number
Diff line number
Diff line change
@@ -69,7 +69,7 @@ Runs the DatabaseGenerator with sty settings in parallel on designated cluster
69
69
function _run(study::StudyDatabaseGenerator)
70
70
sty = study.sty
71
71
72
-
@assert sty.n_workers == length(Distributed.workers()) "The number of workers = $(length(Distributed.workers())) isn't the number of workers you requested = $(sty.n_workers)"
72
+
@assert (sty.n_workers ==0|| sty.n_workers ==length(Distributed.workers())) "The number of workers = $(length(Distributed.workers())) isn't the number of workers you requested = $(sty.n_workers)"
73
73
74
74
if typeof(study.ini) <:ParametersAllInits&& typeof(study.act) <:ParametersAllActors
@@ -47,12 +46,12 @@ Runs the Postdictive study with sty settings in parallel on designated cluster
47
46
function _run(study::StudyPostdictive)
48
47
sty = study.sty
49
48
50
-
@assert sty.n_workers == length(Distributed.workers()) "The number of workers = $(length(Distributed.workers())) isn't the number of workers you requested = $(sty.n_workers)"
49
+
@assert (sty.n_workers ==0|| sty.n_workers ==length(Distributed.workers())) "The number of workers = $(length(Distributed.workers())) isn't the number of workers you requested = $(sty.n_workers)"
51
50
52
51
# parallel run
53
52
println("running $(length(sty.shots)) postdictive simulations with $(sty.n_workers) workers on $(sty.server)")
Copy file name to clipboardExpand all lines: src/studies/multi_objective_optimization.jl
+1-1Lines changed: 1 addition & 1 deletion
Original file line number
Diff line number
Diff line change
@@ -62,7 +62,7 @@ end
62
62
function _run(study::StudyMultiObjectiveOptimizer)
63
63
sty = study.sty
64
64
65
-
@assert sty.n_workers == length(Distributed.workers()) "The number of workers = $(length(Distributed.workers())) isn't the number of workers you requested = $(sty.n_workers)"
65
+
@assert (sty.n_workers ==0|| sty.n_workers ==length(Distributed.workers())) "The number of workers = $(length(Distributed.workers())) isn't the number of workers you requested = $(sty.n_workers)"
66
66
@assert iseven(sty.population_size) "Population size must be even"
0 commit comments