Skip to content

Commit

Permalink
[workaround] Disable sorting of external objects for cpp runtime
Browse files Browse the repository at this point in the history
- see ticket:3446
  • Loading branch information
lochel authored and OpenModelica-Hudson committed Jan 10, 2017
1 parent cde3ffc commit 1bf65f3
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion Compiler/BackEnd/Initialization.mo
Expand Up @@ -806,7 +806,14 @@ algorithm
allParameterEqns := BackendEquation.emptyEqns();
otherVariables := BackendVariable.emptyVars();
(allParameters, allParameterEqns, otherVariables) := BackendVariable.traverseBackendDAEVars(dae.shared.globalKnownVars, selectParameter2, (allParameters, allParameterEqns, otherVariables));
(allParameters, allParameterEqns, otherVariables) := BackendVariable.traverseBackendDAEVars(dae.shared.externalObjects, selectParameter2, (allParameters, allParameterEqns, otherVariables));

// FIXME: This if clause is a workaround. Remove it as soon as cpp runtime is
// adapted to handle external objects together with parameters.
// see ticket:3446
if not stringEq(Config.simCodeTarget(), "Cpp") then
(allParameters, allParameterEqns, otherVariables) := BackendVariable.traverseBackendDAEVars(dae.shared.externalObjects, selectParameter2, (allParameters, allParameterEqns, otherVariables));
end if;

nParam := BackendVariable.varsSize(allParameters);

if nParam > 0 then
Expand Down

0 comments on commit 1bf65f3

Please sign in to comment.