Skip to content
This repository was archived by the owner on May 18, 2019. It is now read-only.

Commit 1bf65f3

Browse files
lochelOpenModelica-Hudson
authored andcommitted
[workaround] Disable sorting of external objects for cpp runtime
- see ticket:3446
1 parent cde3ffc commit 1bf65f3

File tree

1 file changed

+8
-1
lines changed

1 file changed

+8
-1
lines changed

Compiler/BackEnd/Initialization.mo

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -806,7 +806,14 @@ algorithm
806806
allParameterEqns := BackendEquation.emptyEqns();
807807
otherVariables := BackendVariable.emptyVars();
808808
(allParameters, allParameterEqns, otherVariables) := BackendVariable.traverseBackendDAEVars(dae.shared.globalKnownVars, selectParameter2, (allParameters, allParameterEqns, otherVariables));
809-
(allParameters, allParameterEqns, otherVariables) := BackendVariable.traverseBackendDAEVars(dae.shared.externalObjects, selectParameter2, (allParameters, allParameterEqns, otherVariables));
809+
810+
// FIXME: This if clause is a workaround. Remove it as soon as cpp runtime is
811+
// adapted to handle external objects together with parameters.
812+
// see ticket:3446
813+
if not stringEq(Config.simCodeTarget(), "Cpp") then
814+
(allParameters, allParameterEqns, otherVariables) := BackendVariable.traverseBackendDAEVars(dae.shared.externalObjects, selectParameter2, (allParameters, allParameterEqns, otherVariables));
815+
end if;
816+
810817
nParam := BackendVariable.varsSize(allParameters);
811818

812819
if nParam > 0 then

0 commit comments

Comments
 (0)