Opened 4 years ago

Closed 4 years ago

Last modified 4 years ago

#5951 closed defect (fixed)

OMC build time has increased

Reported by: niklwors Owned by: sjoelund.se
Priority: high Milestone: 1.16.0
Component: Build Environment Version: v1.16.0-dev
Keywords: build time Cc: ruediger.franke@…, AnHeuermann

Description

The omc build time has increased compared to the OpenModelica version 1.15
on linux the build time is for the 1.15 version

Complete build:
real 7m52.960s
user 68m50.538s
sys 8m19.201s

Rebuilt:

real 0m14.066s
user 0m23.606s
sys 0m5.898s

Wth the version e3d417519d

Complete
real 10m0.914s
user 80m55.100s
sys 9m16.211s
build

Rebuilt:

real 3m7.013s
user 22m0.388s
sys 1m7.458s

Attachments (1)

omc_build_linux.log (1.2 MB) - added by niklwors 4 years ago.

Download all attachments as: .zip

Change History (11)

Changed 4 years ago by niklwors

comment:1 Changed 4 years ago by rfranke

Here is the output of make | grep 100% from a rebuild of the maintenance/v1.15 branch (skipping cmake errors and warnings). Already some duplicates for OMSI* and Kinsol, but without recompilation:

[100%] Built target OMSIBase_static
[100%] Built target OMSIBase
[100%] Built target OMSIBase_static
[100%] Built target OMSIBase
[100%] Built target OMSIC_static
[100%] Built target OMSIC
[100%] Built target OMSIC_static
[100%] Built target OMSIC
[100%] Built target OMCppKinsol_static
[100%] Built target OMCppKinsol
[100%] Built target OMCppKinsol_static
[100%] Built target OMCppKinsol
[100%] Built target OMCppKinsol_static
[100%] Built target OMCppKinsol
[100%] Built target minigzip64
[100%] Built target minizip
[100%] Built target OMSimulatorLua
[100%] Built target qjson

The same output for the master branch: many more entries, even more duplicates and lot of recompilation even though nothing changed:

[100%] Built target OMSIBase_static
[100%] Built target OMSIBase
[100%] Built target OMSIBase_static
[100%] Built target OMSIBase
[100%] Built target OMSIC_static
[100%] Built target OMSIC
[100%] Built target OMSIC_static
[100%] Built target OMSIC
[100%] Built target OMSIBase_static
[100%] Built target OMSIBase
[100%] Built target OMSIBase_static
[100%] Built target OMSIBase
[100%] Built target OMSIC_static
[100%] Built target OMSIC
[100%] Built target OMSIC_static
[100%] Built target OMSIC
[100%] Built target OMCZeroMQ
[100%] Building CXX object omsi/CMakeFiles/OMCppOSU_static.dir/src/omsi_factory.cpp.o
[100%] Building CXX object omsi/CMakeFiles/OMCppOSU_static.dir/src/omsi_global_settings.cpp.o
[100%] Built target OMCppOSU_static
[100%] Building CXX object omsi/CMakeFiles/OMCppOSU.dir/src/omsi_global_settings.cpp.o
[100%] Built target OMCppOSU
[100%] Building CXX object omsi/CMakeFiles/OMCppOSUSimulation.dir/src/omsi.cpp.o
[100%] Built target OMCppOSUSimulation
[100%] Built target OMCZeroMQ
[100%] Building CXX object omsi/CMakeFiles/OMCppOSU_static.dir/src/omsi_factory.cpp.o
[100%] Building CXX object omsi/CMakeFiles/OMCppOSU_static.dir/src/omsi_global_settings.cpp.o
[100%] Built target OMCppOSU_static
[100%] Building CXX object omsi/CMakeFiles/OMCppOSU.dir/src/omsi_global_settings.cpp.o
[100%] Built target OMCppOSU
[100%] Building CXX object omsi/CMakeFiles/OMCppOSUSimulation.dir/src/omsi.cpp.o
[100%] Built target OMCppOSUSimulation
[100%] Built target OMCppOSU_static
[100%] Built target OMCppOSU
[100%] Built target OMCppOSUSimulation
[100%] Built target zlibstatic
[100%] Built target minizip
[100%] Built target OMSimulatorLua
[100%] Built target qjson

comment:2 Changed 4 years ago by AnHeuermann

  • Cc AnHeuermann added; andreas.heuermann@… removed

comment:3 Changed 4 years ago by rfranke

The same output for the maintenance/v1.14 branch, i.e. rebuild without any change and grep 100% in the output of make:

[100%] Built target OMSIBase_static
[100%] Built target OMSIBase
[100%] Built target OMSIBase_static
[100%] Built target OMSIBase
[100%] Built target OMSIC_static
[100%] Built target OMSIC
[100%] Built target OMSIC_static
[100%] Built target OMSIC

Still linear or already exponential infection rate towards 1.15 and master?

comment:4 Changed 4 years ago by adrpo

Started looking into this via:
https://github.com/OpenModelica/OpenModelica/pull/863
will continue with the OMSICpp.

comment:5 Changed 4 years ago by adrpo

Output for make -f Makefile.omdev.mingw runtimeCPPinstall -j3 via grep "100%"

