I have a core 2 duo, 32k L1 on each, 3 MB L2, from the sage install
this agrees:
sage-4.2: grep "cache size" install.log
checking the L1 cache size... 32768 Bytes
checking the L2 cache size... 3145728 Bytes

and:

./cache
    8     0.017     1.877
   16     0.024     1.353
   32     0.045     1.911
   64     0.106     2.357
  128     0.372     3.513
  256     0.879     2.361
  512     1.882     2.141
 1024     3.877     2.060
 2048     8.277     2.135
 4096    21.497     2.597
 8192   134.200     6.243
16384   372.665     2.777
32768   850.994     2.284
65536  1799.467     2.115
 64 4096

-Marshall


On Oct 28, 6:40 am, Gonzalo Tornaria <torna...@math.utexas.edu> wrote:
> Laptop:
>
> Intel(R) Core(TM)2 CPU         T5300  @ 1.73GHz
>     8     0.023     7.611
>    16     0.046     2.018
>    32     0.093     2.034
>    64     0.289     3.097
>   128     0.641     2.216
>   256     0.744     1.160
>   512     1.542     2.073
>  1024     3.394     2.202
>  2048     7.826     2.305
>  4096    52.330     6.687
>  8192   146.481     2.799
> 16384   314.824     2.149
> 32768   662.751     2.105
> 65536  1331.857     2.010
>  32 2048
>
> This is correct.
>
> Server:
> Intel(R) Core(TM)2 Quad  CPU   Q9550  @ 2.83GHz
>     8     0.014     7.452
>    16     0.027     2.014
>    32     0.055     1.999
>    64     0.175     3.188
>   128     0.400     2.282
>   256     0.446     1.116
>   512     0.919     2.060
>  1024     1.867     2.030
>  2048     3.779     2.024
>  4096     8.177     2.164
>  8192    25.677     3.140
> 16384   164.208     6.395
> 32768   383.568     2.336
> 65536   802.709     2.093
>  32 8192
>
> Not quite; this core 2 quad has two 6M L2 caches (one for each pair of
> cores) for a total 12M of L2 (no shared L3). The L1 is correct.
>
> Gonzalo
>
> On Tue, Oct 27, 2009 at 6:51 PM, Martin Albrecht
>
> <m...@informatik.uni-bremen.de> wrote:
>
> > Hi there,
>
> > in the thread
>
> >    http://is.gd/4EMT8
>
> > David and I agreed that M4RI should have a better, more robust and cross-
> > platform mechanism to check for cache sizes.
>
> > Thus I wrote a little C program to check for the cache size using timings of
> > random-ish memory access.
>
> > The program is available at:
>
> >  http://sage.math.washington.edu/home/malb/cache.c
>
> > On my Core 2 Duo and on my Opteron (both running Linux 64-bit) it does 
> > report
> > correct sizes. So far so good. On sage.math it reports L3 cache size instead
> > of L2 but I guess that this is probably what we want anyway (well, L2 is 3MB
> > which I don't check explicitly since I only check powers of two)
>
> > I'd appreciate if those people on this list who have different hardware or
> > software (OSX, Solaris, PPC, Sparc) could compile the program and report 
> > back
> > whether the program reports correct sizes for them. To compile and run:
>
> >  gcc -std=c99 -O3 cache.c -o cache
> >  ./cache
>
> > Cheers,
> > Martin
>
> > --
> > name: Martin Albrecht
> > _pgp:http://pgp.mit.edu:11371/pks/lookup?op=get&search=0x8EF0DC99
> > _otr: 47F43D1A 5D68C36F 468BAEBA 640E8856 D7951CCF
> > _www:http://www.informatik.uni-bremen.de/~malb
> > _jab: martinralbre...@jabber.ccc.de
--~--~---------~--~----~------------~-------~--~----~
To post to this group, send an email to sage-devel@googlegroups.com
To unsubscribe from this group, send an email to 
sage-devel-unsubscr...@googlegroups.com
For more options, visit this group at http://groups.google.com/group/sage-devel
URL: http://www.sagemath.org
-~----------~----~----~----~------~----~------~--~---

Reply via email to