From 62370e4fda38a48e221d529ca85cc9fa4b1c612d Mon Sep 17 00:00:00 2001 From: jd-lara Date: Wed, 27 Sep 2023 22:28:43 -0600 Subject: [PATCH] change iparm 12 --- src/lodf_calculations.jl | 8 ++++++++ src/ptdf_calculations.jl | 2 ++ 2 files changed, 10 insertions(+) diff --git a/src/lodf_calculations.jl b/src/lodf_calculations.jl index cf849d0b..18720dc6 100644 --- a/src/lodf_calculations.jl +++ b/src/lodf_calculations.jl @@ -183,6 +183,14 @@ function _pardiso_single_LODF!( linecount = size(lodf_t, 1) ps = Pardiso.MKLPardisoSolver() Pardiso.pardisoinit(ps) + Pardiso.set_iparm!(ps, 1, 1) + for (ix, v) in enumerate(defaults[2:end]) + Pardiso.set_iparm!(ps, ix + 1, v) + end + Pardiso.set_iparm!(ps, 2, 2) + Pardiso.set_iparm!(ps, 59, 2) + Pardiso.set_iparm!(ps, 6, 1) + Pardiso.set_iparm!(ps, 12, 1) #Pardiso.set_msglvl!(ps, Pardiso.MESSAGE_LEVEL_ON) Pardiso.pardiso( ps, diff --git a/src/ptdf_calculations.jl b/src/ptdf_calculations.jl index 5c7ff52b..0208be9e 100644 --- a/src/ptdf_calculations.jl +++ b/src/ptdf_calculations.jl @@ -270,6 +270,7 @@ function _calculate_PTDF_matrix_MKLPardiso( ABA = calculate_ABA_matrix(A, BA, ref_bus_positions) # Here add the subnetwork detection ps = Pardiso.MKLPardisoSolver() + Pardiso.pardisoinit(ps) # Pardiso.set_msglvl!(ps, Pardiso.MESSAGE_LEVEL_ON) defaults = Pardiso.get_iparms(ps) Pardiso.set_iparm!(ps, 1, 1) @@ -279,6 +280,7 @@ function _calculate_PTDF_matrix_MKLPardiso( Pardiso.set_iparm!(ps, 2, 2) Pardiso.set_iparm!(ps, 59, 2) Pardiso.set_iparm!(ps, 6, 1) + Pardiso.set_iparm!(ps, 12, 1) # inizialize matrices for evaluation valid_ix = setdiff(1:buscount, ref_bus_positions)