Simulation setup
To simulate FMU `Speed_SWC.fmu` with OMSimulator run ```bash $ wine64 /var/lib/jenkins/ws/Sandbox/Andreas/OMSimulator-FMI-Cross-Check/OMSimulatorBinaries/OMSimulator-mingw64/bin/OMSimulator.exe --stripRoot=true --skipCSVHeader=true --addParametersToCSV=true --intervals=500 --suppressPath=true --timeout=60 Speed_SWC.lua ``` Lua file: ```lua -- Lua file for Speed_SWC.fmu oms_setTempDirectory("temp") oms_newModel("model") oms_addSystem("model.root", oms_system_wc) -- instantiate FMU oms_addSubModel("model.root.fmu", "../../../../../../../../../fmus/2.0/cs/win64/ASim/2019FD01/Speed_SWC/Speed_SWC.fmu") -- Simulation settings oms_setSignalFilter("model", ".*") oms_setResultFile("model", "Speed_SWC_out.csv") oms_setStartTime("model", 0.0) oms_setStopTime("model", 0.4) oms_setTolerance("model", 0.01) initialStepSize, minimumStepSize, maximumStepSize, status = oms_getVariableStepSize("model") oms_setVariableStepSize("model", 0.01, minimumStepSize, 0.01) oms_setFixedStepSize("model", 0.01) -- Instantiate, initialize and simulate oms_instantiate("model") oms_initialize("model") oms_simulate("model") oms_terminate("model") oms_delete("model") ``` See the [OMSimulator documentation](https://openmodelica.org/doc/OMSimulator/master/html/index.html) for more information.
Stdout:
info: Result file: Speed_SWC_out.csv (bufferSize=1) Unhandled exception: page fault on read access to 0x00000050 in 64-bit code (0x00000000004b44c3). Register dump: rip:00000000004b44c3 rsp:000000000032ecf8 rbp:00000000007c0ac0 eflags:00010206 ( R- -- I - -P- ) rax:0000000000000000 rbx:00000000007c71b0 rcx:0000000000000000 rdx:00000000007c43c0 rsi:00000000007c6100 rdi:000000000032f1c8 r8:00000000008b0000 r9:00000000007c5ae8 r10:0000000000000002 r11:00000000007c5ab8 r12:00000000006a90e0 r13:0000000000650198 r14:0000000000000000 r15:0000000000000000 Stack dump: 0x000000000032ecf8: 00000000004613b5 000000000032edf0 0x000000000032ed08: 00007fa13158fba5 7fffffffffffffff 0x000000000032ed18: 0000000000000000 0000000000000000 0x000000000032ed28: 8000000000000000 0000000000000000 0x000000000032ed38: 0000000000000000 0000000000000000 0x000000000032ed48: 0000000000000000 0000000000000000 0x000000000032ed58: 0000000000000000 0000000000000000 0x000000000032ed68: 0000000000000000 0000000000000000 0x000000000032ed78: 0000000000000000 0000000000000000 0x000000000032ed88: 0000000000000000 0000000000000000 0x000000000032ed98: 0000000000000000 00000000007c43f0 0x000000000032eda8: 00000000007c6100 000000000032f1c8 Backtrace: =>0 0x00000000004b44c3 in omsimulator (+0xb44c3) (0x00000000007c0ac0) 1 0x00000000004613b5 in omsimulator (+0x613b4) (0x00000000007c0ac0) 2 0x0000000000441bf8 in omsimulator (+0x41bf7) (0x00000000007c0ac0) 3 0x0000000000493fda in omsimulator (+0x93fd9) (0x00000000007c0ac0) 4 0x0000000000496de5 in omsimulator (+0x96de4) (0x00000000007c0ac0) 5 0x000000000041d78f in omsimulator (+0x1d78e) (0x00000000007c0ac0) 6 0x000000000040424d in omsimulator (+0x424c) (0x00000000007c57a0) 7 0x000000000040442b in omsimulator (+0x442a) (0x00000000007c57a0) 8 0x0000000000510bd6 in omsimulator (+0x110bd5) (0x00000000007c57a0) 9 0x000000000051bb7e in omsimulator (+0x11bb7d) (0x00000000007b8738) 0x00000000004b44c3: movq 0x0000000000000050(%rcx),%rcx Modules: Module Address Debug info Name (35 modules) PE 400000- 795000 Dwarf omsimulator ELF 7b400000- 7b80d000 Deferred kernel32
\-PE 7b420000- 7b80d000 \ kernel32 ELF 7bc00000- 7bd16000 Deferred ntdll
\-PE 7bc20000- 7bd16000 \ ntdll ELF 7c000000- 7c004000 Deferred
ELF 7fa12f7af000- 7fa12f9d5000 Deferred imm32
\-PE 7fa12f7c0000- 7fa12f9d5000 \ imm32 ELF 7fa12f9d5000- 7fa12fc07000 Deferred libexpat.so.1 ELF 7fa12fc07000- 7fa12fe4c000 Deferred libfontconfig.so.1 ELF 7fa12fe4c000- 7fa130069000 Deferred libz.so.1 ELF 7fa130069000- 7fa13029b000 Deferred libpng16.so.16 ELF 7fa13029b000- 7fa13054f000 Deferred libfreetype.so.6 ELF 7fa13054f000- 7fa130769000 Deferred version
\-PE 7fa130550000- 7fa130769000 \ version ELF 7fa130769000- 7fa1309f9000 Deferred advapi32
\-PE 7fa130780000- 7fa1309f9000 \ advapi32 ELF 7fa1309f9000- 7fa130d74000 Deferred gdi32
\-PE 7fa130a10000- 7fa130d74000 \ gdi32 ELF 7fa130d74000- 7fa1311b0000 Deferred user32
\-PE 7fa130d90000- 7fa1311b0000 \ user32 ELF 7fa1311b0000- 7fa13143d000 Deferred shlwapi
\-PE 7fa1311c0000- 7fa13143d000 \ shlwapi ELF 7fa13153d000- 7fa13180b000 Deferred msvcrt
\-PE 7fa131560000- 7fa13180b000 \ msvcrt ELF 7fa13180b000- 7fa131a1d000 Deferred libnss_files.so.2 ELF 7fa131a1d000- 7fa131c37000 Deferred libnsl.so.1 ELF 7fa131c37000- 7fa131e43000 Deferred libnss_nis.so.2 ELF 7fa131e43000- 7fa13204d000 Deferred libnss_compat.so.2 ELF 7fa13214d000- 7fa132365000 Deferred libgcc_s.so.1 ELF 7fa132365000- 7fa132703000 Deferred libm.so.6 ELF 7fa132703000- 7fa132907000 Deferred libdl.so.2 ELF 7fa132907000- 7fa132cf8000 Deferred libc.so.6 ELF 7fa132cf8000- 7fa132f17000 Deferred libpthread.so.0 ELF 7fa1332bc000- 7fa1334e6000 Deferred ld-linux-x86-64.so.2 Threads: process tid prio (all id:s are in hex) 0000000c services.exe 00000023 0 00000020 0 0000000e 0 0000000d 0 00000011 explorer.exe 00000012 0 0000001e winedevice.exe 00000022 0 00000021 0 0000001f 0 000001bf (D) Z:\var\lib\jenkins\ws\Sandbox\Andreas\OMSimulator-FMI-Cross-Check\OMSimulatorBinaries\OMSimulator-mingw64\bin\OMSimulator.exe 000001c0 0 <== System information: Wine build: wine-3.0 (Ubuntu 3.0-1ubuntu1) Platform: x86_64 Version: Windows 7 Host system: Linux Host version: 4.15.0-50-generic
Stderr:
error: [terminate] Termination of system "model.root" failed wine: Unhandled page fault on read access to 0x00000050 at address 0x4b44c3 (thread 01c0), starting debugger... 01c2:err:winediag:nodrv_CreateWindow Application tried to create a window, but no driver could be loaded. 01c2:err:winediag:nodrv_CreateWindow Make sure that your X server is running and that $DISPLAY is set correctly. 01c2:fixme:dbghelp:elf_search_auxv can't find symbol in module 01c2:fixme:dbghelp:elf_search_auxv can't find symbol in module 01c2:fixme:dbghelp:elf_search_auxv can't find symbol in module 01c2:fixme:dbghelp:elf_search_auxv can't find symbol in module 01c2:fixme:dbghelp:elf_search_auxv can't find symbol in module 01c2:fixme:dbghelp:elf_search_auxv can't find symbol in module 01c2:fixme:dbghelp:elf_search_auxv can't find symbol in module 01c2:fixme:dbghelp:elf_search_auxv can't find symbol in module 01c2:fixme:dbghelp:elf_search_auxv can't find symbol in module 01c2:fixme:dbghelp:elf_search_auxv can't find symbol in module 01c2:fixme:dbghelp:elf_search_auxv can't find symbol in module 01c2:fixme:dbghelp:elf_search_auxv can't find symbol in module 01c2:fixme:dbghelp:interpret_function_table_entry PUSH_MACHFRAME 8 01c2:fixme:dbghelp:interpret_function_table_entry PUSH_MACHFRAME 7 01c2:fixme:dbghelp:interpret_function_table_entry PUSH_MACHFRAME 6 01c2:fixme:dbghelp:interpret_function_table_entry PUSH_MACHFRAME 8 01c2:fixme:dbghelp:interpret_function_table_entry PUSH_MACHFRAME 7 01c2:fixme:dbghelp:interpret_function_table_entry PUSH_MACHFRAME 6