Skip to content

Commit

Permalink
RM: threads loops whenever not needed for solving the problem. Making…
Browse files Browse the repository at this point in the history
… the instantiation slightly longer but reducing RAM usage significantly.
  • Loading branch information
juanjospina committed Aug 15, 2024
1 parent 872516d commit 52f7322
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions src/core/base.jl
Original file line number Diff line number Diff line change
Expand Up @@ -359,7 +359,8 @@ function instantiate_model_decomposition(
master_boundary_vars_vector = Vector{Vector{Vector{JuMP.VariableRef}}}(undef, number_of_subproblems)

# Threaded loop for instantiating subproblems
Threads.@threads for i in 1:1:number_of_subproblems
# Threads.@threads for i in 1:1:number_of_subproblems # faster but causes +RAM usage
for i in 1:1:number_of_subproblems
ckt_name = ckts_names_vector[i]
ckt_data = ckts_data_vector[i]

Expand Down Expand Up @@ -491,7 +492,8 @@ function instantiate_model_decomposition(
boundary_vars_vector = Vector{Vector{Vector{JuMP.VariableRef}}}(undef, number_of_subproblems)

# Threaded loop for instantiating subproblems
Threads.@threads for i in 1:number_of_subproblems
# Threads.@threads for i in 1:1:number_of_subproblems # faster but causes +RAM usage
for i in 1:number_of_subproblems
ckt_name = ckts_names_vector[i]
ckt_data = ckts_data_vector[i]

Expand Down

0 comments on commit 52f7322

Please sign in to comment.