Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

I work on CFD software. We're well aware of this in my work, but the reality is that all our big corporate clients use Intel hardware. We already tell people to set those environment variables in our documentation.

> Avoid the Intel compiler. There are other compilers with similar or better performance.

This is not really true IMO, but even as an aside, the Intel compiler has the enormous advantage of being available cross platform. So we can use it on Linux and Windows, and provides MPI cross platform. We upgrade fairly regularly and that provides us with less work.

My own tests found that PGI compiler performance was worse than Intel for C++, and that now appears to have been discontinued on Windows anyway with NVidia's new HPC compiler suite replacing it. GNU can run everywhere, but performance is around 2.5x worse on Linux for our application use case because it doesn't perform many of the optimisations that Intel does. We use MSVC on Windows just because everyone can have a license, and performance is much worse.

The other thing is that MKL is pretty stable and gets updated. If I use an open source BLAS/LAPACK implementation - sure, it works, and it may even give better performance! But it's not guaranteed to get updates beyond a couple of years, and plenty of implementations are also only partial. We pay Intel a lot of money for the lack of hassle, basically.



So which are the optimizations the Intel compiler does which GCC can't is asked? I could guess at the reason for a factor of two, but what does the detailed profiling say with equivalent compiler flags? I can also say that GCC is a factor of two better on SKX on a Fortran benchmark, and came out about the same over the collection that's from when profile-directed. The usual reason for the Intel compiler appearing to win much is incorrect-by-default maths optimization allowing more vectorization.

I don't know about MKL stability, but reliability definitely isn't something I associate with the Intel Fortran compiler (or MPI) in research computing support.


I found that the common subexpression elimination performance was significantly better than that in GCC for one thing


> the Intel compiler has the enormous advantage of being available cross platform

How does this advantage not apply to gcc? Isn't gcc the most cross-platform compiler ever?


I think it’s a matter of features and performance. The poster says he can use gcc but the performance is 2.5x slower.


that's an incredible margin, and sounds suspiciously like they didn't enable optimizations on gcc, or set icc to optimize for a specific processor and gcc to generic, or something like that.


Hmm, OpenMP is a wildcard here.

At which point, its not just the compiler (which GCC is pretty good at), but also the threading implementation (which I can believe that GCC has an inferior Windows-threading OpenMP implementation).

I don't really use either tool. But OpenMP + GCC on Windows doesn't sound like it'd be fast to me.

--------

MSVC only has OpenMP 2.0 support (OpenMP is all the way up to 5.0 now).

OpenMP, despite being a common interface, also is pretty reliant on many implementation details for performance. One way of doing things on GCC could be faster than another, while it could be the opposite on ICC. Its quite possible that their codebase is tailored for ICC, and that recompiling it under GCC (with a different OpenMP implementation) results in weaker performance.

I wouldn't expect 250% performance difference in normal code however. GCC and ICC aren't that far off under typical circumstances.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: