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 (0x00000000004b3a73). Register dump: rip:00000000004b3a73 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:000000000064fff8 r14:0000000000000000 r15:0000000000000000 Stack dump: 0x000000000032ecf8: 0000000000460ec5 000000000032edf0 0x000000000032ed08: 00007f797fd82ba5 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 0x00000000004b3a73 in omsimulator (+0xb3a73) (0x00000000007c0ac0) 1 0x0000000000460ec5 in omsimulator (+0x60ec4) (0x00000000007c0ac0) 2 0x0000000000441bf8 in omsimulator (+0x41bf7) (0x00000000007c0ac0) 3 0x000000000049358a in omsimulator (+0x93589) (0x00000000007c0ac0) 4 0x0000000000496395 in omsimulator (+0x96394) (0x00000000007c0ac0) 5 0x000000000041d78f in omsimulator (+0x1d78e) (0x00000000007c0ac0) 6 0x000000000040424d in omsimulator (+0x424c) (0x00000000007c57a0) 7 0x000000000040442b in omsimulator (+0x442a) (0x00000000007c57a0) 8 0x0000000000510186 in omsimulator (+0x110185) (0x00000000007c57a0) 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 7f797dfa2000- 7f797e1c8000 Deferred imm32
\-PE 7f797dfb0000- 7f797e1c8000 \ imm32 ELF 7f797e1c8000- 7f797e3fa000 Deferred libexpat.so.1 ELF 7f797e3fa000- 7f797e63f000 Deferred libfontconfig.so.1 ELF 7f797e63f000- 7f797e85c000 Deferred libz.so.1 ELF 7f797e85c000- 7f797ea8e000 Deferred libpng16.so.16 ELF 7f797ea8e000- 7f797ed42000 Deferred libfreetype.so.6 ELF 7f797ed42000- 7f797ef5c000 Deferred version
\-PE 7f797ed50000- 7f797ef5c000 \ version ELF 7f797ef5c000- 7f797f1ec000 Deferred advapi32
\-PE 7f797ef70000- 7f797f1ec000 \ advapi32 ELF 7f797f1ec000- 7f797f567000 Deferred gdi32
\-PE 7f797f200000- 7f797f567000 \ gdi32 ELF 7f797f567000- 7f797f9a3000 Deferred user32
\-PE 7f797f590000- 7f797f9a3000 \ user32 ELF 7f797f9a3000- 7f797fc30000 Deferred shlwapi
\-PE 7f797f9c0000- 7f797fc30000 \ shlwapi ELF 7f797fd30000- 7f797fffe000 Deferred msvcrt
\-PE 7f797fd50000- 7f797fffe000 \ msvcrt ELF 7f797fffe000- 7f7980210000 Deferred libnss_files.so.2 ELF 7f7980210000- 7f798042a000 Deferred libnsl.so.1 ELF 7f798042a000- 7f7980636000 Deferred libnss_nis.so.2 ELF 7f7980636000- 7f7980840000 Deferred libnss_compat.so.2 ELF 7f7980940000- 7f7980b58000 Deferred libgcc_s.so.1 ELF 7f7980b58000- 7f7980ef6000 Deferred libm.so.6 ELF 7f7980ef6000- 7f79810fa000 Deferred libdl.so.2 ELF 7f79810fa000- 7f79814eb000 Deferred libc.so.6 ELF 7f79814eb000- 7f798170a000 Deferred libpthread.so.0 ELF 7f7981aaf000- 7f7981cd9000 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 000001be (D) Z:\var\lib\jenkins\ws\Sandbox\Andreas\OMSimulator-FMI-Cross-Check\OMSimulatorBinaries\OMSimulator-mingw64\bin\OMSimulator.exe 000001bf 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 0x4b3a73 (thread 01bf), starting debugger... 01c1:err:winediag:nodrv_CreateWindow Application tried to create a window, but no driver could be loaded. 01c1:err:winediag:nodrv_CreateWindow Make sure that your X server is running and that $DISPLAY is set correctly. 01c1:fixme:dbghelp:elf_search_auxv can't find symbol in module 01c1:fixme:dbghelp:elf_search_auxv can't find symbol in module 01c1:fixme:dbghelp:elf_search_auxv can't find symbol in module 01c1:fixme:dbghelp:elf_search_auxv can't find symbol in module 01c1:fixme:dbghelp:elf_search_auxv can't find symbol in module 01c1:fixme:dbghelp:elf_search_auxv can't find symbol in module 01c1:fixme:dbghelp:elf_search_auxv can't find symbol in module 01c1:fixme:dbghelp:elf_search_auxv can't find symbol in module 01c1:fixme:dbghelp:elf_search_auxv can't find symbol in module 01c1:fixme:dbghelp:elf_search_auxv can't find symbol in module 01c1:fixme:dbghelp:elf_search_auxv can't find symbol in module 01c1:fixme:dbghelp:elf_search_auxv can't find symbol in module 01c1:fixme:dbghelp:interpret_function_table_entry PUSH_MACHFRAME 8 01c1:fixme:dbghelp:interpret_function_table_entry PUSH_MACHFRAME 7 01c1:fixme:dbghelp:interpret_function_table_entry PUSH_MACHFRAME 6 01c1:fixme:dbghelp:interpret_function_table_entry PUSH_MACHFRAME 8 01c1:fixme:dbghelp:interpret_function_table_entry PUSH_MACHFRAME 7 01c1:fixme:dbghelp:interpret_function_table_entry PUSH_MACHFRAME 6