[100%] Building C object CMakeFiles/umfpack_olib_DLONG_WSOLVE.dir/UMFPACK/Source/umfpack_solve.c.obj
[100%] Built target umfpack_olib_DLONG_WSOLVE
[100%] Linking C static library libbtf.a
[100%] Built target btf
[100%] Linking C static library libamd.a
[100%] Built target amd
[100%] Linking C static library libklu.a
[100%] Built target klu
[100%] Linking C static library libumfpack.a
[100%] Built target umfpack
[100%] Linking C static library libmetis.a
[100%] Built target metis
[100%] Linking CXX static library lib/libzmq.a
[100%] Built target libzmq-static
[100%] Linking C static library libcminpack.a
[100%] Built target cminpack
[100%] Linking C static library libexpat.a
[100%] Built target expat
[100%] Built target expat
[100%] Building C object src/kinsol/CMakeFiles/sundials_kinsol_shared.dir/__/sundials/sundials_sptfqmr.c.obj
[100%] Linking C shared library libsundials_kinsol.dll
[100%] Built target sundials_kinsol_shared
[100%] Building C object CMakeFiles/fmilib_shared.dir/src/Util/src/FMI2/fmi2_enums.c.obj
[100%] Linking C shared library libfmilib_shared.dll
[100%] Built target fmilib_shared
[100%] Built target fmilib
[100%] Linking C static library libOMSIBase_static.a
[100%] Built target OMSIBase_static
[100%] Linking C shared library libOMSIBase.dll
[100%] Built target OMSIBase
[100%] Linking C static library libOMSIC_static.a
[100%] Built target OMSIC_static
[100%] Linking C static library libOMSIC.a
[100%] Built target OMSIC
[100%] Linking CXX executable OMCZeroMQ.exe
[100%] Built target OMCZeroMQ
[100%] Linking CXX static library libOMCppSystemOMSI_static.a
[100%] Built target OMCppSystemOMSI_static
[100%] Linking CXX shared library libOMCppSystemOMSI.dll
[100%] Built target OMCppSystemOMSI
[100%] Built target OMCppSystemOMSI_static
[100%] Built target OMCppSystemOMSI

from scratch:

real    66m22.514s
user    14m1.201s
sys     37m6.330s

Recompiling, no changes, via make -f Makefile.omdev.mingw runtimeCPPinstall -j3:

[100%] Built target OMSIBase_static
[100%] Built target OMSIBase
[100%] Built target OMSIC_static
[100%] Built target OMSIC
[100%] Built target OMCZeroMQ
[100%] Linking CXX static library libOMCppSystemOMSI_static.a
[100%] Built target OMCppSystemOMSI_static
[100%] Linking CXX shared library libOMCppSystemOMSI.dll
[100%] Built target OMCppSystemOMSI
[100%] Built target OMCppSystemOMSI_static
[100%] Built target OMCppSystemOMSI

takes:

real    9m38.649s
user    0m49.528s
sys     2m7.387s

I don't get yet why the OMSICpp is recompiled from scratch with no changes. Will debug more.

comment:6 Changed 4 years ago by niklwors

I think I found the problem of the always rebuild. In the CMakefile
\SimulationRuntime\OMSICpp\CMakeLists.txt there is an additional configuration file generation call at line 1169

GET_TARGET_PROPERTY(libOSU ${OSUName} LOCATION)
GET_FILENAME_COMPONENT(OSUName ${libOSU} NAME)
set (OSU_LIB ${OSUName})
configure_file (

"${PROJECT_SOURCE_DIR}/runtime/src/LibrariesConfig.h.in"
"${PROJECT_BINARY_DIR}/LibrariesConfig.h"
)

for the libraries that can be loaded during runtimen, but the omsu lib is not needed to load during runtime so it can be removed. If I comment out this command
I got this rebuild times:

real 0m15.370s
user 0m24.799s
sys 0m5.677s

I have to investigate the problem further, but maybe this solves the problem

comment:7 Changed 4 years ago by adrpo

This seems to have been fixed:

# first call, recompilation after git pull the PR changes
adrpo33@ida-0030 MINGW64 /e/dev/OpenModelica
$ time make -f Makefile.omdev.mingw -j3 runtimeCPPinstall > trace.txt 2>&1
real    8m59.247s
user    0m50.438s
sys     2m3.646s

# second call
adrpo33@ida-0030 MINGW64 /e/dev/OpenModelica
$ time make -f Makefile.omdev.mingw -j3 runtimeCPPinstall > trace.txt 2>&1
real    1m55.422s
user    0m31.664s
sys     1m18.661s
Last edited 4 years ago by adrpo (previous) (diff)

comment:8 Changed 4 years ago by adrpo

$ fgrep "100%" trace.txt
[100%] Built target OMSIBase_static
[100%] Built target OMSIBase
[100%] Built target OMSIC_static
[100%] Built target OMSIC
[100%] Built target OMCZeroMQ
[100%] Built target OMCppSystemOMSI_static
[100%] Built target OMCppSimController
[100%] Built target OMCppSystemOMSI_static
[100%] Built target OMCppSystemOMSI

comment:9 Changed 4 years ago by casella

  • Resolution set to fixed
  • Status changed from new to closed

Given @adrpo's report, I would tentatively close this ticket. Feel free to reopen it if there are still issues

comment:10 Changed 4 years ago by casella

  • Milestone changed from Future to 1.16.0
Note: See TracTickets for help on using tickets.