[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: FORTRAN implementation in Lenny

On Tue, Feb 23, 2010 at 2:35 AM, Fuentes, Adolfo
<A.Fuentes@liverpool.ac.uk> wrote:
> Hello Raju.
> <f95> is a link in "/etc/alternatives" to "/usr/bin/gfortran".

Ok, thanks.

> When typing "gfortran -v" the options are:
> ]$ gfortran -v
> Using built-in specs.
> Target: i486-linux-gnu
> Configured with: ../src/configure -v --with-pkgversion='Debian 4.3.2-1.1' --with-bugurl=file:///usr/share/doc/gcc-4.3/README.Bugs --enable-languages=c,c++,fortran,objc,obj-c++ --prefix=/usr --enable-shared --with-system-zlib --libexecdir=/usr/lib --without-included-gettext --enable-threads=posix --enable-nls --with-gxx-include-dir=/usr/include/c++/4.3 --program-suffix=-4.3 --enable-clocale=gnu --enable-libstdcxx-debug --enable-objc-gc --enable-mpfr --enable-targets=all --enable-cld --enable-checking=release --build=i486-linux-gnu --host=i486-linux-gnu --target=i486-linux-gnu
> Thread model: posix
> gcc version 4.3.2 (Debian 4.3.2-1.1)

I have gfortran 4.4.1, gcc-4.4.1 on my system and this is what I get.

$ gcc -O3 -march=native nbody.gcc-5.c
$ time ./a.out 50000000

real    0m7.799s
user    0m7.796s
sys     0m0.004s

$ gfortran -O3 -march=native nbody.f90
$ time ./a.out 50000000

real    0m10.947s
user    0m10.949s
sys     0m0.000s

It still shows that code compiled with gfortran is a bit slower than
the one compiled with gcc. But the ratio is a bit better.

gfortran/gcc (for 4.4.1) = 10.947/7.799 = 1.4036
gfortra/gcc (for 4.3.2) = 151.7/77.4 = 1.9599

May be you can upgrade to the latest gfortran version for a little bit
improvement in performance.

Also, you might get better help at the gfortran mailing list
fortran@gcc.gnu.org . It is frequented by gfortran developers who know
the ins and outs of the gfortran source.

Reply to: