* computational program spending lot of time in kernel
@ 2000-11-02 16:41 Pawel Salek
2000-11-02 18:35 ` Peter Rival
` (3 more replies)
0 siblings, 4 replies; 6+ messages in thread
From: Pawel Salek @ 2000-11-02 16:41 UTC (permalink / raw)
To: axp-list
Hi,
I have got a problem: I have tried to run old large Fortran code
(compiled with fort -fast) and have noticed that it is unexpectedly slow.
Closer investigation revealed that it spends more than 50% of CPU time in
kernel. I suspect that the program does some kind of ugly floating point
operations that require kernel support. The final numbers appear to be
correct (compared against other architecture).
Does anybody has ANY advice how to approach this problem? Is there any
way to find out the offending part of code? I thought I could run gprof
but I am not sure it show up in the output time spent in kernel..
/Pawel
--
Pawel Salek (pawsa@theochem.kth.se) http://www.theochem.kth.se/~pawsa/
Theoretical Chemistry Division, KTH voice: +46 8 790-8202
^ permalink raw reply [flat|nested] 6+ messages in thread* Re: computational program spending lot of time in kernel
2000-11-02 16:41 computational program spending lot of time in kernel Pawel Salek
@ 2000-11-02 18:35 ` Peter Rival
2000-11-06 12:21 ` My last Robert McGwier
2000-11-02 20:37 ` computational program spending lot of time in kernel Jeff Sturm
` (2 subsequent siblings)
3 siblings, 1 reply; 6+ messages in thread
From: Peter Rival @ 2000-11-02 18:35 UTC (permalink / raw)
To: axp-list
Pawel Salek wrote:
> Hi,
>
> I have got a problem: I have tried to run old large Fortran code
> (compiled with fort -fast) and have noticed that it is unexpectedly slow.
> Closer investigation revealed that it spends more than 50% of CPU time in
> kernel. I suspect that the program does some kind of ugly floating point
> operations that require kernel support. The final numbers appear to be
> correct (compared against other architecture).
>
> Does anybody has ANY advice how to approach this problem? Is there any
> way to find out the offending part of code? I thought I could run gprof
> but I am not sure it show up in the output time spent in kernel..
>
You could try out IProbe (www.alphalinux.org/iprobe). It's one of the best
profilers for Alpha out there (right up with DCPI). That should help out
considerably, I'd think. HTH. :)
- Pete
^ permalink raw reply [flat|nested] 6+ messages in thread* Re: computational program spending lot of time in kernel
2000-11-02 16:41 computational program spending lot of time in kernel Pawel Salek
2000-11-02 18:35 ` Peter Rival
@ 2000-11-02 20:37 ` Jeff Sturm
2000-11-03 0:32 ` Greg Lindahl
2000-11-03 11:15 ` Nikolaos Margaritis
3 siblings, 0 replies; 6+ messages in thread
From: Jeff Sturm @ 2000-11-02 20:37 UTC (permalink / raw)
To: axp-list
Pawel Salek wrote:
> I have got a problem: I have tried to run old large Fortran code
> (compiled with fort -fast) and have noticed that it is unexpectedly slow.
> Closer investigation revealed that it spends more than 50% of CPU time in
> kernel. I suspect that the program does some kind of ugly floating point
> operations that require kernel support. The final numbers appear to be
> correct (compared against other architecture).
It sounds like FP completion could be the culprit.
If you can disable ieee floating-point (I don't know how to do this with the
Fortran compiler) your code will trap on the offending lines, so you can
identify and fix them.
> Does anybody has ANY advice how to approach this problem? Is there any
> way to find out the offending part of code? I thought I could run gprof
> but I am not sure it show up in the output time spent in kernel..
grof won't tell you anything about kernel execution. However iprobe
(http://www.alphalinux.org/iprobe/) can profile user/kernel modes at once, if
that's what you're after.
--
Jeff Sturm
jeff.sturm@commerceone.com
^ permalink raw reply [flat|nested] 6+ messages in thread
* RE: computational program spending lot of time in kernel
2000-11-02 16:41 computational program spending lot of time in kernel Pawel Salek
2000-11-02 18:35 ` Peter Rival
2000-11-02 20:37 ` computational program spending lot of time in kernel Jeff Sturm
@ 2000-11-03 0:32 ` Greg Lindahl
2000-11-03 11:15 ` Nikolaos Margaritis
3 siblings, 0 replies; 6+ messages in thread
From: Greg Lindahl @ 2000-11-03 0:32 UTC (permalink / raw)
To: axp-list
> I have got a problem: I have tried to run old large Fortran code
> (compiled with fort -fast) and have noticed that it is unexpectedly slow.
> Closer investigation revealed that it spends more than 50% of CPU time in
> kernel.
If I understand things correctly, with the -fast flag, you won't ever trap
to the kernel for exceptional floating point operations.
I'm not so sure that all Alpha kernels had a correct accounting of user vs.
system time. But there could be other reasons it is in the kernel. Try using
"strace" to see if it's doing weird system calls.
-- g
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: computational program spending lot of time in kernel
2000-11-02 16:41 computational program spending lot of time in kernel Pawel Salek
` (2 preceding siblings ...)
2000-11-03 0:32 ` Greg Lindahl
@ 2000-11-03 11:15 ` Nikolaos Margaritis
3 siblings, 0 replies; 6+ messages in thread
From: Nikolaos Margaritis @ 2000-11-03 11:15 UTC (permalink / raw)
To: axp-list
On Thu, 02 Nov 2000, you wrote:
> Hi,
>
> I have got a problem: I have tried to run old large Fortran code
> (compiled with fort -fast) and have noticed that it is unexpectedly slow.
> Closer investigation revealed that it spends more than 50% of CPU time in
> kernel. I suspect that the program does some kind of ugly floating point
> operations that require kernel support. The final numbers appear to be
> correct (compared against other architecture).
>
> Does anybody has ANY advice how to approach this problem? Is there any
> way to find out the offending part of code? I thought I could run gprof
> but I am not sure it show up in the output time spent in kernel..
Probably the kernel needs to be recompiled with the "kernel FP
software completion" set to "yes". This item is is the kernel hacking menu-
the last menu when you run "make xconfig".
Also, have you tried compiling your code using the following flags:
-fpe0 -synchronous_exceptions -arch host -tune host
Good luck,
Nikos
--
Dr. Nikolaos A. Margaritis
Molecular Modelling of Materials Laboratory
Department of Physical Chemistry
National Centre for Scientific Research "Demokritos"
Ag. Paraskevi, Athens 15310, Greece.
Tel.: +30(0)1 650 3960, +30(0)944 773242 (mobile)
Fax.: +30(0)1 651 1766
URL: http://mmml.chem.demokritos.gr/~nmargar
---------------------------------------------------------
So, if anybody wants to have hardware sent to them; don't
call me, but instead write your own operating system.
It has worked every time for me.
Linus Torvalds
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2000-11-06 12:22 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2000-11-02 16:41 computational program spending lot of time in kernel Pawel Salek
2000-11-02 18:35 ` Peter Rival
2000-11-06 12:21 ` My last Robert McGwier
2000-11-02 20:37 ` computational program spending lot of time in kernel Jeff Sturm
2000-11-03 0:32 ` Greg Lindahl
2000-11-03 11:15 ` Nikolaos Margaritis
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox