diff --git a/src/core.jl b/src/core.jl index 924d9906..fe6b0854 100644 --- a/src/core.jl +++ b/src/core.jl @@ -218,7 +218,12 @@ function amg_solver_path(data::GraphData{T,V}, flags, cfg, log)::Matrix{T} where f(1) update_shortcut_resistances!(idx, shortcut, resistances, points, comp) else - X = pmap(x ->f(x), 1:size(csub,1)) + is_parallel = cfg["parallelize"] in TRUELIST + if is_parallel + X = pmap(x ->f(x), 1:size(csub,1)) + else + X = map(x ->f(x), 1:size(csub,1)) + end # Set all resistances for x in X @@ -417,8 +422,13 @@ function _cholmod_solver_path(data::GraphData{T,V}, flags, end end - - pmap(x -> f(x, rng, lhs), 1:length(rng)) + is_parallel = cfg["parallelize"] in TRUELIST + if is_parallel + X = pmap(x -> f(x, rng, lhs), 1:length(rng)) + else + X = map(x -> f(x, rng, lhs), 1:length(rng)) + end + for (i,v) in enumerate(rng) coords = cholmod_batch[v].points_idx r = lhs[cholmod_batch[v].cc_idx[2], i] -