Skip to content

Commit

Permalink
Reduce -nlsMinSize default to 1000 (#8135)
Browse files Browse the repository at this point in the history
  • Loading branch information
phannebohm committed Nov 15, 2021
1 parent 1550b72 commit 3b15529
Show file tree
Hide file tree
Showing 9 changed files with 24 additions and 24 deletions.
4 changes: 2 additions & 2 deletions OMCompiler/SimulationRuntime/c/util/simulation_options.c
Original file line number Diff line number Diff line change
Expand Up @@ -440,7 +440,7 @@ const char *FLAG_DETAILED_DESC[FLAG_MAX+1] = {
" The value is a Double with default value 0.2.",
/* FLAG_LSS_MIN_SIZE */
" Value specifies the minimum system size for using a linear sparse solver.\n"
" The value is an Integer with default value 4001.",
" The value is an Integer with default value " EXPANDSTRING(DEFAULT_FLAG_LSS_MIN_SIZE) ".",
/* FLAG_LV */
" Value (a comma-separated String list) specifies which logging levels to\n"
" enable. Multiple options can be enabled at the same time.",
Expand Down Expand Up @@ -489,7 +489,7 @@ const char *FLAG_DETAILED_DESC[FLAG_MAX+1] = {
" The value is a Double with default value 0.2.",
/* FLAG_NLS_MIN_SIZE */
" Value specifies the minimum system size for using a non-linear sparse solver.\n"
" The value is an Integer with default value 10001.",
" The value is an Integer with default value " EXPANDSTRING(DEFAULT_FLAG_NLS_MIN_SIZE) ".",
/* FLAG_NOEMIT */
" Do not emit any results to the result file.",
/* FLAG_NOEQUIDISTANT_GRID */
Expand Down
4 changes: 2 additions & 2 deletions OMCompiler/SimulationRuntime/c/util/simulation_options.h
Original file line number Diff line number Diff line change
Expand Up @@ -40,8 +40,8 @@
#define EXPANDSTRING(s) EXPANDSTRINGHELPER(s)
#define EXPANDSTRINGHELPER(s) #s

#define DEFAULT_FLAG_LSS_MIN_SIZE 201
#define DEFAULT_FLAG_NLS_MIN_SIZE 10001
#define DEFAULT_FLAG_LSS_MIN_SIZE 1001
#define DEFAULT_FLAG_NLS_MIN_SIZE 1001

enum _FLAG
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -81,35 +81,35 @@ runScript(modelTesting);getErrorString();
// Simul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q5.vbc|X1.X2.X2.X9.Q5.vbe', cflags = '', simflags = ' -abortSlowSimulation -alarm=360 -emit_protected'
// Result file: Modelica.Electrical.Spice3.Examples.Spice3BenchmarkFourBitBinaryAdder_res.mat
// Messages: stdout | info | Using sparse solver for linear system 12,
// | | | | because density of 0.175 remains under threshold of 0.200 or size of 24 exceeds threshold of 201.
// | | | | because density of 0.175 remains under threshold of 0.200 or size of 24 exceeds threshold of 1001.
// | | | | The maximum density and the minimal system size for using sparse solvers can be specified
// | | | | using the runtime flags '<-lssMaxDensity=value>' and '<-lssMinSize=value>'.
// stdout | info | Using sparse solver for linear system 25,
// | | | | because density of 0.179 remains under threshold of 0.200 or size of 26 exceeds threshold of 201.
// | | | | because density of 0.179 remains under threshold of 0.200 or size of 26 exceeds threshold of 1001.
// | | | | The maximum density and the minimal system size for using sparse solvers can be specified
// | | | | using the runtime flags '<-lssMaxDensity=value>' and '<-lssMinSize=value>'.
// stdout | info | Using sparse solver for linear system 38,
// | | | | because density of 0.179 remains under threshold of 0.200 or size of 26 exceeds threshold of 201.
// | | | | because density of 0.179 remains under threshold of 0.200 or size of 26 exceeds threshold of 1001.
// | | | | The maximum density and the minimal system size for using sparse solvers can be specified
// | | | | using the runtime flags '<-lssMaxDensity=value>' and '<-lssMinSize=value>'.
// stdout | info | Using sparse solver for linear system 51,
// | | | | because density of 0.186 remains under threshold of 0.200 or size of 26 exceeds threshold of 201.
// | | | | because density of 0.186 remains under threshold of 0.200 or size of 26 exceeds threshold of 1001.
// | | | | The maximum density and the minimal system size for using sparse solvers can be specified
// | | | | using the runtime flags '<-lssMaxDensity=value>' and '<-lssMinSize=value>'.
// stdout | info | Using sparse solver for linear system 75,
// | | | | because density of 0.182 remains under threshold of 0.200 or size of 30 exceeds threshold of 201.
// | | | | because density of 0.182 remains under threshold of 0.200 or size of 30 exceeds threshold of 1001.
// | | | | The maximum density and the minimal system size for using sparse solvers can be specified
// | | | | using the runtime flags '<-lssMaxDensity=value>' and '<-lssMinSize=value>'.
// stdout | info | Using sparse solver for linear system 87,
// | | | | because density of 0.162 remains under threshold of 0.200 or size of 30 exceeds threshold of 201.
// | | | | because density of 0.162 remains under threshold of 0.200 or size of 30 exceeds threshold of 1001.
// | | | | The maximum density and the minimal system size for using sparse solvers can be specified
// | | | | using the runtime flags '<-lssMaxDensity=value>' and '<-lssMinSize=value>'.
// stdout | info | Using sparse solver for linear system 97,
// | | | | because density of 0.173 remains under threshold of 0.200 or size of 30 exceeds threshold of 201.
// | | | | because density of 0.173 remains under threshold of 0.200 or size of 30 exceeds threshold of 1001.
// | | | | The maximum density and the minimal system size for using sparse solvers can be specified
// | | | | using the runtime flags '<-lssMaxDensity=value>' and '<-lssMinSize=value>'.
// stdout | info | Using sparse solver for linear system 102,
// | | | | because density of 0.168 remains under threshold of 0.200 or size of 28 exceeds threshold of 201.
// | | | | because density of 0.168 remains under threshold of 0.200 or size of 28 exceeds threshold of 1001.
// | | | | The maximum density and the minimal system size for using sparse solvers can be specified
// | | | | using the runtime flags '<-lssMaxDensity=value>' and '<-lssMinSize=value>'.
// LOG_SUCCESS | info | The initialization finished successfully without homotopy method.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,11 +34,11 @@ runScript(modelTesting);getErrorString();
// Simulation options: startTime = 0.0, stopTime = 1.01, numberOfIntervals = 500, tolerance = 1e-06, method = 'dassl', fileNamePrefix = 'Modelica.Mechanics.MultiBody.Examples.Loops.EngineV6', options = '', outputFormat = 'mat', variableFilter = 'time|load.phi|load.w|filter.x.1.|filter.x.2.', cflags = '', simflags = ' -abortSlowSimulation -alarm=360 -emit_protected'
// Result file: Modelica.Mechanics.MultiBody.Examples.Loops.EngineV6_res.mat
// Messages: stdout | info | Using sparse solver for linear system 6,
// | | | | because density of 0.176 remains under threshold of 0.200 or size of 27 exceeds threshold of 201.
// | | | | because density of 0.176 remains under threshold of 0.200 or size of 27 exceeds threshold of 1001.
// | | | | The maximum density and the minimal system size for using sparse solvers can be specified
// | | | | using the runtime flags '<-lssMaxDensity=value>' and '<-lssMinSize=value>'.
// stdout | info | Using sparse solver for linear system 13,
// | | | | because density of 0.155 remains under threshold of 0.200 or size of 25 exceeds threshold of 201.
// | | | | because density of 0.155 remains under threshold of 0.200 or size of 25 exceeds threshold of 1001.
// | | | | The maximum density and the minimal system size for using sparse solvers can be specified
// | | | | using the runtime flags '<-lssMaxDensity=value>' and '<-lssMinSize=value>'.
// LOG_SUCCESS | info | The initialization finished successfully without homotopy method.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,11 +24,11 @@ res := OpenModelica.Scripting.compareSimulationResults("Modelica.Mechanics.Multi
// resultFile = "Modelica.Mechanics.MultiBody.Examples.Loops.EngineV6_res.mat",
// simulationOptions = "startTime = 0.0, stopTime = 1.01, numberOfIntervals = 500, tolerance = 1e-06, method = 'dassl', fileNamePrefix = 'Modelica.Mechanics.MultiBody.Examples.Loops.EngineV6', options = '', outputFormat = 'mat', variableFilter = '.*', cflags = '', simflags = ''",
// messages = "stdout | info | Using sparse solver for linear system 6,
// | | | | because density of 0.176 remains under threshold of 0.200 or size of 27 exceeds threshold of 201.
// | | | | because density of 0.176 remains under threshold of 0.200 or size of 27 exceeds threshold of 1001.
// | | | | The maximum density and the minimal system size for using sparse solvers can be specified
// | | | | using the runtime flags '<-lssMaxDensity=value>' and '<-lssMinSize=value>'.
// stdout | info | Using sparse solver for linear system 7,
// | | | | because density of 0.155 remains under threshold of 0.200 or size of 25 exceeds threshold of 201.
// | | | | because density of 0.155 remains under threshold of 0.200 or size of 25 exceeds threshold of 1001.
// | | | | The maximum density and the minimal system size for using sparse solvers can be specified
// | | | | using the runtime flags '<-lssMaxDensity=value>' and '<-lssMinSize=value>'.
// LOG_SUCCESS | info | The initialization finished successfully without homotopy method.
Expand Down
4 changes: 2 additions & 2 deletions testsuite/simulation/modelica/others/EngineV6_output.mos
Original file line number Diff line number Diff line change
Expand Up @@ -24,11 +24,11 @@ val(crankshaftSpeed,1.0); getErrorString();
// resultFile = "EngineV6_output_res.mat",
// simulationOptions = "startTime = 0.0, stopTime = 1.01, numberOfIntervals = 500, tolerance = 1e-06, method = 'dassl', fileNamePrefix = 'EngineV6_output', options = '', outputFormat = 'mat', variableFilter = '.*', cflags = '', simflags = ''",
// messages = "stdout | info | Using sparse solver for linear system 6,
// | | | | because density of 0.176 remains under threshold of 0.200 or size of 27 exceeds threshold of 201.
// | | | | because density of 0.176 remains under threshold of 0.200 or size of 27 exceeds threshold of 1001.
// | | | | The maximum density and the minimal system size for using sparse solvers can be specified
// | | | | using the runtime flags '<-lssMaxDensity=value>' and '<-lssMinSize=value>'.
// stdout | info | Using sparse solver for linear system 13,
// | | | | because density of 0.155 remains under threshold of 0.200 or size of 25 exceeds threshold of 201.
// | | | | because density of 0.155 remains under threshold of 0.200 or size of 25 exceeds threshold of 1001.
// | | | | The maximum density and the minimal system size for using sparse solvers can be specified
// | | | | using the runtime flags '<-lssMaxDensity=value>' and '<-lssMinSize=value>'.
// LOG_SUCCESS | info | The initialization finished successfully without homotopy method.
Expand Down
4 changes: 2 additions & 2 deletions testsuite/simulation/modelica/tearing/Tearing12-minimal.mos
Original file line number Diff line number Diff line change
Expand Up @@ -28,11 +28,11 @@ simulate(Tearing12); getErrorString();
// resultFile = "Tearing12_res.mat",
// simulationOptions = "startTime = 0.0, stopTime = 1.0, numberOfIntervals = 500, tolerance = 1e-06, method = 'dassl', fileNamePrefix = 'Tearing12', options = '', outputFormat = 'mat', variableFilter = '.*', cflags = '', simflags = ''",
// messages = "stdout | info | Using sparse solver for linear system 0,
// | | | | because density of 0.004 remains under threshold of 0.200 or size of 908 exceeds threshold of 201.
// | | | | because density of 0.004 remains under threshold of 0.200 or size of 908 exceeds threshold of 1001.
// | | | | The maximum density and the minimal system size for using sparse solvers can be specified
// | | | | using the runtime flags '<-lssMaxDensity=value>' and '<-lssMinSize=value>'.
// stdout | info | Using sparse solver for linear system 1,
// | | | | because density of 0.004 remains under threshold of 0.200 or size of 905 exceeds threshold of 201.
// | | | | because density of 0.004 remains under threshold of 0.200 or size of 905 exceeds threshold of 1001.
// | | | | The maximum density and the minimal system size for using sparse solvers can be specified
// | | | | using the runtime flags '<-lssMaxDensity=value>' and '<-lssMinSize=value>'.
// LOG_SUCCESS | info | The initialization finished successfully without homotopy method.
Expand Down
4 changes: 2 additions & 2 deletions testsuite/simulation/modelica/tearing/Tearing7-minimal.mos
Original file line number Diff line number Diff line change
Expand Up @@ -30,11 +30,11 @@ val(R1.v,0.2); getErrorString();
// resultFile = "Tearing7_res.mat",
// simulationOptions = "startTime = 0.0, stopTime = 1.0, numberOfIntervals = 500, tolerance = 1e-06, method = 'dassl', fileNamePrefix = 'Tearing7', options = '', outputFormat = 'mat', variableFilter = '.*', cflags = '', simflags = ''",
// messages = "stdout | info | Using sparse solver for linear system 0,
// | | | | because density of 0.136 remains under threshold of 0.200 or size of 18 exceeds threshold of 201.
// | | | | because density of 0.136 remains under threshold of 0.200 or size of 18 exceeds threshold of 1001.
// | | | | The maximum density and the minimal system size for using sparse solvers can be specified
// | | | | using the runtime flags '<-lssMaxDensity=value>' and '<-lssMinSize=value>'.
// stdout | info | Using sparse solver for linear system 1,
// | | | | because density of 0.136 remains under threshold of 0.200 or size of 18 exceeds threshold of 201.
// | | | | because density of 0.136 remains under threshold of 0.200 or size of 18 exceeds threshold of 1001.
// | | | | The maximum density and the minimal system size for using sparse solvers can be specified
// | | | | using the runtime flags '<-lssMaxDensity=value>' and '<-lssMinSize=value>'.
// LOG_SUCCESS | info | The initialization finished successfully without homotopy method.
Expand Down
4 changes: 2 additions & 2 deletions testsuite/simulation/modelica/tearing/Tearing8-minimal.mos
Original file line number Diff line number Diff line change
Expand Up @@ -28,11 +28,11 @@ val(R1.v,0.2); getErrorString();
// resultFile = "Tearing8_res.mat",
// simulationOptions = "startTime = 0.0, stopTime = 1.0, numberOfIntervals = 500, tolerance = 1e-06, method = 'dassl', fileNamePrefix = 'Tearing8', options = '', outputFormat = 'mat', variableFilter = '.*', cflags = '', simflags = ''",
// messages = "stdout | info | Using sparse solver for linear system 0,
// | | | | because density of 0.087 remains under threshold of 0.200 or size of 29 exceeds threshold of 201.
// | | | | because density of 0.087 remains under threshold of 0.200 or size of 29 exceeds threshold of 1001.
// | | | | The maximum density and the minimal system size for using sparse solvers can be specified
// | | | | using the runtime flags '<-lssMaxDensity=value>' and '<-lssMinSize=value>'.
// stdout | info | Using sparse solver for linear system 1,
// | | | | because density of 0.087 remains under threshold of 0.200 or size of 29 exceeds threshold of 201.
// | | | | because density of 0.087 remains under threshold of 0.200 or size of 29 exceeds threshold of 1001.
// | | | | The maximum density and the minimal system size for using sparse solvers can be specified
// | | | | using the runtime flags '<-lssMaxDensity=value>' and '<-lssMinSize=value>'.
// LOG_SUCCESS | info | The initialization finished successfully without homotopy method.
Expand Down

0 comments on commit 3b15529

Please sign in to comment.