* Re: A few questions about compiling code and performance
@ 2000-11-01 22:26 Brad Lucier
0 siblings, 0 replies; 6+ messages in thread
From: Brad Lucier @ 2000-11-01 22:26 UTC (permalink / raw)
To: axp-list; +Cc: lucier
> 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)
use -ffast-math with gcc/g77 where you'd use -fast with ccc/fort
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: A few questions about compiling code and performance
@ 2000-11-01 20:38 Eugene Chu
0 siblings, 0 replies; 6+ messages in thread
From: Eugene Chu @ 2000-11-01 20:38 UTC (permalink / raw)
To: axp-list
J. Pedro Sousa do Amaral wrote:
>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? 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?
The CPU time used by system overhead is usually for I/O operations.
Most I/O in most flavors of UNIX is still buffered, so there is copying
between system memory and user memory before the data is actually
transferred to/from the I/O devices. The user CPU time is the the
actual amount of time yoru program spent using up CPU cycles doing
whatever it does. A lot of times, the sum of these two are less than
the elapsed time, and the difference is usually due to the delay in
I/O operations. Moving data to/from physical devices usually takes
orders of magnitude longer than moving it between memory, or just
processing the data. This is why you can't reliably predict the
performance of your program based just on CPU or memory speeds.
eyc
^ permalink raw reply [flat|nested] 6+ messages in thread
* RE: Custom AXP kernel
@ 2000-11-01 12:02 Greg Lindahl
2000-11-01 14:36 ` A few questions about compiling code and performance J. Pedro Sousa do Amaral
0 siblings, 1 reply; 6+ messages in thread
From: Greg Lindahl @ 2000-11-01 12:02 UTC (permalink / raw)
To: axp-list
> I've got an Alpha EV6/500 XP1000 with RedHat 6.2. I took a crack at
> building a custom kernel recently and couldn't figure out which
> machine type to use.
I guess, in a way, that it's handy that people insist on testing the
non-generic kernels...
> This hardware may be more recent than the 2/99 date on the FAQ at
> alphalinux.org.
Nothing's changed since 2/99; that's around when the GENERIC kernel was
invented, and the GENERIC kernel will be a valid type into the future. As
the hardware gets revved, new code does get added.
-- g
^ permalink raw reply [flat|nested] 6+ messages in thread
* A few questions about compiling code and performance
2000-11-01 12:02 Custom AXP kernel Greg Lindahl
@ 2000-11-01 14:36 ` J. Pedro Sousa do Amaral
2000-11-01 19:34 ` Ross A Knepper
2000-11-01 19:52 ` arthur m coucouvitis
0 siblings, 2 replies; 6+ messages in thread
From: J. Pedro Sousa do Amaral @ 2000-11-01 14:36 UTC (permalink / raw)
To: axp-list
Hi,
My questions are somewhat off-topic (and ignorant; I do not know how to
program...) but here's the first one: I have a certain dynamical system
analysis program source code, which I believe was initially written for
Sun's OS. 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?
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? 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?
My last question is about a compiling error shown below. Any ideas about why
this error occurs?
f77 -O4 \
-o dimension dimension.f epsprg.o
param.h: In program `dimension':
In file included from dimension.f:39:
param.h:26:
parameter (nbound=max(nbins,ndatar))
^
Invalid declaration of or reference to symbol `max' at (^) [initially seen
at (^)]
make: *** [dimension] Error 1
Thank you very much.
ZP
--
José Pedro Sousa do Amaral
Disclaimer: Any resemblance between the above views and those of my
employer, my terminal, or the view out my window are purely coincidental.
Any resemblance between the above and my own views is non-deterministic. The
question of the existence of views in the absence of anyone to hold them is
left as an exercise for the reader. The question of the existence of the
reader is left as an exercise for the second god coefficient. (A discussion
of non-orthogonal, non-integral polytheism is beyond the scope of this
article.)
^ permalink raw reply [flat|nested] 6+ messages in thread* Re: A few questions about compiling code and performance
2000-11-01 14:36 ` A few questions about compiling code and performance J. Pedro Sousa do Amaral
@ 2000-11-01 19:34 ` Ross A Knepper
2000-11-01 19:52 ` arthur m coucouvitis
1 sibling, 0 replies; 6+ messages in thread
From: Ross A Knepper @ 2000-11-01 19:34 UTC (permalink / raw)
To: axp-list
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
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: A few questions about compiling code and performance
2000-11-01 14:36 ` A few questions about compiling code and performance J. Pedro Sousa do Amaral
2000-11-01 19:34 ` Ross A Knepper
@ 2000-11-01 19:52 ` arthur m coucouvitis
2000-11-02 0:50 ` W Bauske
1 sibling, 1 reply; 6+ messages in thread
From: arthur m coucouvitis @ 2000-11-01 19:52 UTC (permalink / raw)
To: axp-list
hi,
maybe i can help witrh the 3rd ?
> ...Any ideas about why this error occurs?
>
> f77 -O4 \
> -o dimension dimension.f epsprg.o
> param.h: In program `dimension':
> In file included from dimension.f:39:
> param.h:26:
> parameter (nbound=max(nbins,ndatar))
> ^
> Invalid declaration of or reference to symbol `max' at (^) [initially seen
> at (^)]
> make: *** [dimension] Error 1
max is a macro defined in a system include file.
the error can be fixed by adding 'include <file-name.h>' to
dimension.f,
where file-name is the name of the file containing the
definition of map().
to find the file, you could try:
grep -w map /usr/include/*.h
grep -w map /usr/include/*/*.h, etc
good luck,
--
arthur m coucouvitis ATIPA Linux Solutions, Inc.
tel: 603 622-7171 x 15 850 East Industrial Park Drive
fax: 603 622-7272 Suite 8, Manchester, NH 03109
http://www.dcginc.com http:/www.atipa.com
^ permalink raw reply [flat|nested] 6+ messages in thread* Re: A few questions about compiling code and performance
2000-11-01 19:52 ` arthur m coucouvitis
@ 2000-11-02 0:50 ` W Bauske
0 siblings, 0 replies; 6+ messages in thread
From: W Bauske @ 2000-11-02 0:50 UTC (permalink / raw)
To: axp-list
arthur m coucouvitis wrote:
>
> hi,
>
> maybe i can help witrh the 3rd ?
> > ...Any ideas about why this error occurs?
> >
> > f77 -O4 \
> > -o dimension dimension.f epsprg.o
> > param.h: In program `dimension':
> > In file included from dimension.f:39:
> > param.h:26:
> > parameter (nbound=max(nbins,ndatar))
> > ^
> > Invalid declaration of or reference to symbol `max' at (^) [initially seen
> > at (^)]
> > make: *** [dimension] Error 1
> max is a macro defined in a system include file.
> the error can be fixed by adding 'include <file-name.h>' to
> dimension.f,
> where file-name is the name of the file containing the
> definition of map().
> to find the file, you could try:
> grep -w map /usr/include/*.h
> grep -w map /usr/include/*/*.h, etc
>
If it were my code, I'd just do:
integer nbound
.
.
.
nbound=max(nbins,ndatar)
Not worth chasing this. It's trivial to change the code so the compiler
won't complain about it.
Wes
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2000-11-01 23:43 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2000-11-01 22:26 A few questions about compiling code and performance Brad Lucier
-- strict thread matches above, loose matches on Subject: below --
2000-11-01 20:38 Eugene Chu
2000-11-01 12:02 Custom AXP kernel Greg Lindahl
2000-11-01 14:36 ` A few questions about compiling code and performance J. Pedro Sousa do Amaral
2000-11-01 19:34 ` Ross A Knepper
2000-11-01 19:52 ` arthur m coucouvitis
2000-11-02 0:50 ` W Bauske
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox