Miscellaneous > The Lounge

CPU wars

<< < (5/8) > >>

toadlife:

--- Quote from: H_TeXMeX_H ---Hmmm ... how do I compile it ? (I know it's a stupid question, but unless it's got a makefile, I have no clue)
--- End quote ---

I was stuck on that too, but made an edumacated guess and got it.  All you have to do is type this at the command line (assuming the file is in your PWD)....



--- Code: ---%cc ./benchmark.c

--- End code ---

The the file will be compiled. The resulting binary should be called "a.out".

After that just execute "a.out" to run the benchmark.

toadlife:
Okay, here is my Dual Core 4400+


--- Quote ---%./a.out
Starting floating-point benchmark...
This system has calculated 1296222130 floating-point calculations in 10 seconds
Starting pi benchmark...
This system took 65 seconds to calculate pi to 20000 digits

--- End quote ---


And here it is, two at the same time... (dual core rocks!)

--- Quote ---%./a.out & && ./a.out &
[1] 967
[2] 968
Starting floating-point benchmark...
%Starting floating-point benchmark...

%This system has calculated 1251545160 floating-point calculations in 10 seconds
Starting pi benchmark...
This system has calculated 1212464935 floating-point calculations in 10 seconds
Starting pi benchmark...
This system took 66 seconds to calculate pi to 20000 digits
This system took 67 seconds to calculate pi to 20000 digits

[2]    Done                          ./a.out
[1]  + Done                          ./a.out

--- End quote ---

solemnwarning:
It has the compile command in a comment at the start of the file :\

H_TeXMeX_H:
Thanks for the instructions toadlife ... the "gcc -Wall cpuwars.c cpuwars.o" didn't seem to work ...

here are the results for my laptop's 2.8 Ghz P4 (no HT) ... kinda funny how the floating point is half that of toadlife's AMD, but the pi calculation time is pretty close (4-5 sec).


--- Code: ---[Draconishinobi@knoppix Downloads]$ ./a.out
Starting floating-point benchmark...
This system has calculated 620565563 floating-point calculations in 10 seconds
Starting pi benchmark...
This system took 72 seconds to calculate pi to 20000 digits
[Draconishinobi@knoppix Downloads]$ ./a.out
Starting floating-point benchmark...
This system has calculated 639032963 floating-point calculations in 10 seconds
Starting pi benchmark...
This system took 71 seconds to calculate pi to 20000 digits
[Draconishinobi@knoppix Downloads]$ ./a.out
Starting floating-point benchmark...
This system has calculated 638959711 floating-point calculations in 10 seconds
Starting pi benchmark...
This system took 72 seconds to calculate pi to 20000 digits
[Draconishinobi@knoppix Downloads]$

--- End code ---

piratePenguin:

--- Quote from: H_TeXMeX_H ---Thanks for the instructions toadlife ... the "gcc -Wall cpuwars.c cpuwars.o" didn't seem to work ...
--- End quote ---
gcc -Wall -o cpuwars.o cpuwars.c

Navigation

[0] Message Index

[#] Next page

[*] Previous page

Go to full version