Problem building tuneup...

David Cleaver wraithx at morpheus.net
Sun Jun 26 15:02:03 CEST 2011


On 6/26/2011 5:05 AM, Torbjorn Granlund wrote:
> David Cleaver writes:
>
>    On 6/25/2011 7:01 PM, Torbjorn Granlund wrote:
>    >  David Cleaver writes:
>    >
>    >     $ make tuneup
>    >     gcc -O2 -pedantic -m64 -std=gnu99 -mtune=k8 -march=k8    tuneup.c   -o tuneup
>    >
>    >  This is very wrong.  There should be many steps in creating the tuneup
>    >  executable, with -I options passed for each compilation.
>    >
>    >  Some Windoze developer need to look into this.
>    >
>
>    Actually, looking into the Makefile, all I see is a target for 'tune'
>    and not 'tuneup'.  This may be a 'bug' in the manual.  I see that this
>    was brought up on the gmp-bugs list back in January of 2008 by Jafet.
>    I have run into the same problem.
>
> Then perhaps your Makefile was not generated correctly.
>
> Or perhaps the specified target needs to include .exe for DOS platforms?
>
> Does "make tuneup.exe" work better?
>

Yes, 'make tuneup.exe' does work for me.

Then I run into a problem running tuneup:
$ ./tuneup
Parameters for ./mpn/generic/gmp-mparam.h
The system cannot find the path specified.
The system cannot find the path specified.
The system cannot find the path specified.

I see in tuneup.c the following line:
fprintf (stderr, "Parameters for %s\n", GMP_MPARAM_H_SUGGEST);

And I found in config.h that GMP_MPARAM_H_SUGGEST was set to:
#define GMP_MPARAM_H_SUGGEST "./mpn/generic/gmp-mparam.h"

I changed it to:
#define GMP_MPARAM_H_SUGGEST "../mpn/generic/gmp-mparam.h"

But I still get the following error:
$ ./tuneup
Parameters for ../mpn/generic/gmp-mparam.h
The system cannot find the path specified.
The system cannot find the path specified.
The system cannot find the path specified.

I looked through the code and found that these errors are related to the program 
trying to find out what the MHz of my processor is.  However, most of the linux 
based files don't exist in Windows or MSYS.  The program stops execution 
somewhere in speed_time_init(), probably due to not being able to determine cpu 
speed.  I know the cpu speed is stored in the windows registry under (for 
Windows >= Windows 2000):
HKEY_LOCAL_MACHINE\\HARDWARE\\DESCRIPTION\\System\\CentralProcessor\\0\\~MHz

However, I can't find an easy way to read the registry with generic C code.  I 
think the frequency can be calculated, but I'm not sure how reliable that would 
be.  What do you think the best way to proceed on this issue would be?

-David C.


More information about the gmp-bugs mailing list