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 2, 2024
1 parent 895f10d commit 7e2e4bc
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 7e2e4bc

Please sign in to comment.