Opened 10 years ago

Closed 9 years ago

Last modified 9 years ago

#3264 closed defect (fixed)

Solver for algebraic loops

Reported by: Rüdiger Franke Owned by: Marcus Walther
Priority: high Milestone: 1.9.4
Component: Cpp Run-time Version: trunk
Keywords: Cc:

Description (last modified by Rüdiger Franke)

Currently an FMU with algebraic loop fails because the solver "Newton" is not known. The first hurdle can be taken by fixing the capatalization in FMU(2)GlobalSettings.h from "Newton" to "newton" -- or better configure "kinsol" as in OMCFactory::ReadSimulationParameter (r25379, r25381)?

Btw. LinSolverOMCFactory only knows "umfpack" -- is the default "kinsol" in OMCFactory::ReadSimulationParameter correct?

Anyway, the FMU now wants to load libOMCppKinsol.so dynamically at runtime. It appears that the setting in SimulationRuntime/Core/System/CMakeLists.txt, Line 16 is wrong:

set_target_properties(${SystemName}_FMU PROPERTIES COMPILE_DEFINITIONS "DRUNTIME_STATIC_LINKING")

Changing to COMPILE_DEFINITIONS "RUNTIME_STATIC_LINKING", without D, the resulting libOMCppSystem_FMU contains an AlgLoopSolverFactory with the intended constructer. But that one crashes.

r25380 adds the rpath for now, so that FMUs with algebraic loops work. This is considered a temporary fix though.

How can one link a reasonable solver for algebraic loops into the FMU?

Change History (6)

comment:1 by Rüdiger Franke, 10 years ago

Description: modified (diff)

comment:2 by Martin Sjölund, 9 years ago

Milestone: 1.9.31.9.4

Moved to new milestone 1.9.4

comment:3 by Marcus Walther, 9 years ago

@rfranke: I think this ticket is already fixed, what is your opinion? The default solver for FMU(2) is Newton. If Kinsol should be used as solver, we can pass "-DFMU_SUNDIALS=ON" to the cmake-script of the c++ runtime. This will put the kinsol library and a licence text to the generated FMU(2).

comment:4 by Rüdiger Franke, 9 years ago

Resolution: fixed
Status: newclosed

comment:5 by Martin Sjölund, 9 years ago

Milestone: 1.9.41.9.4-1.9.x

Milestone renamed

comment:6 by Martin Sjölund, 9 years ago

Milestone: 1.9.4-1.9.x1.9.4

Milestone renamed

Note: See TracTickets for help on using tickets.