Just something interesting.

[root@center victor]# ./pi 10000000 1
Process: 2.068588 secs.
Thread 0: 2.067015 secs.
Estimation of pi is 3.141593

[root@center victor]# ./pi 10000000 2
Process: 1.039655 secs.
Thread 0: 1.032037 secs.
Thread 1: 1.037770 secs.
Estimation of pi is 3.141593

[root@center victor]# ./pi 10000000 4
Process: 1.085724 secs.
Thread 0: 0.886457 secs.
Thread 1: 0.932143 secs.
Thread 2: 1.067317 secs.
Thread 3: 0.920398 secs.
Estimation of pi is 3.141593

[root@center victor]# ./pi 10000000 8
Process: 1.068306 secs.
Thread 0: 0.585845 secs.
Thread 1: 0.694847 secs.
Thread 2: 0.613091 secs.
Thread 3: 0.596721 secs.
Thread 4: 0.603677 secs.
Thread 5: 0.528817 secs.
Thread 6: 0.473153 secs.
Thread 7: 0.514793 secs.
Estimation of pi is 3.141593

[root@center victor]# ./pi 10000000 16
Process: 1.049648 secs.
Thread 0: 0.129118 secs.
Thread 1: 0.149502 secs.
Thread 2: 0.209421 secs.
Thread 3: 0.129433 secs.
Thread 4: 0.129791 secs.
Thread 5: 0.179113 secs.
Thread 6: 0.228383 secs.
Thread 7: 0.308022 secs.
Thread 8: 0.129021 secs.
Thread 9: 0.239542 secs.
Thread 10: 0.200335 secs.
Thread 11: 0.239937 secs.
Thread 12: 0.256526 secs.
Thread 13: 0.129181 secs.
Thread 14: 0.129019 secs.
Thread 15: 0.158886 secs.
Estimation of pi is 3.141593

Maybe something wrong?
PPro 266MHz

May  6 21:33:24 center kernel: Intel MultiProcessor Specification v1.4
May  6 21:33:24 center kernel:     Virtual Wire compatibility mode.
May  6 21:33:24 center kernel: OEM ID: INTEL    Product ID:
PR440FX      APIC at: 0xFEC08000
May  6 21:33:24 center kernel: Processor #0 Pentium(tm) Pro APIC
version 17
May  6 21:33:24 center kernel: Processor #4 Pentium(tm) Pro APIC
version 17
May  6 21:33:24 center kernel: I/O APIC #13 Version 17 at 0xFEC00000.
May  6 21:33:24 center kernel: Processors: 2
...
May  6 21:33:24 center kernel: Calibrating delay loop.. ok - 198.25
BogoMIPS
May  6 21:33:24 center kernel: Memory: 126612k/131072k available (960k
kernel code, 384k reserved, 3116k data)



[EMAIL PROTECTED] wrote:
> 
> Hi,
> 
> I just joined this group. For the record, I built a 2.2.4 kernel with SMP
> enabled and it started fine
> on my dual PPro box [TYAN S1668 motherboard, 440FX PCI-ISA]. Since there
> are no "official" benchmarks
> to verify dual processor speed, I wrote the following applet based on the
> "Parallel programming mini-howto".
> This applet calculates the value of PI given the number of interations (say
> 100000) and the number of threads.
> It would be interesting for others to build and run this, then report some
> results for comparison. In particular, I'm interested in BX chipsets and
> how shared memory configurations differ. Building the applet:
> 
>      gcc -O pi.c -o pi -D_REENTRANT -lpthread -lm
>      ./pi 100000 2  // times 2 threads calculating PI using 100000
> iterations
> 
> Source code:
> 
> (See attached file: pi.c)
> 
> Here are my timings: (dual PPRO 150 MHz)
> 
> Process: 0.029640 secs.
> Thread 0: 0.028207 secs.
> Thread 1: 0.028114 secs
> Estimation of pi is 3.141593
> 
> The total process took 29.6 ms. which consists of 2 threads running in
> parallel (thread 0 = 28.2 ms, thread 1 = 28.1 ms).
> 
> On another note, I am building a dual Celeron PCI card (custom design) and
> would like to combine Real-time Linux with SMP into an embedded, bootable
> kernel. Anyone ever work on this?
> 
> Regards,
> 
> Terry Arden
> 
>                                                   
>----------------------------------------------------------------------
> 
>               Name: pi.c
>    pi.c       Type: unspecified type (application/octet-stream)
>           Encoding: base64
-
Linux SMP list: FIRST see FAQ at http://www.irisa.fr/prive/mentre/smp-faq/
To Unsubscribe: send "unsubscribe linux-smp" to [EMAIL PROTECTED]

Reply via email to