5 ms·
I've ran into it in practice a few years back, while making WRF (math intensive atmospheric modeling software, I'm maintaining non-commercial soaring prediction
by dchichkov 13y ago
I've ran into it in practice a few years back, while making WRF (math intensive atmospheric modeling software, I'm maintaining non-commercial soaring prediction site for the bay area) to work on my AMD cluster. Had to patch the executable compiled with the Intel compiler in order to make it work unhindered on AMD's. The patch was just zapping 'Genuine Intel' detection code in the compiled executable... That 'post-linker' patch is available here: http://www.swallowtail.org/naughty-intel.shtml http://www.swallowtail.org/naughty-intel.shtml
- neurostimulant 13y agoWhy not just recompile wrf from source? Dependency hell?
- aylons 13y agoProbably it wouldn't work so nice with other compiler. This level of optimization often requires compiler - specific syntax. Not to say Intel optimization is really good.
- nanidin 13y agoI was in a parallel programming class where the fastest correct assignments got significant extra credit boosts. Compiling with the intel compiler with optimizations turned on (vs gcc) was often enough to make the difference in getting that extra credit by a significant margin.
- eridius 13y agoYou were graded based on compiled binaries that you provided, and not based on the source? That sounds crazy to me.
- nanidin 13y agoWe provided build scripts and source. The extra credit was for fastest execution time. I assume you're payed based on final results, not based on source. Not so crazy of a concept - whoever delivered the best results got rewarded for it.
- gcb0 13y agoluckily for you your professor did not have an AMD cpu...
- nanidin 13y agoIndeed - we were developing on & evaluated on a homogeneous cluster :)
- eridius 13y agoSure, but if merely switching compilers produced a faster binary, then I would expect all programs to be compiled with the better-optimizing compiler. After all, it doesn't take any particular expertise to adjust the value of CC.
- dpe82 13y agoThere's more to optimization than setting -O3. Learning how various compilers behave and how their optimization features interact with your code are valuable skills and may well have been within the scope of the course. Certainly worthy of extra credit.
- scott_karana 13y agoSure, but why not mandate that everyone tunes the same compiler?...
- mikeash 13y agoI'll flip the question around: why mandate it? The class clearly has a performance component, and so students were expected to learn about optimization. Are they going to learn optimization better or worse if you mandate a single compiler? If merely switching compilers is the best path to performance, is that not a valuable lesson? If switching compilers and doing a bunch of extra work to make the code fast with the new compiler is the best path to performance, have they not learned a great deal?
- greatzebu 13y agoI was trying to build WRF from source a few years ago for a project in grad school, and the bulk of the program was one giant file that crashed gfortran when you tried to compile it. So compiling with a non-Intel compiler can present some problems.
- dchichkov 13y agoEr, I was building it from source... Don't remember exactly was blocking me from using GCC, vaguely remember something about OpenMP support... The config in question was MPI+OpenMP, where OpenMP was used to parallelize withing a node of a cluster and MPI for the cluster itself.