From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail.redhat.com (mail.redhat.com [199.183.24.239]) by listman.redhat.com (Postfix) with ESMTP id 727A53095C for ; Wed, 1 Nov 2000 14:36:14 -0500 (EST) Received: (from mail@localhost) by mail.redhat.com (8.11.0/8.8.7) id eA1JaEU15100 for axp-list@listman.redhat.com; Wed, 1 Nov 2000 14:36:14 -0500 Received: from ztxmail02.ztx.compaq.com (ztxmail02.ztx.compaq.com [161.114.1.206]) by mail.redhat.com (8.11.0/8.8.7) with ESMTP id eA1JaDD15092 for ; Wed, 1 Nov 2000 14:36:13 -0500 Received: by ztxmail02.ztx.compaq.com (Postfix, from userid 12345) id 967251564; Wed, 1 Nov 2000 13:36:08 -0600 (CST) Received: from anw.zk3.dec.com (wasted.zk3.dec.com [16.140.32.3]) by ztxmail02.ztx.compaq.com (Postfix) with ESMTP id 1909A174D for ; Wed, 1 Nov 2000 13:36:08 -0600 (CST) Received: from imhotep.zk3.dec.com by anw.zk3.dec.com (8.9.3/1.1.22.2/08Sep98-0251PM) id OAA0000702737; Wed, 1 Nov 2000 14:36:07 -0500 (EST) Date: Wed, 1 Nov 2000 14:34:55 -0500 (EST) From: Ross A Knepper To: axp-list@redhat.com Subject: Re: A few questions about compiling code and performance In-Reply-To: Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII X-Loop: axp-list@redhat.com Sender: axp-list-admin@redhat.com Errors-To: axp-list-admin@redhat.com X-BeenThere: axp-list@redhat.com X-Mailman-Version: 2.0beta4 Precedence: bulk Reply-To: axp-list@redhat.com List-Id: Linux and Red Hat on Alpha processors On Wed, 1 Nov 2000, J. Pedro Sousa do Amaral wrote: > This FORTRAN code was initially set to compile with the flag > -fast, but that wouldn't work in my system (AS 200, RH 5.2 highly modified, > latest stable kernel, and pretty recent compilers--g77 version egcs-2.91.66 > 19990314). Is there an equivalent flag in the GNU FORTRAN compiler? -fast is a compiler specific flag. gnu compilers use -O for general optimizations, which will probably make it run faster. i dont use fortran, but with gcc, there are multiple levels of optimization that get more aggressive (eg -O6 is more sophisticated than -O2, which may or may not mean it runs faster) > Another question is about bogometer benchmarking. How useful is to use the > function time to benchmark the performance of a given program compiled > across different machines? it depends what you want to know. time is pretty accurate about how long a program takes to run, but if you're comparing between systems, the information you derive from it is limited. it would be unfair to conclude that one compiler generates faster code, or that one processor is faster. all you can safely say is that for your application, compiler A gives better performance on platform A than compiler B gives on platform B. > From the man time: "The time utility executes and > times utility. After the utility finishes, time writes the total time > elapsed, the time consumed by system overhead, and the time used to execute > utility to the standard error stream." What is exactly the meaning of the > two last times reported? wall clock time is simply the difference in time between when it begins and when it ends. on a busy system, this will be longer than the sum of the system and user times, because other processes are running at the same time. user time is the actual time consumed by the processor in running the code you wrote. system time is the actual processor time spent within the kernel executing on behalf of your process. system time includes system calls and some types of faults (like memory management). on an idle system, user+system should be roughly equal to wall clock time. > parameter (nbound=max(nbins,ndatar)) you may need to define a macro for max, or include some file which defines it. not knowing fortran, i can't help much with this. but in c, it would be: #define max(a,b) ((a) > (b) ? (a) : (b)) hope this helps -ross