From mboxrd@z Thu Jan 1 00:00:00 1970 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 111c93,5c187b9e0c78e85b X-Google-Attributes: gid111c93,public X-Google-Thread: 1094ba,5c187b9e0c78e85b X-Google-Attributes: gid1094ba,public From: Leon Muratov Subject: Re: Linux / Tru64 Fortran performance Date: 2000/04/26 Message-ID: <8e6uqk$3i3$1@nnrp1.deja.com>#1/1 X-Deja-AN: 615912892 References: <8e29bb$7th$1@nnrp1.deja.com> <3905E6E5.B4E2DFF5@moene.indiv.nluug.nl> <8e50ue$vu8$1@nnrp1.deja.com> <8e54sv$jt0$1@nntp6.u.washington.edu> X-Http-Proxy: 1.0 x28.deja.com:80 (Squid/1.1.22) for client 157.182.108.227 Organization: Deja.com - Before you buy. X-Article-Creation-Date: Wed Apr 26 14:35:01 2000 GMT X-MyDeja-Info: XMYDJUIDlmuratov Newsgroups: comp.lang.fortran,comp.os.linux.alpha X-Http-User-Agent: Mozilla/4.7 [en] (X11; I; OSF1 V4.0 alpha) In article <8e54sv$jt0$1@nntp6.u.washington.edu>, kargl@troutmask.apl.washington.edu (Steven G. Kargl) wrote: > In article <8e50ue$vu8$1@nnrp1.deja.com>, > Leon Muratov writes: > > In article <3905E6E5.B4E2DFF5@moene.indiv.nluug.nl>, > > > > So any ideas what can cause 50% slowdown on Linux? > > Memory management and I/O. > > As already mentioned Tru64 has page coloring while linux > doesn't. This can affect memory management which your > "benchmark" number suggest is the problem. Does your > program allocate/deallocate a large number of small > arrays? This could lead to misalignment and fragmentation > which may causes inefficient use of the cache. > > > > > And what can I do to figure it out before I erase Linux disk? > > > > Use the profiler to find the bottleneck(s) in the code. You > need to add the -pg flag to the compilation and use gprof > to see how the code uses the cpu. Of course, this suggestion > is only valid if Compaq provides this with their linux Fortran > compiler. > > -- > Steve > Steve, thank you, this is a good point ! I had to think about it myself first, since I already so a similar problem on HP. However, I was under impression that cache management is done mainly by hardware. And if compilers are the same (as COMPAQ fortran group stated) executables and memory layouts should be similar. So what is so bad for Linux that was OK for Tru64? What should I avoid? What is an efficient way of handling memory in Linux? The program was originally written for Cray (not by me). It handle the memory as following In the beginning it allocate a large chunk of memory and create an internal "heap" from which it supplies memory to subroutines. Most of allocations are semi-permanent (for long time) but there are some for small arrays. I understand that this prevents compiler from any memory optimization, but to change a structure of the program with 25K lines brrr... I tried once and quit. This probably has to be done anyway, but first I would like to get answers to questions above. Speaking about libraries: We are not using any special libraries exept base runtime, all special functions are computed inside (result of porting this program to several different platforms). Program does not have too many Exp, Sin and Cos it mostly does additions, multiplications,. and some Sqrts. And if it was a libproblems benchmarks ratio most ikely (parts of program could scale differently with N) would be the similar for small and large program. 99.9% that this is a memory problem. Best, Leon BTW when I checked few LAPACK routines compiled from source by COMPAQ compilers they run as fast as their twins from extended math libraries. Sent via Deja.com http://www.deja.com/ Before you buy.