[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Too speedy problem
From: |
Michael Gertz |
Subject: |
Too speedy problem |
Date: |
Tue, 24 Sep 2002 09:48:23 -0500 |
User-agent: |
Mutt/1.2.5i |
Hi all,
I'm a numerical analysis who has been running a script that solves a
standard test set of optimization problems by repeatedly linking them
with an optimization code and then running the resulting
executable. Some of these problems are old and solve very quickly on
modern computers. This has been giving make headaches. I know that
there are better ways of handling the test suite, but this is the most
fully portable. I've solved my problem, but make was giving
unexpected results, so I thought I'd isolate the problem and report
it.
Consider our old friend hello.c
#include<stdio.h>
int main()
{
printf( "Hello World.\n" );
}
and a makefile
hello: hello.o
cc -o hello hello.o
clean:
-rm -f hello hello.o
If I run this script:
#!/bin/sh
make $DEBUG hello
hello
rm hello.o
make $DEBUG hello
hello
rm hello.o
make $DEBUG hello
hello
rm hello.o
make $DEBUG hello
hello
rm hello.o
make $DEBUG hello
hello
rm hello.o
make $DEBUG hello
hello
rm hello.o
make $DEBUG hello
hello
the executable isn't always rebuilt
cc -c -o hello.o hello.c
cc -o hello hello.o
Hello World.
cc -c -o hello.o hello.c
Hello World.
cc -c -o hello.o hello.c
Hello World.
cc -c -o hello.o hello.c
Hello World.
cc -c -o hello.o hello.c
Hello World.
cc -c -o hello.o hello.c
Hello World.
cc -c -o hello.o hello.c
Hello World.
even though hello.o is built. Verbose output is at the end of the
message.
make --version
GNU Make version 3.79.1, by Richard Stallman and Roland McGrath.
Built for i586-mandrake-linux-gnu
Copyright (C) 1988, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 2000
Free Software Foundation, Inc.
This is free software; see the source for copying conditions.
There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A
PARTICULAR PURPOSE.
Report bugs to <address@hidden>.
which I think is new and the cpu is a 956.729 Athlon according to
/proc/cpuinfo.
Thanks,
--Mike
Vebose output follows
________________________________________________________________
GNU Make version 3.79.1, by Richard Stallman and Roland McGrath.
Built for i586-mandrake-linux-gnu
Copyright (C) 1988, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 2000
Free Software Foundation, Inc.
This is free software; see the source for copying conditions.
There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A
PARTICULAR PURPOSE.
Report bugs to <address@hidden>.
Reading makefiles...
Reading makefile `makefile'...
Updating goal targets....
Considering target file `hello'.
Considering target file `hello.o'.
Considering target file `hello.c'.
Finished prerequisites of target file `hello.c'.
No need to remake target `hello.c'.
Finished prerequisites of target file `hello.o'.
Prerequisite `hello.c' is older than target `hello.o'.
No need to remake target `hello.o'.
Finished prerequisites of target file `hello'.
Prerequisite `hello.o' is older than target `hello'.
No need to remake target `hello'.
make: `hello' is up to date.
Hello World.
GNU Make version 3.79.1, by Richard Stallman and Roland McGrath.
Built for i586-mandrake-linux-gnu
Copyright (C) 1988, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 2000
Free Software Foundation, Inc.
This is free software; see the source for copying conditions.
There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A
PARTICULAR PURPOSE.
Report bugs to <address@hidden>.
Reading makefiles...
Reading makefile `makefile'...
Updating goal targets....
Considering target file `hello'.
Considering target file `hello.o'.
File `hello.o' does not exist.
Considering target file `hello.c'.
Finished prerequisites of target file `hello.c'.
No need to remake target `hello.c'.
Finished prerequisites of target file `hello.o'.
Must remake target `hello.o'.
cc -c -o hello.o hello.c
Successfully remade target file `hello.o'.
Finished prerequisites of target file `hello'.
Prerequisite `hello.o' is newer than target `hello'.
Must remake target `hello'.
cc -o hello hello.o
Successfully remade target file `hello'.
Hello World.
GNU Make version 3.79.1, by Richard Stallman and Roland McGrath.
Built for i586-mandrake-linux-gnu
Copyright (C) 1988, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 2000
Free Software Foundation, Inc.
This is free software; see the source for copying conditions.
There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A
PARTICULAR PURPOSE.
Report bugs to <address@hidden>.
Reading makefiles...
Reading makefile `makefile'...
Updating goal targets....
Considering target file `hello'.
Considering target file `hello.o'.
File `hello.o' does not exist.
Considering target file `hello.c'.
Finished prerequisites of target file `hello.c'.
No need to remake target `hello.c'.
Finished prerequisites of target file `hello.o'.
Must remake target `hello.o'.
cc -c -o hello.o hello.c
Successfully remade target file `hello.o'.
Finished prerequisites of target file `hello'.
Prerequisite `hello.o' is newer than target `hello'.
No need to remake target `hello'.
Hello World.
GNU Make version 3.79.1, by Richard Stallman and Roland McGrath.
Built for i586-mandrake-linux-gnu
Copyright (C) 1988, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 2000
Free Software Foundation, Inc.
This is free software; see the source for copying conditions.
There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A
PARTICULAR PURPOSE.
Report bugs to <address@hidden>.
Reading makefiles...
Reading makefile `makefile'...
Updating goal targets....
Considering target file `hello'.
Considering target file `hello.o'.
File `hello.o' does not exist.
Considering target file `hello.c'.
Finished prerequisites of target file `hello.c'.
No need to remake target `hello.c'.
Finished prerequisites of target file `hello.o'.
Must remake target `hello.o'.
cc -c -o hello.o hello.c
Successfully remade target file `hello.o'.
Finished prerequisites of target file `hello'.
Prerequisite `hello.o' is newer than target `hello'.
No need to remake target `hello'.
Hello World.
GNU Make version 3.79.1, by Richard Stallman and Roland McGrath.
Built for i586-mandrake-linux-gnu
Copyright (C) 1988, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 2000
Free Software Foundation, Inc.
This is free software; see the source for copying conditions.
There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A
PARTICULAR PURPOSE.
Report bugs to <address@hidden>.
Reading makefiles...
Reading makefile `makefile'...
Updating goal targets....
Considering target file `hello'.
Considering target file `hello.o'.
File `hello.o' does not exist.
Considering target file `hello.c'.
Finished prerequisites of target file `hello.c'.
No need to remake target `hello.c'.
Finished prerequisites of target file `hello.o'.
Must remake target `hello.o'.
cc -c -o hello.o hello.c
Successfully remade target file `hello.o'.
Finished prerequisites of target file `hello'.
Prerequisite `hello.o' is newer than target `hello'.
No need to remake target `hello'.
Hello World.
GNU Make version 3.79.1, by Richard Stallman and Roland McGrath.
Built for i586-mandrake-linux-gnu
Copyright (C) 1988, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 2000
Free Software Foundation, Inc.
This is free software; see the source for copying conditions.
There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A
PARTICULAR PURPOSE.
Report bugs to <address@hidden>.
Reading makefiles...
Reading makefile `makefile'...
Updating goal targets....
Considering target file `hello'.
Considering target file `hello.o'.
File `hello.o' does not exist.
Considering target file `hello.c'.
Finished prerequisites of target file `hello.c'.
No need to remake target `hello.c'.
Finished prerequisites of target file `hello.o'.
Must remake target `hello.o'.
cc -c -o hello.o hello.c
Successfully remade target file `hello.o'.
Finished prerequisites of target file `hello'.
Prerequisite `hello.o' is newer than target `hello'.
No need to remake target `hello'.
Hello World.
GNU Make version 3.79.1, by Richard Stallman and Roland McGrath.
Built for i586-mandrake-linux-gnu
Copyright (C) 1988, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 2000
Free Software Foundation, Inc.
This is free software; see the source for copying conditions.
There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A
PARTICULAR PURPOSE.
Report bugs to <address@hidden>.
Reading makefiles...
Reading makefile `makefile'...
Updating goal targets....
Considering target file `hello'.
Considering target file `hello.o'.
File `hello.o' does not exist.
Considering target file `hello.c'.
Finished prerequisites of target file `hello.c'.
No need to remake target `hello.c'.
Finished prerequisites of target file `hello.o'.
Must remake target `hello.o'.
cc -c -o hello.o hello.c
Successfully remade target file `hello.o'.
Finished prerequisites of target file `hello'.
Prerequisite `hello.o' is newer than target `hello'.
No need to remake target `hello'.
Hello World.
- Too speedy problem,
Michael Gertz <=