Skip to content

Commit f6d0d14

Browse files
committed
Reintroduce +d=doLinearTearing to keep backwards compatibility. This will be reverted after the next release.
git-svn-id: https://openmodelica.org/svn/OpenModelica/trunk@16929 f25d12d1-65f4-0310-ae8a-bbce733d8d8e
1 parent 7b82dba commit f6d0d14

File tree

2 files changed

+20
-22
lines changed

2 files changed

+20
-22
lines changed

Compiler/BackEnd/Tearing.mo

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -160,7 +160,7 @@ algorithm
160160
case ((comp as BackendDAE.EQUATIONSYSTEM(eqns=eindex,vars=vindx,jac=ojac,jacType=jacType))::comps,_,_,_,_,_)
161161
equation
162162
equality(jacType = BackendDAE.JAC_TIME_VARYING());
163-
true = Flags.getConfigBool(Flags.LINEAR_TEARING);
163+
true = Flags.isSet(Flags.LINEAR_TEARING);
164164
(comp1,true) = method(isyst,ishared,eindex,vindx,ojac,jacType);
165165
(acc,b1) = traverseComponents(comps,isyst,ishared,method,comp1::iAcc,true);
166166
then

Compiler/Util/Flags.mo

Lines changed: 19 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -329,35 +329,37 @@ constant DebugFlag SHOW_START_ORIGIN = DEBUG_FLAG(81, "showStartOrigin", false,
329329
// The flags mixedTearing are only needed as long tearing of mixed system in not default.
330330
constant DebugFlag MIXED_TEARING = DEBUG_FLAG(82, "MixedTearing", true,
331331
Util.gettext("Disables tearing of mixed system."));
332-
constant DebugFlag DUMP_INITIAL_SYSTEM = DEBUG_FLAG(83, "dumpinitialsystem", false,
332+
constant DebugFlag LINEAR_TEARING = DEBUG_FLAG(83, "doLinearTearing", false,
333+
Util.gettext("Enables tearing of linear systems, but for now they aren't handled efficent in the runtime."));
334+
constant DebugFlag DUMP_INITIAL_SYSTEM = DEBUG_FLAG(84, "dumpinitialsystem", false,
333335
Util.gettext("Dumps the initial equation system."));
334-
constant DebugFlag SCODE_INST_SHORTCUT = DEBUG_FLAG(84, "scodeInstShortcut", false,
336+
constant DebugFlag SCODE_INST_SHORTCUT = DEBUG_FLAG(85, "scodeInstShortcut", false,
335337
Util.gettext("Enables experimental SCode instantiation shortcut phase."));
336-
constant DebugFlag SHOW_SCODE = DEBUG_FLAG(85, "showSCode", false,
338+
constant DebugFlag SHOW_SCODE = DEBUG_FLAG(86, "showSCode", false,
337339
Util.gettext("Shows the SCode result of +d=scodeInstShortcut."));
338-
constant DebugFlag DUMP_CONST_REPL = DEBUG_FLAG(86, "dumpConstrepl", false,
340+
constant DebugFlag DUMP_CONST_REPL = DEBUG_FLAG(87, "dumpConstrepl", false,
339341
Util.gettext("Dump the found replacements for constants."));
340-
constant DebugFlag PEDANTIC = DEBUG_FLAG(87, "pedantic", false,
342+
constant DebugFlag PEDANTIC = DEBUG_FLAG(88, "pedantic", false,
341343
Util.gettext("Switch into pedantic debug-mode, to get much more feedback."));
342-
constant DebugFlag SHOW_REDECLARE_ANALYSIS = DEBUG_FLAG(88, "showRedeclareAnalysis", false,
344+
constant DebugFlag SHOW_REDECLARE_ANALYSIS = DEBUG_FLAG(89, "showRedeclareAnalysis", false,
343345
Util.gettext("Prints the result of the redeclare analysis (only works with +d=scodeInstShortcut)."));
344-
constant DebugFlag SHOW_PROGRAM_CHANGES = DEBUG_FLAG(89, "showProgramChanges", false,
346+
constant DebugFlag SHOW_PROGRAM_CHANGES = DEBUG_FLAG(90, "showProgramChanges", false,
345347
Util.gettext("Prints the replacements to be done on program to remove redeclares (only works with +d=scodeInstShortcut)."));
346-
constant DebugFlag SHOW_EQUATION_SOURCE = DEBUG_FLAG(90, "showEquationSource", false,
348+
constant DebugFlag SHOW_EQUATION_SOURCE = DEBUG_FLAG(91, "showEquationSource", false,
347349
Util.gettext("Display the element source information in the dumped DAE for easier debugging."));
348-
constant DebugFlag NLS_ANALYTIC_JACOBIAN = DEBUG_FLAG(91, "NLSanalyticJacobian", false,
350+
constant DebugFlag NLS_ANALYTIC_JACOBIAN = DEBUG_FLAG(92, "NLSanalyticJacobian", false,
349351
Util.gettext("Generates analytical jacobian for non-linear algebraic loops."));
350-
constant DebugFlag INLINE_SOLVER = DEBUG_FLAG(92, "inlineSolver", false,
352+
constant DebugFlag INLINE_SOLVER = DEBUG_FLAG(93, "inlineSolver", false,
351353
Util.gettext("Generates code for inline solver."));
352-
constant DebugFlag GEN_GRAPH = DEBUG_FLAG(93, "genGraph", false,
354+
constant DebugFlag GEN_GRAPH = DEBUG_FLAG(94, "genGraph", false,
353355
Util.gettext("Dumps a graph of the program."));
354-
constant DebugFlag HPCOM = DEBUG_FLAG(94, "hpcom", false,
356+
constant DebugFlag HPCOM = DEBUG_FLAG(95, "hpcom", false,
355357
Util.gettext("Enables parallel calculation based on task-graphs."));
356-
constant DebugFlag INITIALIZATION = DEBUG_FLAG(95, "initialization", false,
358+
constant DebugFlag INITIALIZATION = DEBUG_FLAG(96, "initialization", false,
357359
Util.gettext("Shows additional information from the initialization process."));
358-
constant DebugFlag INLINE_FUNCTIONS = DEBUG_FLAG(96, "inlineFunctions", true,
360+
constant DebugFlag INLINE_FUNCTIONS = DEBUG_FLAG(97, "inlineFunctions", true,
359361
Util.gettext("Controls if function inlining should be performed."));
360-
constant DebugFlag DUMP_SCC_GRAPHML = DEBUG_FLAG(97, "dumpSCCGraphML", false,
362+
constant DebugFlag DUMP_SCC_GRAPHML = DEBUG_FLAG(98, "dumpSCCGraphML", false,
361363
Util.gettext("Dumps graphml files with the strongly connected components."));
362364

363365
// This is a list of all debug flags, to keep track of which flags are used. A
@@ -447,6 +449,7 @@ constant list<DebugFlag> allDebugFlags = {
447449
DUMP_DAE,
448450
SHOW_START_ORIGIN,
449451
MIXED_TEARING,
452+
LINEAR_TEARING,
450453
DUMP_INITIAL_SYSTEM,
451454
SCODE_INST_SHORTCUT,
452455
SHOW_SCODE,
@@ -786,10 +789,6 @@ constant ConfigFlag CORBA_OBJECT_REFERENCE_FILE_PATH = CONFIG_FLAG(50, "corbaObj
786789
NONE(), EXTERNAL(), STRING_FLAG(""), NONE(),
787790
Util.gettext("Sets the path for corba object reference file if +d=interactiveCorba is used."));
788791

789-
constant ConfigFlag LINEAR_TEARING = CONFIG_FLAG(51, "linearTearing",
790-
NONE(), EXTERNAL(), BOOL_FLAG(false), NONE(),
791-
Util.gettext("Enables tearing of linear systems, but for now they aren't handled efficent in the runtime."));
792-
793792
// This is a list of all configuration flags. A flag can not be used unless it's
794793
// in this list, and the list is checked at initialization so that all flags are
795794
// sorted by index (and thus have unique indices).
@@ -843,8 +842,7 @@ constant list<ConfigFlag> allConfigFlags = {
843842
RUNNING_WSM_TESTSUITE,
844843
CORRECT_CREF_TYPES,
845844
SCALARIZE_BINDINGS,
846-
CORBA_OBJECT_REFERENCE_FILE_PATH,
847-
LINEAR_TEARING
845+
CORBA_OBJECT_REFERENCE_FILE_PATH
848846
};
849847

850848
public function new

0 commit comments

Comments
 (0)