[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
GMP 3.1.1 Alpha(21164) Linux(Debian 2.2) problems
From: |
Fat Phil |
Subject: |
GMP 3.1.1 Alpha(21164) Linux(Debian 2.2) problems |
Date: |
Mon, 29 Jan 2001 09:51:38 +0200 |
Problems and fortunately a solution to one too.
Firstly, on my Alpha, /proc/cpuinfo has its info in a different form, it
uses "BogoMIPS", rather than "bogomips". Hence in tune/time.c, the
following changes (or similar) need to be applied: (orig_time.c being
the distributed code)
address@hidden:tune$ diff -c time.c orig_time.c
*** time.c Mon Jan 29 10:04:37 2001
--- orig_time.c Sun Jul 30 03:35:03 2000
***************
*** 155,183 ****
{
while (fgets (buf, sizeof (buf), fp) != NULL)
{
- double multiplier=0.0;
if (sscanf (buf, "cycle frequency [Hz] : %lf est.\n",
&val) == 1)
- {
- multiplier = 1.0;
- }
- else if (sscanf (buf, "cpu MHz : %lf\n", &val) == 1)
{
! multiplier = 1e-6;
}
! else if (sscanf (buf, "bogomips : %lf\n", &val) == 1)
{
! multiplier = 1e-6;
}
! else if (sscanf (buf, "BogoMIPS : %lf\n", &val) == 1)
! {
! multiplier = 1e-6;
! }
! if ((multiplier != 0.0) && (val != 0.0))
! {
! speed_cycletime = multiplier / val;
ret = 1;
break;
! }
}
fclose (fp);
}
--- 155,178 ----
{
while (fgets (buf, sizeof (buf), fp) != NULL)
{
if (sscanf (buf, "cycle frequency [Hz] : %lf est.\n",
&val) == 1)
{
! speed_cycletime = 1.0 / val;
! ret = 1;
! break;
}
! if (sscanf (buf, "cpu MHz : %lf\n", &val) == 1)
{
! speed_cycletime = 1e-6 / val;
! ret = 1;
! break;
}
! if (sscanf (buf, "bogomips : %lf\n", &val) == 1)
! {
! speed_cycletime = 1e-6 / val;
ret = 1;
break;
! }
}
fclose (fp);
}
The second one I've not had a chance to look at yet (hey, I only
downloaded it an hour ago!).
address@hidden:/usr/local/src/gmp-3.1.1/tune$ ./speed -s 349059 -C
mpn_add_n
overhead 9.03 cycles, precision 10000 units of 1.88e-09 secs, cycle
1.9e-09
mpn_add_n
349059 45.8807
address@hidden:/usr/local/src/gmp-3.1.1/tune$ ./speed -s 349060 -C
mpn_add_n
overhead 9.03 cycles, precision 10000 units of 1.88e-09 secs, cycle
1.9e-09
mpn_add_n
Segmentation fault
I did a binary chop, and it seemed that the cutoff is deterministic.
Phil Carmody
- GMP 3.1.1 Alpha(21164) Linux(Debian 2.2) problems,
Fat Phil <=