Difference between revisions of "User:Le Forgeron/vault/Compilation"
< User:Le Forgeron | vault
Jump to navigation
Jump to search
Le Forgeron (talk | contribs) |
Le Forgeron (talk | contribs) |
||
| (6 intermediate revisions by the same user not shown) | |||
| Line 2: | Line 2: | ||
My preference is to not be bothered with io-restrictions, but your mileage may vary. | My preference is to not be bothered with io-restrictions, but your mileage may vary. | ||
| + | |||
| + | == Ubuntu 13.10 & libboost 1.53 == | ||
| + | |||
| + | Add LIBS="-lboost_system -lboost_thread" | ||
== gcc (Gnu) == | == gcc (Gnu) == | ||
| − | |||
| + | === Ubuntu 13.04, g++ version 4.7.3 === | ||
# ./configure COMPILED_BY="Jérôme Grimbert <jgrimbert@free.fr>" --disable-io-restrictions | # ./configure COMPILED_BY="Jérôme Grimbert <jgrimbert@free.fr>" --disable-io-restrictions | ||
| + | |||
| + | === Ubuntu 13.10, g++ version 4.8.1 === | ||
| + | # ./configure COMPILED_BY="Jérôme Grimbert <jgrimbert@free.fr>" --disable-io-restrictions LIBS="-lboost_system -lboost_thread" | ||
| + | |||
| + | === same result === | ||
I/O restrictions: disabled | I/O restrictions: disabled | ||
| Line 20: | Line 29: | ||
Compiler flags: -pipe -Wno-multichar -Wno-write-strings -fno-enforce-eh-specs -s -O3 -ffast-math -march=native -pthread | Compiler flags: -pipe -Wno-multichar -Wno-write-strings -fno-enforce-eh-specs -s -O3 -ffast-math -march=native -pthread | ||
| + | == clang (LLVM) == | ||
| + | * version 3.2-1 | ||
| + | === ubuntu 13.04 === | ||
| + | # ./configure COMPILED_BY="Jérôme Grimbert <jgrimbert@free.fr>" --disable-io-restrictions CXX=clang++ CC=clang | ||
| + | === ubuntu 13.10 === | ||
| + | * clang 3.2 has a bug in its distributed packages | ||
| + | * clang 3.3 is ok | ||
| + | ====Fix to be able to find stddef.h (and other include files)==== | ||
| + | # cd /usr/lib/clang/3.2/ | ||
| + | # sudo ln -s /usr/lib/llvm-3.2/lib/clang/3.2/include | ||
| + | ==== configuration ==== | ||
| + | # ./configure COMPILED_BY="Jérôme Grimbert <jgrimbert@free.fr>" --disable-io-restrictions LIBS="-lboost_system -lboost_thread" CXX=clang++ CC=clang | ||
| − | == | + | === same result === |
| − | |||
| − | |||
| − | |||
I/O restrictions: disabled | I/O restrictions: disabled | ||
| Line 39: | Line 57: | ||
Compiler version: clang++ 4.2.1 | Compiler version: clang++ 4.2.1 | ||
Compiler flags: -pipe -Wno-multichar -Wno-write-strings -O3 -ffast-math -march=native -pthread | Compiler flags: -pipe -Wno-multichar -Wno-write-strings -O3 -ffast-math -march=native -pthread | ||
| − | |||
| − | |||
== icc (Intel) == | == icc (Intel) == | ||
| Line 46: | Line 62: | ||
# ./configure COMPILED_BY="Jérôme Grimbert <jgrimbert@free.fr>" --disable-io-restrictions CXX=icpc CC=icc CPPFLAGS=-I/usr/include/x86_64-linux-gnu/c++/4.7 | # ./configure COMPILED_BY="Jérôme Grimbert <jgrimbert@free.fr>" --disable-io-restrictions CXX=icpc CC=icc CPPFLAGS=-I/usr/include/x86_64-linux-gnu/c++/4.7 | ||
| + | # ./configure COMPILED_BY="Jérôme Grimbert <jgrimbert@free.fr>" --disable-io-restrictions LIBS="-lboost_system -lboost_thread" CXX=icpc CC=icc CPPFLAGS=-I/usr/include/x86_64-linux-gnu/c++/4.8 | ||
| Line 59: | Line 76: | ||
Compiler version: icpc 13.0.1 | Compiler version: icpc 13.0.1 | ||
Compiler flags: -pipe -Wno-multichar -Wno-write-strings -s -O3 -ip -xHost -pthread | Compiler flags: -pipe -Wno-multichar -Wno-write-strings -s -O3 -ip -xHost -pthread | ||
| − | |||
== Which one to choose == | == Which one to choose == | ||
Latest revision as of 19:24, 22 October 2013
Tested on Ubuntu 13.04, 64 bits system (x86_64), with boost 1.49.
My preference is to not be bothered with io-restrictions, but your mileage may vary.
Ubuntu 13.10 & libboost 1.53
Add LIBS="-lboost_system -lboost_thread"
gcc (Gnu)
Ubuntu 13.04, g++ version 4.7.3
- ./configure COMPILED_BY="Jérôme Grimbert <jgrimbert@free.fr>" --disable-io-restrictions
Ubuntu 13.10, g++ version 4.8.1
- ./configure COMPILED_BY="Jérôme Grimbert <jgrimbert@free.fr>" --disable-io-restrictions LIBS="-lboost_system -lboost_thread"
same result
I/O restrictions: disabled X Window display: enabled (using SDL) Supported image formats: gif tga iff ppm pgm hdr png jpeg tiff openexr Unsupported image formats: - Compilation settings: Build architecture: x86_64-unknown-linux-gnu Built/Optimized for: x86_64-unknown-linux-gnu (using -march=native) Compiler vendor: gnu Compiler version: g++ 4.7 Compiler flags: -pipe -Wno-multichar -Wno-write-strings -fno-enforce-eh-specs -s -O3 -ffast-math -march=native -pthread
clang (LLVM)
- version 3.2-1
ubuntu 13.04
- ./configure COMPILED_BY="Jérôme Grimbert <jgrimbert@free.fr>" --disable-io-restrictions CXX=clang++ CC=clang
ubuntu 13.10
- clang 3.2 has a bug in its distributed packages
- clang 3.3 is ok
Fix to be able to find stddef.h (and other include files)
- cd /usr/lib/clang/3.2/
- sudo ln -s /usr/lib/llvm-3.2/lib/clang/3.2/include
configuration
- ./configure COMPILED_BY="Jérôme Grimbert <jgrimbert@free.fr>" --disable-io-restrictions LIBS="-lboost_system -lboost_thread" CXX=clang++ CC=clang
same result
I/O restrictions: disabled X Window display: enabled (using SDL) Supported image formats: gif tga iff ppm pgm hdr png jpeg tiff openexr Unsupported image formats: - Compilation settings: Build architecture: x86_64-unknown-linux-gnu Built/Optimized for: x86_64-unknown-linux-gnu (using -march=native) Compiler vendor: gnu Compiler version: clang++ 4.2.1 Compiler flags: -pipe -Wno-multichar -Wno-write-strings -O3 -ffast-math -march=native -pthread
icc (Intel)
- version 13.0.1
- ./configure COMPILED_BY="Jérôme Grimbert <jgrimbert@free.fr>" --disable-io-restrictions CXX=icpc CC=icc CPPFLAGS=-I/usr/include/x86_64-linux-gnu/c++/4.7
- ./configure COMPILED_BY="Jérôme Grimbert <jgrimbert@free.fr>" --disable-io-restrictions LIBS="-lboost_system -lboost_thread" CXX=icpc CC=icc CPPFLAGS=-I/usr/include/x86_64-linux-gnu/c++/4.8
I/O restrictions: disabled X Window display: enabled (using SDL) Supported image formats: gif tga iff ppm pgm hdr png jpeg tiff openexr Unsupported image formats: - Compilation settings: Build architecture: x86_64-unknown-linux-gnu Built/Optimized for: x86_64-unknown-linux-gnu (using -xHost) Compiler vendor: intel Compiler version: icpc 13.0.1 Compiler flags: -pipe -Wno-multichar -Wno-write-strings -s -O3 -ip -xHost -pthread
Which one to choose
Remember that your mileage might vary.
Done on i7 980X (6 cores + HT), non-overclocked.
Personal conclusions:
- Icc is best.
- Clang is better than Gcc as long as no HT core are available.
- Gcc is better than Clang when HT cores are available.
- an HT core is worth only 0.2 to 0.25 a real core.
- X-axis: number of thread (-WT option of povray)
- Y-axis: relative performance (the higher the better)
