This is the mail archive of the fortran@gcc.gnu.org mailing list for the GNU Fortran project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Speed comparison with Intel compiler


Ignacio Fernández Galván wrote:
Hi all,

I just tried running a piece of code I'm writing compiled with gfortran
and with ifort, and the difference is worrying.

ifort: 23 s
gfortran: 165 s
gfortran -O3 -ffast-math -funroll-loops -ftree-vectorize
-march=athlon-xp -msse -mfpmath=sse,387: 164 s

The code has nothing really special, it just converts some coordinates
and quaternions into transformed coordinates, and the main part I guess
is generating the rotation matrices and applying them (with MATMUL).
There is also some (maybe too much) disk I/O)

Is there some known defficiency of gfortran here? Is it worth to
investigate this more in depth? How could I (easily) tell what is
taking so long time (I guess I could try to prepare some simpler
program which shows the same effect)?

Thanks
Ignacio

P.S. gfortran is (gcc version 4.3.0 20070402), ifort is (Version 9.1).





___________________________________________________________ New Yahoo! Mail is the ultimate force in competitive emailing. Find out more at the Yahoo! Mail Championships. Plus: play games and win prizes. http://uk.rd.yahoo.com/evt=44106/*http://mail.yahoo.net/uk


I find it easier to use oprofile

[root@myhost quaternions]# opcontrol --no-vmlinux
[root@myhost quaternions]# gfc -o test -O3 -march=core2 -msse2 -mfpmath=sse -ffast-math test.f90
[root@myhost quaternions]# opcontrol --reset ; opcontrol --image=./test --start ; ./test ; opcontrol --stop
Signalling daemon... done
Profiler running.
Stopping profiling.
[root@myhost quaternions]# opreport -c -% -t .5 test
CPU: Core 2, speed 1663.27 MHz (estimated)
Counted CPU_CLK_UNHALTED events (Clock cycles when not halted) with a unit mask of 0x00 (Unhalted core cycles) count 100000
samples % symbol name
-------------------------------------------------------------------------------
1008251 50.3400 mem_alloc_r_at
1008251 50.3400 mem_alloc_r_at [self]
-------------------------------------------------------------------------------
481072 24.0190 next_char
481072 24.0190 next_char [self]
-------------------------------------------------------------------------------
170937 8.5346 _gfortrani_is_array_io
170937 8.5346 _gfortrani_is_array_io [self]
-------------------------------------------------------------------------------
128609 6.4212 _gfortrani_is_stream_io
128609 6.4212 _gfortrani_is_stream_io [self]
-------------------------------------------------------------------------------
89973 4.4922 _gfortrani_is_internal_unit
89973 4.4922 _gfortrani_is_internal_unit [self]
-------------------------------------------------------------------------------
26723 1.3342 eat_spaces
26723 1.3342 eat_spaces [self]
-------------------------------------------------------------------------------
10902 0.5443 ____strtod_l_internal
10902 0.5443 ____strtod_l_internal [self]
-------------------------------------------------------------------------------
[root@myhost quaternions]#




Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]