Simulation setup
To simulate FMU `Speed_SWC.fmu` with OMSimulator run ```bash $ wine64 /var/lib/jenkins2/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:00000000007c0ad0 eflags:00010206 ( R- -- I - -P- ) rax:0000000000000000 rbx:00000000007c7370 rcx:0000000000000000 rdx:00000000007c43a0 rsi:00000000007c5130 rdi:000000000032f1c8 r8:00000000008b0000 r9:00000000007c8268 r10:0000000000000002 r11:00000000007c8238 r12:00000000006a90e0 r13:0000000000650198 r14:0000000000000000 r15:0000000000000000 Stack dump: 0x000000000032ecf8: 00000000004613b5 000000000032edf0 0x000000000032ed08: 00007fb03c55fba5 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 00000000007c43d0 0x000000000032eda8: 00000000007c5130 000000000032f1c8 Backtrace: =>0 0x00000000004b44c3 in omsimulator (+0xb44c3) (0x00000000007c0ad0) 1 0x00000000004613b5 in omsimulator (+0x613b4) (0x00000000007c0ad0) 2 0x0000000000441bf8 in omsimulator (+0x41bf7) (0x00000000007c0ad0) 3 0x0000000000493fda in omsimulator (+0x93fd9) (0x00000000007c0ad0) 4 0x0000000000496de5 in omsimulator (+0x96de4) (0x00000000007c0ad0) 5 0x000000000041d78f in omsimulator (+0x1d78e) (0x00000000007c0ad0) 6 0x000000000040424d in omsimulator (+0x424c) (0x00000000007c57b0) 7 0x000000000040442b in omsimulator (+0x442a) (0x00000000007c57b0) 8 0x0000000000510bd6 in omsimulator (+0x110bd5) (0x00000000007c57b0) 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 7fb03a77f000- 7fb03a9a5000 Deferred imm32
\-PE 7fb03a790000- 7fb03a9a5000 \ imm32 ELF 7fb03a9a5000- 7fb03abd7000 Deferred libexpat.so.1 ELF 7fb03abd7000- 7fb03ae1c000 Deferred libfontconfig.so.1 ELF 7fb03ae1c000- 7fb03b039000 Deferred libz.so.1 ELF 7fb03b039000- 7fb03b26b000 Deferred libpng16.so.16 ELF 7fb03b26b000- 7fb03b51f000 Deferred libfreetype.so.6 ELF 7fb03b51f000- 7fb03b739000 Deferred version
\-PE 7fb03b520000- 7fb03b739000 \ version ELF 7fb03b739000- 7fb03b9c9000 Deferred advapi32
\-PE 7fb03b750000- 7fb03b9c9000 \ advapi32 ELF 7fb03b9c9000- 7fb03bd44000 Deferred gdi32
\-PE 7fb03b9e0000- 7fb03bd44000 \ gdi32 ELF 7fb03bd44000- 7fb03c180000 Deferred user32
\-PE 7fb03bd60000- 7fb03c180000 \ user32 ELF 7fb03c180000- 7fb03c40d000 Deferred shlwapi
\-PE 7fb03c190000- 7fb03c40d000 \ shlwapi ELF 7fb03c50d000- 7fb03c7db000 Deferred msvcrt
\-PE 7fb03c530000- 7fb03c7db000 \ msvcrt ELF 7fb03c7db000- 7fb03c9ed000 Deferred libnss_files.so.2 ELF 7fb03c9ed000- 7fb03cc07000 Deferred libnsl.so.1 ELF 7fb03cc07000- 7fb03ce13000 Deferred libnss_nis.so.2 ELF 7fb03ce13000- 7fb03d01d000 Deferred libnss_compat.so.2 ELF 7fb03d11d000- 7fb03d335000 Deferred libgcc_s.so.1 ELF 7fb03d335000- 7fb03d6d3000 Deferred libm.so.6 ELF 7fb03d6d3000- 7fb03d8d7000 Deferred libdl.so.2 ELF 7fb03d8d7000- 7fb03dcc8000 Deferred libc.so.6 ELF 7fb03dcc8000- 7fb03dee7000 Deferred libpthread.so.0 ELF 7fb03e28c000- 7fb03e4b6000 Deferred ld-linux-x86-64.so.2 Threads: process tid prio (all id:s are in hex) 0000000c services.exe 00000020 0 0000000e 0 0000000d 0 00000011 explorer.exe 00000012 0 0000001e winedevice.exe 00000022 0 00000021 0 0000001f 0 000001e8 (D) Z:\var\lib\jenkins2\ws\Sandbox\Andreas\OMSimulator-FMI-Cross-Check\OMSimulatorBinaries\OMSimulator-mingw64\bin\OMSimulator.exe 000001e9 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-51-generic
Stderr:
error: [terminate] Termination of system "model.root" failed wine: Unhandled page fault on read access to 0x00000050 at address 0x4b44c3 (thread 01e9), starting debugger... 01eb:err:winediag:nodrv_CreateWindow Application tried to create a window, but no driver could be loaded. 01eb:err:winediag:nodrv_CreateWindow Make sure that your X server is running and that $DISPLAY is set correctly. 01eb:fixme:dbghelp:elf_search_auxv can't find symbol in module 01eb:fixme:dbghelp:elf_search_auxv can't find symbol in module 01eb:fixme:dbghelp:elf_search_auxv can't find symbol in module 01eb:fixme:dbghelp:elf_search_auxv can't find symbol in module 01eb:fixme:dbghelp:elf_search_auxv can't find symbol in module 01eb:fixme:dbghelp:elf_search_auxv can't find symbol in module 01eb:fixme:dbghelp:elf_search_auxv can't find symbol in module 01eb:fixme:dbghelp:elf_search_auxv can't find symbol in module 01eb:fixme:dbghelp:elf_search_auxv can't find symbol in module 01eb:fixme:dbghelp:elf_search_auxv can't find symbol in module 01eb:fixme:dbghelp:elf_search_auxv can't find symbol in module 01eb:fixme:dbghelp:elf_search_auxv can't find symbol in module 01eb:fixme:dbghelp:interpret_function_table_entry PUSH_MACHFRAME 8 01eb:fixme:dbghelp:interpret_function_table_entry PUSH_MACHFRAME 7 01eb:fixme:dbghelp:interpret_function_table_entry PUSH_MACHFRAME 6 01eb:fixme:dbghelp:interpret_function_table_entry PUSH_MACHFRAME 8 01eb:fixme:dbghelp:interpret_function_table_entry PUSH_MACHFRAME 7 01eb:fixme:dbghelp:interpret_function_table_entry PUSH_MACHFRAME 6