From 52f7322be8426aefa6b3adf84e72a0bbbcbdf635 Mon Sep 17 00:00:00 2001 From: jjospina Date: Fri, 2 Aug 2024 15:03:16 -0600 Subject: [PATCH] RM: threads loops whenever not needed for solving the problem. Making the instantiation slightly longer but reducing RAM usage significantly. --- src/core/base.jl | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/core/base.jl b/src/core/base.jl index 5ad7505..0022736 100755 --- a/src/core/base.jl +++ b/src/core/base.jl @@ -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] @@ -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]