Opened 6 years ago

Closed 3 years ago

#5043 closed enhancement (fixed)

Use clang also on Windows

Reported by: casella Owned by: adrpo
Priority: blocker Milestone: 1.17.0
Component: Build Environment Version:
Keywords: Cc: sjoelund.se, wbraun, niklwors

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 Changed 6 years ago by casella

  • Component changed from *unknown* to Code Generation
  • Type changed from defect to enhancement

comment:2 Changed 6 years ago by adrpo

  • Component changed from Code Generation to Build Environment

comment:3 Changed 6 years ago by adrpo

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 Changed 6 years ago by casella

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

comment:6 Changed 5 years ago by casella

  • Milestone changed from 2.1.0 to 2.0.0
  • Priority changed from high to blocker

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 Changed 5 years ago by casella

See #5307

comment:8 Changed 5 years ago by casella

  • Milestone changed from 2.0.0 to 1.14.0

comment:9 Changed 5 years ago by casella

  • Milestone changed from 1.14.0 to 2.0.0

Too late to fit this in 1.14.0, rescheduled to 2.0.0

comment:10 Changed 3 years ago by casella

  • Milestone changed from 2.0.0 to 1.17.0
  • Resolution set to fixed
  • Status changed from new to closed

Just tried it, much faster than gcc indeed.

Note: See TracTickets for help on using tickets.