gprof Octave 4.2.1 with gcc 6.3

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|

gprof Octave 4.2.1 with gcc 6.3

Andreas Weber-6
Dear all,

I was able to build Octave 4.2.1 tarball with gcc 6.3.0 and gprof on
debian stretch with

../octave-4.2.1/configure CFLAGS=-pg -no-pie CXXFLAGS=-pg -no-pie
--disable-java --disable-docs --without-qt --without-fftw3
--without-fltk --enable-static --disable-dl --disable-shared

the --no-pie is important for gcc > 4.9:
https://lists.gnu.org/archive/html/bug-binutils/2017-02/msg00262.html

I run Riks benchmark
a = 1; b = 1; tic; for i=1:1000; for j=1:1000; a = a + b + 123.0; end;
end; t1=toc(); t1

and uploaded the result here: https://josoansi.de/files/out

I hope that I have time to build my docker images from 3.6.4 until 4.3.0
with gprof the next days

-- Andy

Reply | Threaded
Open this post in threaded view
|

Re: gprof Octave 4.2.1 with gcc 6.3

John W. Eaton
Administrator
On 01/04/2018 05:30 PM, Andreas Weber wrote:

> Dear all,
>
> I was able to build Octave 4.2.1 tarball with gcc 6.3.0 and gprof on
> debian stretch with
>
> ../octave-4.2.1/configure CFLAGS=-pg -no-pie CXXFLAGS=-pg -no-pie
> --disable-java --disable-docs --without-qt --without-fftw3
> --without-fltk --enable-static --disable-dl --disable-shared
>
> the --no-pie is important for gcc > 4.9:
> https://lists.gnu.org/archive/html/bug-binutils/2017-02/msg00262.html
>
> I run Riks benchmark
> a = 1; b = 1; tic; for i=1:1000; for j=1:1000; a = a + b + 123.0; end;
> end; t1=toc(); t1
>
> and uploaded the result here: https://josoansi.de/files/out
>
> I hope that I have time to build my docker images from 3.6.4 until 4.3.0
> with gprof the next days

Thanks for the compiler flags.

Since -O2 is set in CFLAGS and CXXFLAGS and not some other configuration
variables that are added to the compiler command, you've disabled
compiler optimization.  Did you intend to do that?

jwe

Reply | Threaded
Open this post in threaded view
|

Re: gprof Octave 4.2.1 with gcc 6.3

Andreas Weber-6
Am 04.01.2018 um 23:38 schrieb John W. Eaton:
> Thanks for the compiler flags.
>
> Since -O2 is set in CFLAGS and CXXFLAGS and not some other configuration
> variables that are added to the compiler command, you've disabled
> compiler optimization.  Did you intend to do that?

I've read postings on the mailinglists from the last years and so far I
only found postings where someone had problems/was unable to build
octave with -pg so I choosed to disable as most as I can for the first step.

I'll try to add -O2 for the next builds and report if this works.

-- Andy


Reply | Threaded
Open this post in threaded view
|

Re: gprof Octave 4.2.1 and 4.3.0 with gcc 6.3

Andreas Weber-6
In reply to this post by Andreas Weber-6
Am 04.01.2018 um 23:30 schrieb Andreas Weber:
> I was able to build Octave 4.2.1 tarball with gcc 6.3.0 and gprof on
> debian stretch with

New gprof out, both configured with

../octave-src/configure CFLAGS=-pg -no-pie -O2 CXXFLAGS=-pg -no-pie -O2
--disable-java --disable-docs --without-qt --without-fftw3
--without-fltk --enable-static --disable-dl --disable-shared --no-create
--no-recursion

and run with

$ ./octave-cli --eval "a = 1; b = 1; tic; for i=1:1000; for j=1:1000; a
= a + b + 123.0; end; end; t1=toc()"

$ gprof octave-cli > octave-4.x.y.gprof

-----------------------------------------------------

hg id d68d1096d294 (current tip)
t1 = 8.1644
https://josoansi.de/files/octave-4.3.0.gprof

-----------------------------------------------------

hg id 1327ea4f5a93 (4.2.1 source tarball)
t1 =  3.3694
https://josoansi.de/files/octave-4.2.1.gprof

-----------------------------------------------------

I think this is a good start, isn't it?

-- Andy