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 (0x00000000004b3a73). Register dump: rip:00000000004b3a73 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:000000000064fff8 r14:0000000000000000 r15:0000000000000000 Stack dump: 0x000000000032ecf8: 0000000000460ec5 000000000032edf0 0x000000000032ed08: 00007f388c383ba5 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 0x00000000004b3a73 in omsimulator (+0xb3a73) (0x00000000007c0ad0) 1 0x0000000000460ec5 in omsimulator (+0x60ec4) (0x00000000007c0ad0) 2 0x0000000000441bf8 in omsimulator (+0x41bf7) (0x00000000007c0ad0) 3 0x000000000049358a in omsimulator (+0x93589) (0x00000000007c0ad0) 4 0x0000000000496395 in omsimulator (+0x96394) (0x00000000007c0ad0) 5 0x000000000041d78f in omsimulator (+0x1d78e) (0x00000000007c0ad0) 6 0x000000000040424d in omsimulator (+0x424c) (0x00000000007c57b0) 7 0x000000000040442b in omsimulator (+0x442a) (0x00000000007c57b0) 8 0x0000000000510186 in omsimulator (+0x110185) (0x00000000007c57b0) 9 0x000000000051b12e in omsimulator (+0x11b12d) (0x00000000007b8738) 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 7f388a5a3000- 7f388a7c9000 Deferred imm32
\-PE 7f388a5b0000- 7f388a7c9000 \ imm32 ELF 7f388a7c9000- 7f388a9fb000 Deferred libexpat.so.1 ELF 7f388a9fb000- 7f388ac40000 Deferred libfontconfig.so.1 ELF 7f388ac40000- 7f388ae5d000 Deferred libz.so.1 ELF 7f388ae5d000- 7f388b08f000 Deferred libpng16.so.16 ELF 7f388b08f000- 7f388b343000 Deferred libfreetype.so.6 ELF 7f388b343000- 7f388b55d000 Deferred version
\-PE 7f388b350000- 7f388b55d000 \ version ELF 7f388b55d000- 7f388b7ed000 Deferred advapi32
\-PE 7f388b570000- 7f388b7ed000 \ advapi32 ELF 7f388b7ed000- 7f388bb68000 Deferred gdi32
\-PE 7f388b800000- 7f388bb68000 \ gdi32 ELF 7f388bb68000- 7f388bfa4000 Deferred user32
\-PE 7f388bb90000- 7f388bfa4000 \ user32 ELF 7f388bfa4000- 7f388c231000 Deferred shlwapi
\-PE 7f388bfc0000- 7f388c231000 \ shlwapi ELF 7f388c331000- 7f388c5ff000 Deferred msvcrt
\-PE 7f388c350000- 7f388c5ff000 \ msvcrt ELF 7f388c5ff000- 7f388c811000 Deferred libnss_files.so.2 ELF 7f388c811000- 7f388ca2b000 Deferred libnsl.so.1 ELF 7f388ca2b000- 7f388cc37000 Deferred libnss_nis.so.2 ELF 7f388cc37000- 7f388ce41000 Deferred libnss_compat.so.2 ELF 7f388cf41000- 7f388d159000 Deferred libgcc_s.so.1 ELF 7f388d159000- 7f388d4f7000 Deferred libm.so.6 ELF 7f388d4f7000- 7f388d6fb000 Deferred libdl.so.2 ELF 7f388d6fb000- 7f388daec000 Deferred libc.so.6 ELF 7f388daec000- 7f388dd0b000 Deferred libpthread.so.0 ELF 7f388e0b0000- 7f388e2da000 Deferred ld-linux-x86-64.so.2 Threads: process tid prio (all id:s are in hex) 0000000e services.exe 00000025 0 00000020 0 00000018 0 00000013 0 00000010 0 0000000f 0 00000011 winedevice.exe 00000017 0 00000016 0 00000012 0 0000001b plugplay.exe 00000022 0 00000021 0 0000001c 0 0000001e explorer.exe 0000002b 0 0000002a 0 0000001f 0 00000023 winedevice.exe 0000002c 0 00000027 0 00000026 0 00000024 0 000001e1 (D) Z:\var\lib\jenkins2\ws\Sandbox\Andreas\OMSimulator-FMI-Cross-Check\OMSimulatorBinaries\OMSimulator-mingw64\bin\OMSimulator.exe 000001e2 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 01e2), starting debugger... 01e4:err:winediag:nodrv_CreateWindow Application tried to create a window, but no driver could be loaded. 01e4:err:winediag:nodrv_CreateWindow Make sure that your X server is running and that $DISPLAY is set correctly. 01e4:fixme:dbghelp:elf_search_auxv can't find symbol in module 01e4:fixme:dbghelp:elf_search_auxv can't find symbol in module 01e4:fixme:dbghelp:elf_search_auxv can't find symbol in module 01e4:fixme:dbghelp:elf_search_auxv can't find symbol in module 01e4:fixme:dbghelp:elf_search_auxv can't find symbol in module 01e4:fixme:dbghelp:elf_search_auxv can't find symbol in module 01e4:fixme:dbghelp:elf_search_auxv can't find symbol in module 01e4:fixme:dbghelp:elf_search_auxv can't find symbol in module 01e4:fixme:dbghelp:elf_search_auxv can't find symbol in module 01e4:fixme:dbghelp:elf_search_auxv can't find symbol in module 01e4:fixme:dbghelp:elf_search_auxv can't find symbol in module 01e4:fixme:dbghelp:elf_search_auxv can't find symbol in module 01e4:fixme:dbghelp:interpret_function_table_entry PUSH_MACHFRAME 8 01e4:fixme:dbghelp:interpret_function_table_entry PUSH_MACHFRAME 7 01e4:fixme:dbghelp:interpret_function_table_entry PUSH_MACHFRAME 6 01e4:fixme:dbghelp:interpret_function_table_entry PUSH_MACHFRAME 8 01e4:fixme:dbghelp:interpret_function_table_entry PUSH_MACHFRAME 7 01e4:fixme:dbghelp:interpret_function_table_entry PUSH_MACHFRAME 6