[Cs-dev] Compiler optimization flags
Date | 2013-04-14 20:06 |
From | Oeyvind Brandtsegg |
Subject | [Cs-dev] Compiler optimization flags |
Attachments | None None |
I'm comparing performance on Windows and Linux, and in so doing i need to figure out the optimal flags for compiling Csound. I've tried the gcc3 and the gcc4 optimization and also using both in combination. Setting it to 'pentium3' for both. Is there a way of determining the best setting ? (Other than trial and error). |
Date | 2013-04-14 21:32 |
From | Michael Gogins |
Subject | Re: [Cs-dev] Compiler optimization flags |
Attachments | None None |
-march=native is supposed to select the optimum flags for your SPECIFIC computer. My flags that I compile with are: CMAKE_CXX_FLAGS:STRING=-std=gnu++0x -fopenmp -include cmath -march=nocona
CMAKE_C_FLAGS:STRING=-fopenmp -march=nocona -I/usr/local/include nocona is an older chip architecture that already has mot of the vectorization stuff. Change it to native and see if it makes a difference.\
Hope this helps, Mike On Sun, Apr 14, 2013 at 3:06 PM, Oeyvind Brandtsegg <oyvind.brandtsegg@ntnu.no> wrote:
Michael Gogins Irreducible Productions http://www.michael-gogins.com Michael dot Gogins at gmail dot com |
Date | 2013-04-15 10:17 |
From | Oeyvind Brandtsegg |
Subject | Re: [Cs-dev] Compiler optimization flags |
Attachments | test_multiosc.csd None None |
Thanks so much. It seems 'pentium3' and 'native' gives similar optimization, but thanks a lot for the tip.I measuer "Elapsed time at end of performance: real: XXs, CPU: XXs" "real" varies between 27 and 39 seconds (with the same Csound build) I use Ubuntu 12, also installed Ubuntu Studio. It seems there is room for improvement of the efficiency of my Linux system. Any ideas of what to twek and what to check is greatly appreciated. I tried running csound with different nice levels but the reported render times did not change much. For reference, here are my Csound Scons options: scons -j 2 buildDSSI=0 buildImageOpcodes=1 buildInterfaces=1 buildJavaWrapper=1 buildPythonOpcodes=1 buildUtilities=1 buildVirtual=1 Lib64=0 useDouble=1 usePortAudio=0 usePortMidi=1 useALSA=1 useJack=1 useFLTK=1 Word64=1 buildPythonWrapper=1 smoothSort=1 includeMP3=1 buildCsoundAC=0 buildStkOpcodes=1 buildBeats=1 dynamicCsoundLibrary=1 buildOSC=1 useOSC=1 useIpMIDI=1 buildRelease=1 noDebug=1 gcc3opt='native' gcc4opt='native' Also tried useOpenMP=1 (as I thought perhaps that's what you did Michael?), but it did not significantly change the reported render times. best Oeyvind
2013/4/14 Michael Gogins <michael.gogins@gmail.com>
-- Oeyvind Brandtsegg Professor of Music Technology NTNU 7491 Trondheim Norway Cell: +47 92 203 205 http://flyndresang.no/ http://www.partikkelaudio.com/ http://soundcloud.com/brandtsegg http://soundcloud.com/t-emp |