Simulation setup
To simulate FMU `Speed_SWC.fmu` with OMSimulator run ```bash $ wine64 /var/lib/jenkins3/ws/Sandbox/Andreas/Tmp/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 (0x00000000004b3a73). Register dump: rip:00000000004b3a73 rsp:000000000033ecf8 rbp:00000000007c0e20 eflags:00010206 ( R- -- I - -P- ) rax:0000000000000000 rbx:00000000007c72a0 rcx:0000000000000000 rdx:00000000007c4ae0 rsi:00000000007c4570 rdi:000000000033f1c8 r8:00000000008b0000 r9:00000000007c0ed8 r10:0000000000000002 r11:00000000007c0e88 r12:00000000006a90e0 r13:000000000064fff8 r14:0000000000000000 r15:0000000000000000 Stack dump: 0x000000000033ecf8: 0000000000460ec5 000000000033edf0 0x000000000033ed08: 00007f4b1701cba5 7fffffffffffffff 0x000000000033ed18: 0000000000000000 0000000000000000 0x000000000033ed28: 8000000000000000 0000000000000000 0x000000000033ed38: 0000000000000000 0000000000000000 0x000000000033ed48: 0000000000000000 0000000000000000 0x000000000033ed58: 0000000000000000 0000000000000000 0x000000000033ed68: 0000000000000000 0000000000000000 0x000000000033ed78: 0000000000000000 0000000000000000 0x000000000033ed88: 0000000000000000 0000000000000000 0x000000000033ed98: 0000000000000000 00000000007c4b10 0x000000000033eda8: 00000000007c4570 000000000033f1c8 Backtrace: =>0 0x00000000004b3a73 in omsimulator (+0xb3a73) (0x00000000007c0e20) 1 0x0000000000460ec5 in omsimulator (+0x60ec4) (0x00000000007c0e20) 2 0x0000000000441bf8 in omsimulator (+0x41bf7) (0x00000000007c0e20) 3 0x000000000049358a in omsimulator (+0x93589) (0x00000000007c0e20) 4 0x0000000000496395 in omsimulator (+0x96394) (0x00000000007c0e20) 5 0x000000000041d78f in omsimulator (+0x1d78e) (0x00000000007c0e20) 6 0x000000000040424d in omsimulator (+0x424c) (0x00000000007c56a0) 7 0x000000000040442b in omsimulator (+0x442a) (0x00000000007c56a0) 8 0x0000000000510186 in omsimulator (+0x110185) (0x00000000007c56a0) 9 0x000000000051b12e in omsimulator (+0x11b12d) (0x00000000007b86e8) 0x00000000004b3a73: 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 7f4b1523c000- 7f4b15462000 Deferred imm32
\-PE 7f4b15240000- 7f4b15462000 \ imm32 ELF 7f4b15462000- 7f4b15694000 Deferred libexpat.so.1 ELF 7f4b15694000- 7f4b158d9000 Deferred libfontconfig.so.1 ELF 7f4b158d9000- 7f4b15af6000 Deferred libz.so.1 ELF 7f4b15af6000- 7f4b15d28000 Deferred libpng16.so.16 ELF 7f4b15d28000- 7f4b15fdc000 Deferred libfreetype.so.6 ELF 7f4b15fdc000- 7f4b161f6000 Deferred version
\-PE 7f4b15fe0000- 7f4b161f6000 \ version ELF 7f4b161f6000- 7f4b16486000 Deferred advapi32
\-PE 7f4b16210000- 7f4b16486000 \ advapi32 ELF 7f4b16486000- 7f4b16801000 Deferred gdi32
\-PE 7f4b164a0000- 7f4b16801000 \ gdi32 ELF 7f4b16801000- 7f4b16c3d000 Deferred user32
\-PE 7f4b16820000- 7f4b16c3d000 \ user32 ELF 7f4b16c3d000- 7f4b16eca000 Deferred shlwapi
\-PE 7f4b16c50000- 7f4b16eca000 \ shlwapi ELF 7f4b16fca000- 7f4b17298000 Deferred msvcrt
\-PE 7f4b16ff0000- 7f4b17298000 \ msvcrt ELF 7f4b17298000- 7f4b174aa000 Deferred libnss_files.so.2 ELF 7f4b174aa000- 7f4b176c4000 Deferred libnsl.so.1 ELF 7f4b176c4000- 7f4b178d0000 Deferred libnss_nis.so.2 ELF 7f4b178d0000- 7f4b17ada000 Deferred libnss_compat.so.2 ELF 7f4b17bda000- 7f4b17df2000 Deferred libgcc_s.so.1 ELF 7f4b17df2000- 7f4b18190000 Deferred libm.so.6 ELF 7f4b18190000- 7f4b18394000 Deferred libdl.so.2 ELF 7f4b18394000- 7f4b18785000 Deferred libc.so.6 ELF 7f4b18785000- 7f4b189a4000 Deferred libpthread.so.0 ELF 7f4b18d49000- 7f4b18f73000 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\jenkins3\ws\Sandbox\Andreas\Tmp\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 0x4b3a73 (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