Opened 4 years ago
Last modified 4 years ago
#6114 assigned defect
Unit checking scales with O(2^N) in case of large expressions involving +-*/ operators
Reported by: | Rüdiger Franke | Owned by: | Per Östlund |
---|---|---|---|
Priority: | normal | Milestone: | 2.0.0 |
Component: | New Instantiation | Version: | v1.16.0-dev |
Keywords: | Cc: | Lennart Ochel, arunkumar palanisamy, Martin Sjölund |
Description
Open this model with OMEdit and press "Check Model":
model EndlessCheck input Real u1, u2, u3, u4, u5, u6, u7, u8, u9, u10; input Real u11, u12, u13, u14, u15, u16, u17, u18, u19, u20; input Real u21, u22, u23, u24, u25, u26, u27, u28, u29, u30; input Real u31, u32, u33, u34, u35, u36, u37, u38, u39, u40; output Real y = u1 + u2 + u3 + u4 + u5 + u6 + u7 + u8 + u9 + u10 + u11 + u12 + u13 + u14 + u15 + u16 + u17 + u18 + u19 + u20 + u21 + u22 + u23 + u24 + u25 + u26 + u27 + u28 + u29 + u30 + u31 + u32 + u33 + u34 + u35 + u36 + u37 + u38 + u39 + u40; end EndlessCheck;
Change History (17)
comment:1 by , 4 years ago
comment:2 by , 4 years ago
Component: | OMEdit → New Instantiation |
---|---|
Owner: | changed from | to
Status: | new → assigned |
Summary: | Endless model check in OMEdit → Endless model check |
Strangely enough it cycles in unit checking :)
(gdb) bt #0 0x000000006f9b0a34 in GC_apply_to_all_blocks ( fn=fn@entry=0x6f9b2960 <clear_marks_for_block>, client_data=client_data@entry=0) at headers.c:329 #1 0x000000006f9b2ad2 in GC_clear_marks () at mark.c:241 #2 0x000000006f9ac5de in GC_try_to_collect_inner ( stop_func=0x6f9ab640 <GC_never_stop_func>) at alloc.c:536 #3 0x000000006f9acf4d in GC_collect_or_expand ( needed_blocks=needed_blocks@entry=1, ignore_off_page=ignore_off_page@entry=0, retry=retry@entry=0) at alloc.c:1445 #4 0x000000006f9ad0fc in GC_allocobj (gran=gran@entry=3, kind=<optimized out>) at alloc.c:1545 #5 0x000000006f9b115f in GC_generic_malloc_inner (lb=lb@entry=32, k=k@entry=1) at malloc.c:191 #6 0x000000006f9b2582 in GC_generic_malloc_many (lb=lb@entry=32, k=k@entry=1, result=result@entry=0x704f6948 <first_thread+296>) at mallocx.c:473 #7 0x000000006f9bc57d in GC_malloc_kind (bytes=bytes@entry=24, kind=kind@entry=1) at thread_local_alloc.c:179 #8 0x000000006f9b162a in GC_malloc (lb=lb@entry=24) at malloc.c:347 #9 0x000000006ef8ce5d in mmc_alloc_words (nwords=3) at C:/home/adrpo33/dev/OpenModelica/build/include/omc/c/gc/omc_gc.h:248 #10 mmc_mk_box2 (x1=0x37bb9033, x0=<optimized out>, ctor=4) at C:/home/adrpo33/dev/OpenModelica/build/include/omc/c/meta/meta_modelica_mk_box.h:23 #11 omc_NFUnitCheck_unitTypesEqual (threadData=0x242fae0, threadData@entry=0x2426680, _unit1=0x37e6e963, _unit2=_unit2@entry=0x37e6e6c3, _htCr2U=<optimized out>, out_outUnit=0x2426400, out_outUnit@entry=0x2426438, out_outHtCr2U=0x2426408, out_outHtCr2U@entry=0x2426440) at C:/home/adrpo33/dev/OpenModelica/OMCompiler/Compiler/NFFrontEnd/NFUnitCheck.mo:929 #12 0x000000006ef90be1 in omc_NFUnitCheck_insertUnitInEquation ( threadData=0x2426680, threadData@entry=0x2426900, _eq=0x2426688, __omcQ_24in_5Funit=0x2426690, __omcQ_24in_5Funit@entry=0x2426910, __omcQ_24in_5FhtCr2U=<optimized out>, __omcQ_24in_5FhtS2U=0x37e6c993, __omcQ_24in_5FhtU2S=0x37e81483, __omcQ_24in_5FfnCache=0x37e6ca53, out_htCr2U=<optimized out>, out_htCr2U@entry=0x2426680, out_htS2U=<optimized out>, out_htS2U@entry=0x2426688, out_htU2S=<optimized out>, out_htU2S@entry=0x2426690, out_fnCache=out_fnCache@entry=0x2426698, out_inconsistentUnits=out_inconsistentUnits@entry=0x24266a0) at C:/home/adrpo33/dev/OpenModelica/OMCompiler/Compiler/NFFrontEnd/NFUnitCheck.mo:488 #13 0x000000006ef90ced in omc_NFUnitCheck_insertUnitInEquation ( threadData=0x2426900, threadData@entry=0x2426b30, _eq=0x2426908, __omcQ_24in_5Funit=0x2426910, __omcQ_24in_5Funit@entry=0x2426b40, __omcQ_24in_5FhtCr2U=<optimized out>, __omcQ_24in_5FhtS2U=0x37e6c993, __omcQ_24in_5FhtU2S=0x37e81483, __omcQ_24in_5FfnCache=0x37e6ca53, out_htCr2U=<optimized out>, out_htCr2U@entry=0x2426900, out_htS2U=<optimized out>, out_htS2U@entry=0x2426908, out_htU2S=<optimized out>, out_htU2S@entry=0x2426910, out_fnCache=out_fnCache@entry=0x2426918, out_inconsistentUnits=out_inconsistentUnits@entry=0x2426920) at C:/home/adrpo33/dev/OpenModelica/OMCompiler/Compiler/NFFrontEnd/NFUnitCheck.mo:473 #14 0x000000006ef90ced in omc_NFUnitCheck_insertUnitInEquation ( threadData=0x2426b30, threadData@entry=0x2426db0, _eq=0x2426b38, _eq@entry=0x37bc82a3, __omcQ_24in_5Funit=0x2426b40, __omcQ_24in_5Funit@entry=0x37e7bfa3, __omcQ_24in_5FhtCr2U=<optimized out>, __omcQ_24in_5FhtS2U=0x37e6c993, __omcQ_24in_5FhtU2S=0x37e81483, __omcQ_24in_5FfnCache=0x37e6ca53, out_htCr2U=<optimized out>, out_htCr2U@entry=0x2426b30, out_htS2U=<optimized out>, out_htS2U@entry=0x2426b38, out_htU2S=<optimized out>, out_htU2S@entry=0x2426b40, out_fnCache=out_fnCache@entry=0x2426b48, out_inconsistentUnits=0x2426b68, out_inconsistentUnits@entry=0x2426ba0) at C:/home/adrpo33/dev/OpenModelica/OMCompiler/Compiler/NFFrontEnd/NFUnitCheck.mo:473 #15 0x000000006ef90bb2 in omc_NFUnitCheck_insertUnitInEquation ( threadData=0x2426db0, threadData@entry=0x2427030, _eq=0x2426db8, _eq@entry=0x37bc81b3, __omcQ_24in_5Funit=0x2426dc0, __omcQ_24in_5Funit@entry=0x37e7bd43, __omcQ_24in_5FhtCr2U=<optimized out>, __omcQ_24in_5FhtS2U=0x37e6c993, __omcQ_24in_5FhtU2S=0x37e81483, __omcQ_24in_5FfnCache=0x37e6ca53, out_htCr2U=<optimized out>, out_htCr2U@entry=0x2426db0, out_htS2U=<optimized out>, out_htS2U@entry=0x2426db8, out_htU2S=<optimized out>, out_htU2S@entry=0x2426dc0, out_fnCache=out_fnCache@entry=0x2426dc8, out_inconsistentUnits=0x2426de8, out_inconsistentUnits@entry=0x2426e20) at C:/home/adrpo33/dev/OpenModelica/OMCompiler/Compiler/NFFrontEnd/NFUnitCheck.mo:486 #16 0x000000006ef90bb2 in omc_NFUnitCheck_insertUnitInEquation ( threadData=0x2427030, threadData@entry=0x24272b0, _eq=0x2427038, _eq@entry=0x37bc8063, __omcQ_24in_5Funit=0x2427040, __omcQ_24in_5Funit@entry=0x37e7bae3, __omcQ_24in_5FhtCr2U=<optimized out>, __omcQ_24in_5FhtS2U=0x37e6c993, __omcQ_24in_5FhtU2S=0x37e81483, __omcQ_24in_5FfnCache=0x37e6ca53, out_htCr2U=<optimized out>, out_htCr2U@entry=0x2427030, out_htS2U=<optimized out>, out_htS2U@entry=0x2427038, out_htU2S=<optimized out>, out_htU2S@entry=0x2427040, out_fnCache=out_fnCache@entry=0x2427048, out_inconsistentUnits=0x2427068, out_inconsistentUnits@entry=0x24270a0) at C:/home/adrpo33/dev/OpenModelica/OMCompiler/Compiler/NFFrontEnd/NFUnitCheck.mo:486 #17 0x000000006ef90bb2 in omc_NFUnitCheck_insertUnitInEquation ( threadData=0x24272b0, threadData@entry=0x2427530, _eq=0x24272b8, _eq@entry=0x37bd3f33, __omcQ_24in_5Funit=0x24272c0, __omcQ_24in_5Funit@entry=0x37e7b883, __omcQ_24in_5FhtCr2U=<optimized out>, __omcQ_24in_5FhtS2U=0x37e6c993, __omcQ_24in_5FhtU2S=0x37e81483, __omcQ_24in_5FfnCache=0x37e6ca53, out_htCr2U=<optimized out>, out_htCr2U@entry=0x24272b0, out_htS2U=<optimized out>, out_htS2U@entry=0x24272b8, out_htU2S=<optimized out>, out_htU2S@entry=0x24272c0, out_fnCache=out_fnCache@entry=0x24272c8, out_inconsistentUnits=0x24272e8, out_inconsistentUnits@entry=0x2427320) at C:/home/adrpo33/dev/OpenModelica/OMCompiler/Compiler/NFFrontEnd/NFUnitCheck.mo:486 #18 0x000000006ef90bb2 in omc_NFUnitCheck_insertUnitInEquation ( threadData=0x2427530, threadData@entry=0x2427800, _eq=0x2427538, _eq@entry=0x37bd3d53, __omcQ_24in_5Funit=0x2427540, __omcQ_24in_5Funit@entry=0x37e7b623, __omcQ_24in_5FhtCr2U=<optimized out>, __omcQ_24in_5FhtS2U=0x37e6c993, __omcQ_24in_5FhtU2S=0x37e81483, __omcQ_24in_5FfnCache=0x37e6ca53, out_htCr2U=<optimized out>, out_htCr2U@entry=0x2427530, out_htS2U=<optimized out>, out_htS2U@entry=0x2427538, out_htU2S=<optimized out>, out_htU2S@entry=0x2427540, out_fnCache=out_fnCache@entry=0x2427548, out_inconsistentUnits=0x2427568, out_inconsistentUnits@entry=0x24275a0) at C:/home/adrpo33/dev/OpenModelica/OMCompiler/Compiler/NFFrontEnd/NFUnitCheck.mo:486 #19 0x000000006ef90bb2 in omc_NFUnitCheck_insertUnitInEquation ( threadData=0x2427800, threadData@entry=0x2427a80, _eq=0x2427808, __omcQ_24in_5Funit=0x2427810, __omcQ_24in_5Funit@entry=0x2427a90, __omcQ_24in_5FhtCr2U=<optimized out>, __omcQ_24in_5FhtS2U=0x37e6c993, __omcQ_24in_5FhtU2S=0x37e81483, __omcQ_24in_5FfnCache=0x37e6ca53, out_htCr2U=<optimized out>, out_htCr2U@entry=0x2427800, out_htS2U=<optimized out>, out_htS2U@entry=0x2427808, out_htU2S=<optimized out>, out_htU2S@entry=0x2427810, out_fnCache=out_fnCache@entry=0x2427818, out_inconsistentUnits=out_inconsistentUnits@entry=0x2427820) at C:/home/adrpo33/dev/OpenModelica/OMCompiler/Compiler/NFFrontEnd/NFUnitCheck.mo:486 #20 0x000000006ef90ced in omc_NFUnitCheck_insertUnitInEquation ( threadData=0x2427a80, threadData@entry=0x2427d00, _eq=0x2427a88, __omcQ_24in_5Funit=0x2427a90, __omcQ_24in_5Funit@entry=0x2427d10, __omcQ_24in_5FhtCr2U=<optimized out>, __omcQ_24in_5FhtS2U=0x37e6c993, __omcQ_24in_5FhtU2S=0x37e81483, __omcQ_24in_5FfnCache=0x37e6ca53, out_htCr2U=<optimized out>, out_htCr2U@entry=0x2427a80, out_htS2U=<optimized out>, out_htS2U@entry=0x2427a88, out_htU2S=<optimized out>, out_htU2S@entry=0x2427a90, out_fnCache=out_fnCache@entry=0x2427a98, out_inconsistentUnits=out_inconsistentUnits@entry=0x2427aa0) at C:/home/adrpo33/dev/OpenModelica/OMCompiler/Compiler/NFFrontEnd/NFUnitCheck.mo:473 #21 0x000000006ef90ced in omc_NFUnitCheck_insertUnitInEquation ( threadData=0x2427d00, threadData@entry=0x2427f80, _eq=0x2427d08, __omcQ_24in_5Funit=0x2427d10, __omcQ_24in_5Funit@entry=0x2427f90, __omcQ_24in_5FhtCr2U=<optimized out>, __omcQ_24in_5FhtS2U=0x37e6c993, __omcQ_24in_5FhtU2S=0x37e81483, __omcQ_24in_5FfnCache=0x37e6ca53, out_htCr2U=<optimized out>, out_htCr2U@entry=0x2427d00, out_htS2U=<optimized out>, out_htS2U@entry=0x2427d08, out_htU2S=<optimized out>, out_htU2S@entry=0x2427d10, out_fnCache=out_fnCache@entry=0x2427d18, out_inconsistentUnits=out_inconsistentUnits@entry=0x2427d20) at C:/home/adrpo33/dev/OpenModelica/OMCompiler/Compiler/NFFrontEnd/NFUnitCheck.mo:473 #22 0x000000006ef90ced in omc_NFUnitCheck_insertUnitInEquation ( threadData=0x2427f80, threadData@entry=0x2428200, _eq=0x2427f88, __omcQ_24in_5Funit=0x2427f90, __omcQ_24in_5Funit@entry=0x2428210, __omcQ_24in_5FhtCr2U=<optimized out>, __omcQ_24in_5FhtS2U=0x37e6c993, __omcQ_24in_5FhtU2S=0x37e81483, __omcQ_24in_5FfnCache=0x37e6ca53, out_htCr2U=<optimized out>, out_htCr2U@entry=0x2427f80, out_htS2U=<optimized out>, out_htS2U@entry=0x2427f88, out_htU2S=<optimized out>, out_htU2S@entry=0x2427f90, out_fnCache=out_fnCache@entry=0x2427f98, out_inconsistentUnits=out_inconsistentUnits@entry=0x2427fa0) at C:/home/adrpo33/dev/OpenModelica/OMCompiler/Compiler/NFFrontEnd/NFUnitCheck.mo:473 #23 0x000000006ef90ced in omc_NFUnitCheck_insertUnitInEquation ( threadData=0x2428200, threadData@entry=0x2428430, _eq=0x2428208, __omcQ_24in_5Funit=0x2428210, __omcQ_24in_5Funit@entry=0x2428440, __omcQ_24in_5FhtCr2U=<optimized out>, __omcQ_24in_5FhtS2U=0x37e6c993, __omcQ_24in_5FhtU2S=0x37e81483, __omcQ_24in_5FfnCache=0x37e6ca53, out_htCr2U=<optimized out>, out_htCr2U@entry=0x2428200, out_htS2U=<optimized out>, out_htS2U@entry=0x2428208, out_htU2S=<optimized out>, out_htU2S@entry=0x2428210, out_fnCache=out_fnCache@entry=0x2428218, out_inconsistentUnits=out_inconsistentUnits@entry=0x2428220) at C:/home/adrpo33/dev/OpenModelica/OMCompiler/Compiler/NFFrontEnd/NFUnitCheck.mo:473 #24 0x000000006ef90ced in omc_NFUnitCheck_insertUnitInEquation ( threadData=0x2428430, threadData@entry=0x24286b0, _eq=0x2428438, _eq@entry=0x37bd3483, __omcQ_24in_5Funit=0x2428440, __omcQ_24in_5Funit@entry=0x37e7c7e3, __omcQ_24in_5FhtCr2U=<optimized out>, __omcQ_24in_5FhtS2U=0x37e6c993, __omcQ_24in_5FhtU2S=0x37e81483, __omcQ_24in_5FfnCache=0x37e6ca53, out_htCr2U=<optimized out>, out_htCr2U@entry=0x2428430, out_htS2U=<optimized out>, out_htS2U@entry=0x2428438, out_htU2S=<optimized out>, out_htU2S@entry=0x2428440, out_fnCache=out_fnCache@entry=0x2428448, out_inconsistentUnits=0x2428468, out_inconsistentUnits@entry=0x24284a0) at C:/home/adrpo33/dev/OpenModelica/OMCompiler/Compiler/NFFrontEnd/NFUnitCheck.mo:473 #25 0x000000006ef90bb2 in omc_NFUnitCheck_insertUnitInEquation ( threadData=0x24286b0, threadData@entry=0x2428980, _eq=0x24286b8, _eq@entry=0x37bd3363, __omcQ_24in_5Funit=0x24286c0, __omcQ_24in_5Funit@entry=0x37e7c583, __omcQ_24in_5FhtCr2U=<optimized out>, __omcQ_24in_5FhtS2U=0x37e6c993, __omcQ_24in_5FhtU2S=0x37e81483, __omcQ_24in_5FfnCache=0x37e6ca53, out_htCr2U=<optimized out>, out_htCr2U@entry=0x24286b0, out_htS2U=<optimized out>, out_htS2U@entry=0x24286b8, out_htU2S=<optimized out>, out_htU2S@entry=0x24286c0, out_fnCache=out_fnCache@entry=0x24286c8, out_inconsistentUnits=0x24286e8, out_inconsistentUnits@entry=0x2428720) at C:/home/adrpo33/dev/OpenModelica/OMCompiler/Compiler/NFFrontEnd/NFUnitCheck.mo:486 #26 0x000000006ef90bb2 in omc_NFUnitCheck_insertUnitInEquation ( threadData=0x2428980, threadData@entry=0x2428c00, _eq=0x2428988, __omcQ_24in_5Funit=0x2428990, __omcQ_24in_5Funit@entry=0x2428c10, __omcQ_24in_5FhtCr2U=<optimized out>, __omcQ_24in_5FhtS2U=0x37e6c993, __omcQ_24in_5FhtU2S=0x37e81483, __omcQ_24in_5FfnCache=0x37e6ca53, out_htCr2U=<optimized out>, out_htCr2U@entry=0x2428980, out_htS2U=<optimized out>, out_htS2U@entry=0x2428988, out_htU2S=<optimized out>, out_htU2S@entry=0x2428990, out_fnCache=out_fnCache@entry=0x2428998, out_inconsistentUnits=out_inconsistentUnits@entry=0x24289a0) at C:/home/adrpo33/dev/OpenModelica/OMCompiler/Compiler/NFFrontEnd/NFUnitCheck.mo:486 #27 0x000000006ef90ced in omc_NFUnitCheck_insertUnitInEquation ( threadData=0x2428c00, threadData@entry=0x2428e30, _eq=0x2428c08, __omcQ_24in_5Funit=0x2428c10, __omcQ_24in_5Funit@entry=0x2428e40, __omcQ_24in_5FhtCr2U=<optimized out>, __omcQ_24in_5FhtS2U=0x37e6c993, __omcQ_24in_5FhtU2S=0x37e81483, __omcQ_24in_5FfnCache=0x37e6ca53, out_htCr2U=<optimized out>, out_htCr2U@entry=0x2428c00, out_htS2U=<optimized out>, out_htS2U@entry=0x2428c08, out_htU2S=<optimized out>, out_htU2S@entry=0x2428c10, out_fnCache=out_fnCache@entry=0x2428c18, out_inconsistentUnits=out_inconsistentUnits@entry=0x2428c20) at C:/home/adrpo33/dev/OpenModelica/OMCompiler/Compiler/NFFrontEnd/NFUnitCheck.mo:473 #28 0x000000006ef90ced in omc_NFUnitCheck_insertUnitInEquation ( threadData=0x2428e30, threadData@entry=0x24290b0, _eq=0x2428e38, _eq@entry=0x37bdef93, __omcQ_24in_5Funit=0x2428e40, __omcQ_24in_5Funit@entry=0x37e7fe63, __omcQ_24in_5FhtCr2U=<optimized out>, __omcQ_24in_5FhtS2U=0x37e6c993, __omcQ_24in_5FhtU2S=0x37e81483, __omcQ_24in_5FfnCache=0x37e6ca53, out_htCr2U=<optimized out>, out_htCr2U@entry=0x2428e30, out_htS2U=<optimized out>, out_htS2U@entry=0x2428e38, out_htU2S=<optimized out>, out_htU2S@entry=0x2428e40, out_fnCache=out_fnCache@entry=0x2428e48, out_inconsistentUnits=0x2428e68, out_inconsistentUnits@entry=0x2428ea0) at C:/home/adrpo33/dev/OpenModelica/OMCompiler/Compiler/NFFrontEnd/NFUnitCheck.mo:473 #29 0x000000006ef90bb2 in omc_NFUnitCheck_insertUnitInEquation ( threadData=0x24290b0, threadData@entry=0x2429330, _eq=0x24290b8, _eq@entry=0x37bdee43, __omcQ_24in_5Funit=0x24290c0, __omcQ_24in_5Funit@entry=0x37e7fc03, __omcQ_24in_5FhtCr2U=<optimized out>, __omcQ_24in_5FhtS2U=0x37e6c993, __omcQ_24in_5FhtU2S=0x37e81483, __omcQ_24in_5FfnCache=0x37e6ca53, out_htCr2U=<optimized out>, out_htCr2U@entry=0x24290b0, out_htS2U=<optimized out>, out_htS2U@entry=0x24290b8, out_htU2S=<optimized out>, out_htU2S@entry=0x24290c0, out_fnCache=out_fnCache@entry=0x24290c8, out_inconsistentUnits=0x24290e8, out_inconsistentUnits@entry=0x2429120) at C:/home/adrpo33/dev/OpenModelica/OMCompiler/Compiler/NFFrontEnd/NFUnitCheck.mo:486 #30 0x000000006ef90bb2 in omc_NFUnitCheck_insertUnitInEquation ( threadData=0x2429330, threadData@entry=0x24295b0, _eq=0x2429338, _eq@entry=0x37bdecf3, __omcQ_24in_5Funit=0x2429340, __omcQ_24in_5Funit@entry=0x37e7f9a3, __omcQ_24in_5FhtCr2U=<optimized out>, __omcQ_24in_5FhtS2U=0x37e6c993, __omcQ_24in_5FhtU2S=0x37e81483, __omcQ_24in_5FfnCache=0x37e6ca53, out_htCr2U=<optimized out>, out_htCr2U@entry=0x2429330, out_htS2U=<optimized out>, out_htS2U@entry=0x2429338, out_htU2S=<optimized out>, out_htU2S@entry=0x2429340, out_fnCache=out_fnCache@entry=0x2429348, out_inconsistentUnits=0x2429368, out_inconsistentUnits@entry=0x24293a0) at C:/home/adrpo33/dev/OpenModelica/OMCompiler/Compiler/NFFrontEnd/NFUnitCheck.mo:486 #31 0x000000006ef90bb2 in omc_NFUnitCheck_insertUnitInEquation ( threadData=0x24295b0, threadData@entry=0x2429830, _eq=0x24295b8, _eq@entry=0x37bdeb73, __omcQ_24in_5Funit=0x24295c0, __omcQ_24in_5Funit@entry=0x37e7f743, __omcQ_24in_5FhtCr2U=<optimized out>, __omcQ_24in_5FhtS2U=0x37e6c993, __omcQ_24in_5FhtU2S=0x37e81483, __omcQ_24in_5FfnCache=0x37e6ca53, out_htCr2U=<optimized out>, out_htCr2U@entry=0x24295b0, out_htS2U=<optimized out>, out_htS2U@entry=0x24295b8, out_htU2S=<optimized out>, out_htU2S@entry=0x24295c0, out_fnCache=out_fnCache@entry=0x24295c8, out_inconsistentUnits=0x24295e8, out_inconsistentUnits@entry=0x2429620) at C:/home/adrpo33/dev/OpenModelica/OMCompiler/Compiler/NFFrontEnd/NFUnitCheck.mo:486 #32 0x000000006ef90bb2 in omc_NFUnitCheck_insertUnitInEquation ( threadData=0x2429830, threadData@entry=0x2429ab0, _eq=0x2429838, _eq@entry=0x37bde9f3, __omcQ_24in_5Funit=0x2429840, __omcQ_24in_5Funit@entry=0x37e7f4e3, __omcQ_24in_5FhtCr2U=<optimized out>, __omcQ_24in_5FhtS2U=0x37e6c993, __omcQ_24in_5FhtU2S=0x37e81483, __omcQ_24in_5FfnCache=0x37e6ca53, out_htCr2U=<optimized out>, out_htCr2U@entry=0x2429830, out_htS2U=<optimized out>, out_htS2U@entry=0x2429838, out_htU2S=<optimized out>, out_htU2S@entry=0x2429840, out_fnCache=out_fnCache@entry=0x2429848, out_inconsistentUnits=0x2429868, out_inconsistentUnits@entry=0x24298a0) at C:/home/adrpo33/dev/OpenModelica/OMCompiler/Compiler/NFFrontEnd/NFUnitCheck.mo:486 #33 0x000000006ef90bb2 in omc_NFUnitCheck_insertUnitInEquation ( threadData=0x2429ab0, threadData@entry=0x2429d80, _eq=0x2429ab8, _eq@entry=0x37bde8a3, __omcQ_24in_5Funit=0x2429ac0, __omcQ_24in_5Funit@entry=0x37e7f283, __omcQ_24in_5FhtCr2U=<optimized out>, __omcQ_24in_5FhtS2U=0x37e6c993, __omcQ_24in_5FhtU2S=0x37e81483, __omcQ_24in_5FfnCache=0x37e6ca53, out_htCr2U=<optimized out>, out_htCr2U@entry=0x2429ab0, out_htS2U=<optimized out>, out_htS2U@entry=0x2429ab8, out_htU2S=<optimized out>, out_htU2S@entry=0x2429ac0, out_fnCache=out_fnCache@entry=0x2429ac8, out_inconsistentUnits=0x2429ae8, out_inconsistentUnits@entry=0x2429b20) at C:/home/adrpo33/dev/OpenModelica/OMCompiler/Compiler/NFFrontEnd/NFUnitCheck.mo:486 #34 0x000000006ef90bb2 in omc_NFUnitCheck_insertUnitInEquation ( threadData=0x2429d80, threadData@entry=0x242a000, _eq=0x2429d88, __omcQ_24in_5Funit=0x2429d90, __omcQ_24in_5Funit@entry=0x242a010, __omcQ_24in_5FhtCr2U=<optimized out>, __omcQ_24in_5FhtS2U=0x37e6c993, __omcQ_24in_5FhtU2S=0x37e81483, __omcQ_24in_5FfnCache=0x37e6ca53, out_htCr2U=<optimized out>, out_htCr2U@entry=0x2429d80, out_htS2U=<optimized out>, out_htS2U@entry=0x2429d88, out_htU2S=<optimized out>, out_htU2S@entry=0x2429d90, out_fnCache=out_fnCache@entry=0x2429d98, out_inconsistentUnits=out_inconsistentUnits@entry=0x2429da0) at C:/home/adrpo33/dev/OpenModelica/OMCompiler/Compiler/NFFrontEnd/NFUnitCheck.mo:486 #35 0x000000006ef90ced in omc_NFUnitCheck_insertUnitInEquation ( threadData=0x242a000, threadData@entry=0x242a230, _eq=0x242a008, __omcQ_24in_5Funit=0x242a010, __omcQ_24in_5Funit@entry=0x242a240, __omcQ_24in_5FhtCr2U=<optimized out>, __omcQ_24in_5FhtS2U=0x37e6c993, __omcQ_24in_5FhtU2S=0x37e81483, __omcQ_24in_5FfnCache=0x37e6ca53, out_htCr2U=<optimized out>, out_htCr2U@entry=0x242a000, out_htS2U=<optimized out>, out_htS2U@entry=0x242a008, out_htU2S=<optimized out>, out_htU2S@entry=0x242a010, out_fnCache=out_fnCache@entry=0x242a018, out_inconsistentUnits=out_inconsistentUnits@entry=0x242a020) at C:/home/adrpo33/dev/OpenModelica/OMCompiler/Compiler/NFFrontEnd/NFUnitCheck.mo:473 #36 0x000000006ef90ced in omc_NFUnitCheck_insertUnitInEquation ( threadData=0x242a230, threadData@entry=0x242a4b0, _eq=0x242a238, _eq@entry=0x37bde303, __omcQ_24in_5Funit=0x242a240, __omcQ_24in_5Funit@entry=0x37e80b63, __omcQ_24in_5FhtCr2U=<optimized out>, __omcQ_24in_5FhtS2U=0x37e6c993, __omcQ_24in_5FhtU2S=0x37e81483, __omcQ_24in_5FfnCache=0x37e6ca53, out_htCr2U=<optimized out>, out_htCr2U@entry=0x242a230, out_htS2U=<optimized out>, out_htS2U@entry=0x242a238, out_htU2S=<optimized out>, out_htU2S@entry=0x242a240, out_fnCache=out_fnCache@entry=0x242a248, out_inconsistentUnits=0x242a268, out_inconsistentUnits@entry=0x242a2a0) at C:/home/adrpo33/dev/OpenModelica/OMCompiler/Compiler/NFFrontEnd/NFUnitCheck.mo:473 #37 0x000000006ef90bb2 in omc_NFUnitCheck_insertUnitInEquation ( threadData=0x242a4b0, threadData@entry=0x242a780, _eq=0x242a4b8, _eq@entry=0x37bde1e3, __omcQ_24in_5Funit=0x242a4c0, __omcQ_24in_5Funit@entry=0x37e80903, __omcQ_24in_5FhtCr2U=<optimized out>, __omcQ_24in_5FhtS2U=0x37e6c993, __omcQ_24in_5FhtU2S=0x37e81483, __omcQ_24in_5FfnCache=0x37e6ca53, out_htCr2U=<optimized out>, out_htCr2U@entry=0x242a4b0, out_htS2U=<optimized out>, out_htS2U@entry=0x242a4b8, out_htU2S=<optimized out>, out_htU2S@entry=0x242a4c0, out_fnCache=out_fnCache@entry=0x242a4c8, out_inconsistentUnits=0x242a4e8, out_inconsistentUnits@entry=0x242a520) at C:/home/adrpo33/dev/OpenModelica/OMCompiler/Compiler/NFFrontEnd/NFUnitCheck.mo:486 #38 0x000000006ef90bb2 in omc_NFUnitCheck_insertUnitInEquation ( threadData=0x242a780, threadData@entry=0x242aa00, _eq=0x242a788, __omcQ_24in_5Funit=0x242a790, __omcQ_24in_5Funit@entry=0x242aa10, __omcQ_24in_5FhtCr2U=<optimized out>, __omcQ_24in_5FhtS2U=0x37e6c993, __omcQ_24in_5FhtU2S=0x37e81483, __omcQ_24in_5FfnCache=0x37e6ca53, out_htCr2U=<optimized out>, out_htCr2U@entry=0x242a780, out_htS2U=<optimized out>, out_htS2U@entry=0x242a788, out_htU2S=<optimized out>, out_htU2S@entry=0x242a790, out_fnCache=out_fnCache@entry=0x242a798, out_inconsistentUnits=out_inconsistentUnits@entry=0x242a7a0) at C:/home/adrpo33/dev/OpenModelica/OMCompiler/Compiler/NFFrontEnd/NFUnitCheck.mo:486 #39 0x000000006ef90ced in omc_NFUnitCheck_insertUnitInEquation ( threadData=0x242aa00, threadData@entry=0x242ac80, _eq=0x242aa08, __omcQ_24in_5Funit=0x242aa10, __omcQ_24in_5Funit@entry=0x242ac90, __omcQ_24in_5FhtCr2U=<optimized out>, __omcQ_24in_5FhtS2U=0x37e6c993, __omcQ_24in_5FhtU2S=0x37e81483, __omcQ_24in_5FfnCache=0x37e6ca53, out_htCr2U=<optimized out>, out_htCr2U@entry=0x242aa00, out_htS2U=<optimized out>, out_htS2U@entry=0x242aa08, out_htU2S=<optimized out>, out_htU2S@entry=0x242aa10, out_fnCache=out_fnCache@entry=0x242aa18, out_inconsistentUnits=out_inconsistentUnits@entry=0x242aa20) at C:/home/adrpo33/dev/OpenModelica/OMCompiler/Compiler/NFFrontEnd/NFUnitCheck.mo:473 #40 0x000000006ef90ced in omc_NFUnitCheck_insertUnitInEquation ( threadData=0x242ac80, threadData@entry=0x242af00, _eq=0x242ac88, __omcQ_24in_5Funit=0x242ac90, __omcQ_24in_5Funit@entry=0x242af10, __omcQ_24in_5FhtCr2U=<optimized out>, __omcQ_24in_5FhtS2U=0x37e6c993, __omcQ_24in_5FhtU2S=0x37e81483, __omcQ_24in_5FfnCache=0x37e6ca53, out_htCr2U=<optimized out>, out_htCr2U@entry=0x242ac80, out_htS2U=<optimized out>, out_htS2U@entry=0x242ac88, out_htU2S=<optimized out>, out_htU2S@entry=0x242ac90, out_fnCache=out_fnCache@entry=0x242ac98, out_inconsistentUnits=out_inconsistentUnits@entry=0x242aca0) at C:/home/adrpo33/dev/OpenModelica/OMCompiler/Compiler/NFFrontEnd/NFUnitCheck.mo:473 #41 0x000000006ef90ced in omc_NFUnitCheck_insertUnitInEquation ( threadData=0x242af00, threadData@entry=0x242b180, _eq=0x242af08, __omcQ_24in_5Funit=0x242af10, __omcQ_24in_5Funit@entry=0x242b190, __omcQ_24in_5FhtCr2U=<optimized out>, __omcQ_24in_5FhtS2U=0x37e6c993, __omcQ_24in_5FhtU2S=0x37e81483, __omcQ_24in_5FfnCache=0x37e6ca53, out_htCr2U=<optimized out>, out_htCr2U@entry=0x242af00, out_htS2U=<optimized out>, out_htS2U@entry=0x242af08, out_htU2S=<optimized out>, out_htU2S@entry=0x242af10, out_fnCache=out_fnCache@entry=0x242af18, out_inconsistentUnits=out_inconsistentUnits@entry=0x242af20) at C:/home/adrpo33/dev/OpenModelica/OMCompiler/Compiler/NFFrontEnd/NFUnitCheck.mo:473 #42 0x000000006ef90ced in omc_NFUnitCheck_insertUnitInEquation ( threadData=0x242b180, threadData@entry=0x242b400, _eq=0x242b188, __omcQ_24in_5Funit=0x242b190, __omcQ_24in_5Funit@entry=0x242b410, __omcQ_24in_5FhtCr2U=<optimized out>, __omcQ_24in_5FhtS2U=0x37e6c993, __omcQ_24in_5FhtU2S=0x37e81483, __omcQ_24in_5FfnCache=0x37e6ca53, out_htCr2U=<optimized out>, out_htCr2U@entry=0x242b180, out_htS2U=<optimized out>, out_htS2U@entry=0x242b188, out_htU2S=<optimized out>, out_htU2S@entry=0x242b190, out_fnCache=out_fnCache@entry=0x242b198, out_inconsistentUnits=out_inconsistentUnits@entry=0x242b1a0) at C:/home/adrpo33/dev/OpenModelica/OMCompiler/Compiler/NFFrontEnd/NFUnitCheck.mo:473 #43 0x000000006ef90ced in omc_NFUnitCheck_insertUnitInEquation ( threadData=0x242b400, threadData@entry=0x242b680, _eq=0x242b408, __omcQ_24in_5Funit=0x242b410, __omcQ_24in_5Funit@entry=0x242b690, __omcQ_24in_5FhtCr2U=<optimized out>, __omcQ_24in_5FhtS2U=0x37e6c993, __omcQ_24in_5FhtU2S=0x37e81483, __omcQ_24in_5FfnCache=0x37e6ca53, out_htCr2U=<optimized out>, out_htCr2U@entry=0x242b400, out_htS2U=<optimized out>, out_htS2U@entry=0x242b408, out_htU2S=<optimized out>, out_htU2S@entry=0x242b410, out_fnCache=out_fnCache@entry=0x242b418, out_inconsistentUnits=out_inconsistentUnits@entry=0x242b420) at C:/home/adrpo33/dev/OpenModelica/OMCompiler/Compiler/NFFrontEnd/NFUnitCheck.mo:473 #44 0x000000006ef90ced in omc_NFUnitCheck_insertUnitInEquation ( threadData=0x242b680, threadData@entry=0x242b900, _eq=0x242b688, __omcQ_24in_5Funit=0x242b690, __omcQ_24in_5Funit@entry=0x242b910, __omcQ_24in_5FhtCr2U=<optimized out>, __omcQ_24in_5FhtS2U=0x37e6c993, __omcQ_24in_5FhtU2S=0x37e81483, __omcQ_24in_5FfnCache=0x37e6ca53, out_htCr2U=<optimized out>, out_htCr2U@entry=0x242b680, out_htS2U=<optimized out>, out_htS2U@entry=0x242b688, out_htU2S=<optimized out>, out_htU2S@entry=0x242b690, out_fnCache=out_fnCache@entry=0x242b698, out_inconsistentUnits=out_inconsistentUnits@entry=0x242b6a0) at C:/home/adrpo33/dev/OpenModelica/OMCompiler/Compiler/NFFrontEnd/NFUnitCheck.mo:473 #45 0x000000006ef90ced in omc_NFUnitCheck_insertUnitInEquation ( threadData=0x242b900, threadData@entry=0x242bb80, _eq=0x242b908, __omcQ_24in_5Funit=0x242b910, __omcQ_24in_5Funit@entry=0x242bb90, __omcQ_24in_5FhtCr2U=<optimized out>, __omcQ_24in_5FhtS2U=0x37e6c993, __omcQ_24in_5FhtU2S=0x37e81483, __omcQ_24in_5FfnCache=0x37e6ca53, out_htCr2U=<optimized out>, out_htCr2U@entry=0x242b900, out_htS2U=<optimized out>, out_htS2U@entry=0x242b908, out_htU2S=<optimized out>, out_htU2S@entry=0x242b910, out_fnCache=out_fnCache@entry=0x242b918, out_inconsistentUnits=out_inconsistentUnits@entry=0x242b920) at C:/home/adrpo33/dev/OpenModelica/OMCompiler/Compiler/NFFrontEnd/NFUnitCheck.mo:473 #46 0x000000006ef90ced in omc_NFUnitCheck_insertUnitInEquation ( threadData=0x242bb80, threadData@entry=0x242be00, _eq=0x242bb88, __omcQ_24in_5Funit=0x242bb90, __omcQ_24in_5Funit@entry=0x242be10, __omcQ_24in_5FhtCr2U=<optimized out>, __omcQ_24in_5FhtS2U=0x37e6c993, __omcQ_24in_5FhtU2S=0x37e81483, __omcQ_24in_5FfnCache=0x37e6ca53, out_htCr2U=<optimized out>, out_htCr2U@entry=0x242bb80, out_htS2U=<optimized out>, out_htS2U@entry=0x242bb88, out_htU2S=<optimized out>, out_htU2S@entry=0x242bb90, out_fnCache=out_fnCache@entry=0x242bb98, out_inconsistentUnits=out_inconsistentUnits@entry=0x242bba0) at C:/home/adrpo33/dev/OpenModelica/OMCompiler/Compiler/NFFrontEnd/NFUnitCheck.mo:473 #47 0x000000006ef90ced in omc_NFUnitCheck_insertUnitInEquation ( threadData=0x242be00, threadData@entry=0x242c080, _eq=0x242be08, __omcQ_24in_5Funit=0x242be10, __omcQ_24in_5Funit@entry=0x242c090, __omcQ_24in_5FhtCr2U=<optimized out>, __omcQ_24in_5FhtS2U=0x37e6c993, __omcQ_24in_5FhtU2S=0x37e81483, __omcQ_24in_5FfnCache=0x37e6ca53, out_htCr2U=<optimized out>, out_htCr2U@entry=0x242be00, out_htS2U=<optimized out>, out_htS2U@entry=0x242be08, out_htU2S=<optimized out>, out_htU2S@entry=0x242be10, out_fnCache=out_fnCache@entry=0x242be18, out_inconsistentUnits=out_inconsistentUnits@entry=0x242be20) at C:/home/adrpo33/dev/OpenModelica/OMCompiler/Compiler/NFFrontEnd/NFUnitCheck.mo:473 #48 0x000000006ef90ced in omc_NFUnitCheck_insertUnitInEquation ( threadData=0x242c080, threadData@entry=0x242c300, _eq=0x242c088, __omcQ_24in_5Funit=0x242c090, __omcQ_24in_5Funit@entry=0x242c310, __omcQ_24in_5FhtCr2U=<optimized out>, __omcQ_24in_5FhtS2U=0x37e6c993, __omcQ_24in_5FhtU2S=0x37e81483, __omcQ_24in_5FfnCache=0x37e6ca53, out_htCr2U=<optimized out>, out_htCr2U@entry=0x242c080, out_htS2U=<optimized out>, out_htS2U@entry=0x242c088, out_htU2S=<optimized out>, out_htU2S@entry=0x242c090, out_fnCache=out_fnCache@entry=0x242c098, out_inconsistentUnits=out_inconsistentUnits@entry=0x242c0a0) at C:/home/adrpo33/dev/OpenModelica/OMCompiler/Compiler/NFFrontEnd/NFUnitCheck.mo:473 #49 0x000000006ef90ced in omc_NFUnitCheck_insertUnitInEquation ( threadData=0x242c300, threadData@entry=0x242c580, _eq=0x242c308, __omcQ_24in_5Funit=0x242c310, __omcQ_24in_5Funit@entry=0x242c590, __omcQ_24in_5FhtCr2U=<optimized out>, __omcQ_24in_5FhtS2U=0x37e6c993, __omcQ_24in_5FhtU2S=0x37e81483, __omcQ_24in_5FfnCache=0x37e6ca53, out_htCr2U=<optimized out>, out_htCr2U@entry=0x242c300, out_htS2U=<optimized out>, out_htS2U@entry=0x242c308, out_htU2S=<optimized out>, out_htU2S@entry=0x242c310, out_fnCache=out_fnCache@entry=0x242c318, out_inconsistentUnits=out_inconsistentUnits@entry=0x242c320) at C:/home/adrpo33/dev/OpenModelica/OMCompiler/Compiler/NFFrontEnd/NFUnitCheck.mo:473 #50 0x000000006ef90ced in omc_NFUnitCheck_insertUnitInEquation ( threadData=0x242c580, threadData@entry=0x242c7d8, _eq=0x242c588, __omcQ_24in_5Funit=0x242c590, __omcQ_24in_5Funit@entry=0x242c7e8, __omcQ_24in_5FhtCr2U=<optimized out>, __omcQ_24in_5FhtS2U=0x37e6c993, __omcQ_24in_5FhtU2S=0x37e81483, __omcQ_24in_5FfnCache=0x37e6ca53, out_htCr2U=<optimized out>, out_htCr2U@entry=0x242c580, out_htS2U=<optimized out>, out_htS2U@entry=0x242c588, out_htU2S=<optimized out>, out_htU2S@entry=0x242c590, out_fnCache=out_fnCache@entry=0x242c598, out_inconsistentUnits=out_inconsistentUnits@entry=0x242c5a0) at C:/home/adrpo33/dev/OpenModelica/OMCompiler/Compiler/NFFrontEnd/NFUnitCheck.mo:473 #51 0x000000006ef90ced in omc_NFUnitCheck_insertUnitInEquation ( threadData=0x242c7d8, threadData@entry=0x242fae0, _eq=0x242c7e0, _eq@entry=0x37e81303, __omcQ_24in_5Funit=0x242c7e8, __omcQ_24in_5Funit@entry=0x6fff9d53 <_OMC_LIT_STRUCT2+3>, __omcQ_24in_5FhtCr2U=<optimized out>, __omcQ_24in_5FhtS2U=0x37e6c993, __omcQ_24in_5FhtU2S=0x37e81483, __omcQ_24in_5FfnCache=0x37e6ca53, out_htCr2U=<optimized out>, out_htCr2U@entry=0x242c810, out_htS2U=<optimized out>, out_htS2U@entry=0x242c818, out_htU2S=<optimized out>, out_htU2S@entry=0x242c820, out_fnCache=0x242c7f0, out_fnCache@entry=0x242c828, out_inconsistentUnits=0x242c7f8, out_inconsistentUnits@entry=0x242c830) at C:/home/adrpo33/dev/OpenModelica/OMCompiler/Compiler/NFFrontEnd/NFUnitCheck.mo:473 #52 0x000000006ef915c1 in omc_NFUnitCheck_foldEquation2 ( threadData=threadData@entry=0x242fae0, _eq=_eq@entry=0x37e60383, _dumpEqInitStruct=<optimized out>, __omcQ_24in_5FhtCr2U=<optimized out>, __omcQ_24in_5FhtS2U=0x37e6c993, __omcQ_24in_5FhtU2S=__omcQ_24in_5FhtU2S@entry=0x37e81483, __omcQ_24in_5FfnCache=__omcQ_24in_5FfnCache@entry=0x37e6ca53, out_htS2U=0x242c8f0, out_htS2U@entry=0x242c928, out_htU2S=0x242c8f8, out_htU2S@entry=0x242c930, out_fnCache=0x242c900, out_fnCache@entry=0x242c938, out_inconsistentUnits=0x242c908, out_inconsistentUnits@entry=0x242c940) at C:/home/adrpo33/dev/OpenModelica/OMCompiler/Compiler/NFFrontEnd/NFUnitCheck.mo:368 #53 0x000000006ef91bba in omc_NFUnitCheck_foldEquation ( threadData=threadData@entry=0x242fae0, _eq=0x37e60383, __omcQ_24in_5FhtCr2U=__omcQ_24in_5FhtCr2U@entry=0x37e81393, __omcQ_24in_5FhtS2U=<optimized out>, __omcQ_24in_5FhtU2S=0x37e81483, __omcQ_24in_5FfnCache=0x37e6ca53, _dumpEqInitStruct=_dumpEqInitStruct@entry=0 '\000', out_htS2U=0x242c9d8, out_htS2U@entry=0x242ca10, out_htU2S=0x242c9e0, out_htU2S@entry=0x242ca18, out_fnCache=0x242c9e8, out_fnCache@entry=0x242ca20) at C:/home/adrpo33/dev/OpenModelica/OMCompiler/Compiler/NFFrontEnd/NFUnitCheck.mo:283 #54 0x000000006ef91e02 in omc_NFUnitCheck_foldBindingExp ( threadData=threadData@entry=0x242fae0, _var=0x37e62783, __omcQ_24in_5FhtCr2U=0x37e81393, __omcQ_24in_5FhtS2U=<optimized out>, __omcQ_24in_5FhtU2S=0x37e81483, __omcQ_24in_5FfnCache=0x37e6ca53, _dumpEqInitStruct=_dumpEqInitStruct@entry=0 '\000', out_htS2U=out_htS2U@entry=0x242caa8, out_htU2S=out_htU2S@entry=0x242cab0, out_fnCache=out_fnCache@entry=0x242cab8) at C:/home/adrpo33/dev/OpenModelica/OMCompiler/Compiler/NFFrontEnd/NFUnitCheck.mo:268 #55 0x000000006ef91f06 in omc_NFUnitCheck_checkModelConsistency ( threadData=0x242fae0, threadData@entry=0x242cd4f, _variables=<optimized out>, _equations=0x242cbb8, _equations@entry=0x70019913 <mmc_nil+3>, _initialEquations=0x0, _initialEquations@entry=0x37e6c993, __omcQ_24in_5FhtCr2U=0x37e81393, __omcQ_24in_5FhtS2U=0x37e6c993, __omcQ_24in_5FhtU2S=0x37e81483, __omcQ_24in_5FfnCache=__omcQ_24in_5FfnCache@entry=0x37e6ca53, out_htS2U=0x242cbb0, out_htS2U@entry=0x242cbe0, out_htU2S=<optimized out>, out_htU2S@entry=0x242cbe8, out_fnCache=<optimized out>, out_fnCache@entry=0x0) at C:/home/adrpo33/dev/OpenModelica/OMCompiler/Compiler/NFFrontEnd/NFUnitCheck.mo:241 #56 0x000000006ef92e2f in omc_NFUnitCheck_checkUnits (threadData=0x242cd4f, threadData@entry=0x242fae0, __omcQ_24in_5FflatModel=0x242fae0) at C:/home/adrpo33/dev/OpenModelica/OMCompiler/Compiler/NFFrontEnd/NFUnitCheck.mo:116 #57 0x000000006f00453d in omc_NFInst_instClassInProgram ( threadData=0x242fae0, threadData@entry=0x37efe463, _classPath=_classPath@entry=0x0, _program=_program@entry=0x0, _dumpFlat=_dumpFlat@entry=-48 'Ð', out_functions=0x242cdd8, out_functions@entry=0x242cde0, out_flatString=0x242cde0, out_flatString@entry=0x242cde8) at C:/home/adrpo33/dev/OpenModelica/OMCompiler/Compiler/NFFrontEnd/NFInst.mo:169 #58 0x000000006eeff160 in omc_CevalScriptBackend_runFrontEndWorkNF ( threadData=0x37efe463, threadData@entry=0x0, _className=0x0, _className@entry=0x242d2a0, _dumpFlat=_dumpFlat@entry=0 '\000', out_functions=0x242cfa8, out_functions@entry=0x242cff0, out_flatString=<optimized out>, out_flatString@entry=0x242cfd0) at C:/home/adrpo33/dev/OpenModelica/OMCompiler/Compiler/Script/CevalScriptBackend.mo:3364 #59 0x000000006eeff669 in omc_CevalScriptBackend_runFrontEndWork ( threadData=0x0, threadData@entry=0x37f17503, _inCache=_inCache@entry=0x3e, _inEnv=<optimized out>, _className=0x242d2a0, _className@entry=0x0, _relaxedFrontEnd=_relaxedFrontEnd@entry=0 '\000', _dumpFlat=<optimized out>, _dumpFlat@entry=-37 'Û', out_env=0x242d298, out_env@entry=0x242d2a0, out_dae=0x242d2a8, out_dae@entry=0x242d2b0, out_flatString=<optimized out>, out_flatString@entry=0x242d2a8) at C:/home/adrpo33/dev/OpenModelica/OMCompiler/Compiler/Script/CevalScriptBackend.mo:3275 #60 0x000000006ef0037e in omc_CevalScriptBackend_runFrontEnd ( threadData=0x37f17503, threadData@entry=0x242d8b8, __omcQ_24in_5Fcache=0x3e, __omcQ_24in_5Fcache@entry=0x37ef7ae3, __omcQ_24in_5Fenv=<optimized out>, _className=_className@entry=0x0, _relaxedFrontEnd=<optimized out>, _relaxedFrontEnd@entry=0 '\000', _dumpFlat=_dumpFlat@entry=0 '\000', out_env=0x242d458, out_env@entry=0x242d480, out_odae=0x242d450, out_odae@entry=0x242d478, out_flatString=out_flatString@entry=0x0) at C:/home/adrpo33/dev/OpenModelica/OMCompiler/Compiler/Script/CevalScriptBackend.mo:3188 #61 0x000000006ef00bcb in omc_CevalScriptBackend_checkModel ( threadData=0x242d8b8, threadData@entry=0x0, __omcQ_24in_5Fcache=<optimized out>, _inEnv=<optimized out>, _className=0x0, _className@entry=0x37efe463, _inMsg=0x37effbc3, _inMsg@entry=0x7ffbfcf2bdf8, out_outValue=<optimized out>, out_outValue@entry=0x242d8f0) at C:/home/adrpo33/dev/OpenModelica/OMCompiler/Compiler/Script/CevalScriptBackend.mo:5603 #62 0x000000006ef182ab in omc_CevalScriptBackend_cevalInteractiveFunctions3 ( threadData=0x0, threadData@entry=0x242e908, _inCache=0x6f66ebeb <omc_Lookup_lookupVarInPackages+283>, _inCache@entry=0x242e8ef, _inEnv=0x0, _inEnv@entry=0x701b309b <mmc_nil+3>, _inFunctionName=0x7ffbfcddd580 <ntdll!RtlUnwindEx+240>, _inFunctionName@entry=0x0, _inVals=0x37effa63, _inVals@entry=0x242eb50, _msg=0x37effbc3, _msg@entry=0x0, out_outValue=0x242e268, out_outValue@entry=0x242e2a0) at C:/home/adrpo33/dev/OpenModelica/OMCompiler/Compiler/Script/CevalScriptBackend.mo:1321 #63 0x000000006f535447 in omc_CevalScript_cevalInteractiveFunctions2 ( threadData=0x242e908, threadData@entry=0x37dbafc3, _inCache=0x242e8ef, _inCache@entry=0x37f17503, _inEnv=0x701b309b <mmc_nil+3>, _inEnv@entry=0x37ef7ae3, _inFunctionName=0x0, _inFunctionName@entry=0x377d94c3, _inVals=0x37effa63, _msg=0x37effbc3, _msg@entry=0x1, out_outValue=0x242e918, out_outValue@entry=0x242e930) at C:/home/adrpo33/dev/OpenModelica/OMCompiler/Compiler/Script/CevalScript.mo:1792 #64 0x000000006f53620b in omc_CevalScript_cevalInteractiveFunctions ( threadData=0x37dbafc3, threadData@entry=0x242ed18, _inCache=<optimized out>, _inEnv=<optimized out>, _inExp=<optimized out>, _msg=0x37effbc3, _numIter=_numIter@entry=1, out_outValue=0x242eb38, out_outValue@entry=0x242eb70) at C:/home/adrpo33/dev/OpenModelica/OMCompiler/Compiler/Script/CevalScript.mo:537 #65 0x000000006f5370cf in omc_CevalScript_ceval (threadData=0x242ed18, threadData@entry=0xadb2f03, _inCache=_inCache@entry=0x37f17503, _inEnv=_inEnv@entry=0x37ef7ae3, _inExp=<optimized out>, _inBoolean=_inBoolean@entry=1 '\001', _inMsg=0x37effbc3, _numIter=_numIter@entry=0, out_outValue=<optimized out>, out_outValue@entry=0x242ed28) at C:/home/adrpo33/dev/OpenModelica/OMCompiler/Compiler/Script/CevalScript.mo:169 #66 0x000000006f51e646 in omc_Interactive_evaluateExpr (threadData=0xadb2f03, threadData@entry=0xada8d53, _inExp=<optimized out>, _info=0x1, _info@entry=0x7ffbfcdfb997 <ntdll!RtlAllocateHeap+423>) at C:/home/adrpo33/dev/OpenModelica/OMCompiler/Compiler/Script/Interactive.mo:734 #67 0x000000006f51e854 in omc_Interactive_evaluateExprToStr ( threadData=0xada8d53, threadData@entry=0x1, _inExp=_inExp@entry=0xada8d83, _info=0x7ffbfcdfb997 <ntdll!RtlAllocateHeap+423>, _info@entry=0xadb2f03) at C:/home/adrpo33/dev/OpenModelica/OMCompiler/Compiler/Script/Interactive.mo:776 #68 0x000000006f520853 in omc_Interactive_evaluate2 (threadData=0x1, threadData@entry=0x242fae0, _inStatements=<optimized out>) at C:/home/adrpo33/dev/OpenModelica/OMCompiler/Compiler/Script/Interactive.mo:357 #69 0x000000006f520fd8 in omc_Interactive_evaluateToStdOut ( threadData=0x242fae0, threadData@entry=0x0, _statements=_statements@entry=0xada8c63, _verbose=0 '\000', _verbose@entry=1 '\001') at C:/home/adrpo33/dev/OpenModelica/OMCompiler/Compiler/Script/Interactive.mo:201 #70 0x000000006f36752f in omc_Main_translateFile (threadData=0x0, threadData@entry=0xada2000, _inStringLst=_inStringLst@entry=0xae27db0) at C:/home/adrpo33/dev/OpenModelica/OMCompiler/Compiler/Main/Main.mo:491 #71 0x000000006f368cb8 in omc_Main_main2 (threadData=0xada2000, threadData@entry=0x242fbe0, _args=0xae27db0, _args@entry=0xada6463) at C:/home/adrpo33/dev/OpenModelica/OMCompiler/Compiler/Main/Main.mo:882 #72 0x000000006f3692a1 in omc_Main_main (threadData=0x242fbe0, threadData@entry=0x0, _args=0x0, _args@entry=0x37dba573) at C:/home/adrpo33/dev/OpenModelica/OMCompiler/Compiler/Main/Main.mo:816 #73 0x000000006f822c3b in __omc_main (argc=<optimized out>, argv=<optimized out>) at build/_main_omc.c:66 #74 0x00000000004013ed in __tmainCRTStartup () at C:/repo/mingw-w64-crt-git/src/mingw-w64/mingw-w64-crt/crt/crtexe.c:334 #75 0x000000000040152b in mainCRTStartup () at C:/repo/mingw-w64-crt-git/src/mingw-w64/mingw-w64-crt/crt/crtexe.c:212
comment:3 by , 4 years ago
@casella: I stripped down a quite large and sophisticated fluid model that had been grown using another tool and fails to check. After lots of cycles of removal of submodels and re-addition of resulting missing variables, I was quite surprised to end up with something like this in a base class.
Btw. the check might not really be endless, but suffer from extreme bad computational complexity. The check is ok for 20 inputs, takes about half a minute for 25 inputs, a couple of minutes for 30 inputs and becomes very long for 40 inputs.
comment:4 by , 4 years ago
Cc: | added |
---|
The issue is that NFUnitCheck.insertUnitInEquation handles e.g. binary adds like this:
// ADD equal summands case Expression.BINARY(exp1, Operator.OPERATOR(op = Op.ADD), exp2) algorithm (unit1 as Unit.UNIT(), htCr2U, htS2U, htU2S, fnCache, icu1) := insertUnitInEquation(exp1, unit, htCr2U, htS2U, htU2S, fnCache); (unit2, htCr2U, htS2U, htU2S, fnCache, icu2) := insertUnitInEquation(exp2, unit1, htCr2U, htS2U, htU2S, fnCache); (true, op_unit, htCr2U) := unitTypesEqual(unit1, unit2, htCr2U); then (op_unit, List.append_reverse(icu1, icu2)); // ADD equal summands case Expression.BINARY(exp1, Operator.OPERATOR(op = Op.ADD), exp2) algorithm (unit2, htCr2U, htS2U, htU2S, fnCache, icu1) := insertUnitInEquation(exp2, unit, htCr2U, htS2U, htU2S, fnCache); (unit1, htCr2U, htS2U, htU2S, fnCache, icu2) := insertUnitInEquation(exp1, unit2, htCr2U, htS2U, htU2S, fnCache); (true, op_unit, htCr2U) := unitTypesEqual(unit1, unit2, htCr2U); then (op_unit, List.append_reverse(icu1, icu2)); // ADD unequal summands case Expression.BINARY(exp1, Operator.OPERATOR(op = Op.ADD), exp2) algorithm (unit1 as Unit.UNIT(), htCr2U, htS2U, htU2S, fnCache, icu1) := insertUnitInEquation(exp1, unit, htCr2U, htS2U, htU2S, fnCache); (unit2, htCr2U, htS2U, htU2S, fnCache, icu2) := insertUnitInEquation(exp2, unit1, htCr2U, htS2U, htU2S, fnCache); (false, _, _) := unitTypesEqual(unit1, unit2, htCr2U); then (Unit.MASTER({}), {(exp1, unit1), (exp2, unit2)} :: List.append_reverse(icu1, icu2)); // ADD unequal summands case Expression.BINARY(exp1, Operator.OPERATOR(op = Op.ADD), exp2) algorithm (unit2, htCr2U, htS2U, htU2S, fnCache, icu1) := insertUnitInEquation(exp2, unit, htCr2U, htS2U, htU2S, fnCache); (unit1, htCr2U, htS2U, htU2S, fnCache, icu2) := insertUnitInEquation(exp1, unit2, htCr2U, htS2U, htU2S, fnCache); (false, _, _) := unitTypesEqual(unit1, unit2, htCr2U); then (Unit.MASTER({}), {(exp1, unit1), (exp2, unit2)} :: List.append_reverse(icu1, icu2));
For e.g. x1 + x2 + x3 + x4 it will recurse into x1 + x2 + x3, then x1 + x2, then x1, which has no unit so it hits the else-case and returns a "master" unit. Then it goes back up to x1 + x2 which fails because the return unit isn't UNIT()
, tries the next case and recurses into x2, and so on. So the complexity is O(2n), which isn't exactly ideal.
One solution would be to rewrite insertUnitInEquation
such that it can't fail and combine all the cases for each operator into one case, which would mean only one call is neeed for each term and would make the algorithm linear instead. At the moment the calls depend on each other though, since the resulting unit from the first call is passed to the second call. If the calls could be made independent on each other it would be easy to fix the issue.
I don't understand the unit checking well enough to fix that though, but maybe someone someone else does (or knows whom to ask)?
comment:5 by , 4 years ago
Just two observations: the old frontend didn't have this problem. Moreover, the model translates without problem using the new frontend. Maybe something can be borrowed from the old frontend or from model translation for the new Check Model?
comment:6 by , 4 years ago
Cc: | added |
---|---|
Milestone: | 1.16.0 → 2.0.0 |
Priority: | critical → blocker |
In the meantime I'll set it as a blocker for 2.0.0, so we don't forget about this. @rfranke, is this urgent to fix?
follow-up: 9 comment:7 by , 4 years ago
It appears that this version of the model works:
model EndlessCheck2 input Real u1, u2, u3, u4, u5, u6, u7, u8, u9, u10; input Real u11, u12, u13, u14, u15, u16, u17, u18, u19, u20; input Real u21, u22, u23, u24, u25, u26, u27, u28, u29, u30; input Real u31, u32, u33, u34, u35, u36, u37, u38, u39, u40; output Real y = sum({u1, u2, u3, u4, u5, u6, u7, u8, u9, u10, u11, u12, u13, u14, u15, u16, u17, u18, u19, u20, u21, u22, u23, u24, u25, u26, u27, u28, u29, u30, u31, u32, u33, u34, u35, u36, u37, u38, u39, u40}); end EndlessCheck2;
even that one:
model EndlessCheck3 input Real u1, u2, u3, u4, u5, u6, u7, u8, u9, u10; input Real u11, u12, u13, u14, u15, u16, u17, u18, u19, u20; input Real u21, u22, u23, u24, u25, u26, u27, u28, u29, u30; input Real u31, u32, u33, u34, u35, u36, u37, u38, u39, u40; output Real y = sum({u1 + u2 + u3 + u4 + u5 + u6 + u7 + u8 + u9 + u10 + u11 + u12 + u13 + u14 + u15 + u16 + u17 + u18 + u19 + u20 + u21 + u22 + u23 + u24 + u25 + u26 + u27 + u28 + u29 + u30 + u31 + u32 + u33 + u34 + u35 + u36 + u37 + u38 + u39 + u40}); end EndlessCheck3;
So, workarounds do exist.
It is not nice though if you ask people to give OpenModelica another try after years of new frontend development and they come back saying that the new version would be worse. It's neither easy to find such pitfalls in large models. So yes, somehow it is urgent.
comment:8 by , 4 years ago
Milestone: | 2.0.0 → 1.17.0 |
---|
Let's try to get it fixed for 1.17.0 then.
We should discuss who can help @perost in the next devmeeting
comment:9 by , 4 years ago
comment:10 by , 4 years ago
During today's devmeeting @perost mentioned he converted the code from the old frontend, but @rfranke notices that this issue doesn't show up with the old frontend.
Maybe some further investigation is due.
comment:11 by , 4 years ago
The difference between the OF and the NF is that for example x1 + x2 + x3 + x4
is represented by the OF internally as:
x1 + (x2 + (x3 + x4))
while the NF represents it as:
((x1 + x2) + x3) + x4
The NF representation is the same as the SCode, but it seems the OF flips it around for some reason (I suspect during simplification). Adding explicit parentheses to the model so that it looks like the first case makes it work with the NF, but that's of course just a workaround and not a solution.
One solution that's been discussed is to flip the arguments in the NF unit checking so the recursion goes the other way first, but then it's still possible to hit this problem by adding parentheses to the model. The OF seems to be immune to parentheses in this case since it rearranges the expression anyway, but the same issue can be observed in the OF if the expression is changed to for example u1 + u2 - u3 + u4 - u5 + ...
.
My preferred solution would be to rewrite the unit checking algorithm to not have exponential complexity regardless of how the expression is formatted, but as mentioned I'm not sure how to do that.
follow-up: 13 comment:12 by , 4 years ago
I understand from today's discussion that @lochel was originally involved in writing these algorithms in the backend, then @arun3688 took care of porting them to the OF, and finally @perost ported them to the NF.
@lochel, maybe you can have a meeting with @perost and get some hints how to improve this.
In any case, I understand this issue is serious only when the number of operands in the addition are well above 20. I would say this is a quite rare case, in most cases equations involve only a handful of operands.
My recommendation is to fix in 1.16.0 the specific regression @rfranke reported originally, simply by flipping the recursion in the NF as suggested in comment:11. We can then keep this ticket open with lower priority and try to come up with a better solution if we stumble upon other uses case that have the same kind of problem. Otherwise, we have a lot of much higher priority issues to tackle first.
comment:13 by , 4 years ago
Replying to casella:
My recommendation is to fix in 1.16.0 the specific regression @rfranke reported originally, simply by flipping the recursion in the NF as suggested in comment:11.
Ok, I've implemented the workaround in PR 6749. I only changed the cases for addition and subtraction, the other cases (multiplication, division, etc.) are different and large such expressions are presumably much more rare.
comment:16 by , 4 years ago
Milestone: | 1.17.0 → 2.0.0 |
---|---|
Priority: | blocker → normal |
Summary: | Endless model check → Unit checking scales with O(2^N) in case of large expressions involving +-*/ operators |
I rescheduled the ticket and lowered the priority.
@rfranke, please reschedule as a blocker for 1.16.0 if this fix doesn't work with your application.
Nice MWE :)
@rfranke, how did you get that?