Opened 6 years ago

Closed 4 years ago

#5043 closed enhancement (fixed)

Use clang also on Windows

Reported by: Francesco Casella Owned by: Adrian Pop
Priority: blocker Milestone: 1.17.0
Component: Build Environment Version:
Keywords: Cc: Martin Sjölund, Willi Braun, Niklas Worschech

Description

On Linux systems, the compilation of models using clang is dramatically faster than using gcc. On simple models, the simulation starts almost immediately after clicking the simulate button in OMEdit, while the Windows/gcc combination chugs along for several seconds even in the simplest cases.

Can we plan on using clang also on Windows for 2.1.0? I guess this would increase the usability significantly

Change History (10)

comment:1 by Francesco Casella, 6 years ago

Component: *unknown*Code Generation
Type: defectenhancement

comment:2 by Adrian Pop, 6 years ago

Component: Code GenerationBuild Environment

comment:3 by Adrian Pop, 6 years ago

I've done some tests, clang is about 8 minutes faster to compile OpenModelica OMC from scratch:

CLANG
adrpo33@ida-0030 MINGW64 /c/home/adrpo33/dev/OpenModelica
# time make -f Makefile.omdev.mingw CC=clang CXX=clang++ -j4 >> trace.txt 2>&1
real    44m1.708s
user    9m49.770s
sys     44m24.628s
compiler:
real    17m45.172s
user    1m55.614s
sys     10m12.754s
GCC:
adrpo33@ida-0030 MINGW64 /c/home/adrpo33/dev/OpenModelica
$ time make -f Makefile.omdev.mingw CC=gcc CXX=g++ -j4 >> trace.txt 2>&1
real    52m25.930s
user    9m18.973s
sys     53m6.370s
compiler
real    22m36.146s
user    1m54.430s
sys     12m47.953s

Also, the model from #5082 can actually be compiled with half memory usage and no crashes.
The only "problem" is that we will add ~1.3 GBs to the OpenModelica installer.

comment:4 by Francesco Casella, 6 years ago

We could make the use of clang optional and keep the installer separate.

comment:6 by Francesco Casella, 6 years ago

Milestone: 2.1.02.0.0
Priority: highblocker

I played a bit with medium-scaled models recently and found that gcc is much, much slower than clang. Moving to clang will change the user experience dramatically. I am rescheduling this for 2.0.0, I think it is a must-have

comment:7 by Francesco Casella, 6 years ago

See #5307

comment:8 by Francesco Casella, 6 years ago

Milestone: 2.0.01.14.0

comment:9 by Francesco Casella, 6 years ago

Milestone: 1.14.02.0.0

Too late to fit this in 1.14.0, rescheduled to 2.0.0

comment:10 by Francesco Casella, 4 years ago

Milestone: 2.0.01.17.0
Resolution: fixed
Status: newclosed

Just tried it, much faster than gcc indeed.

Note: See TracTickets for help on using tickets.