Hi Sashank999
Well, SuperPI is only on Windows. Their linux version isn't allowed to be distributed. ...
I think it's also closed source.
Attached is open sourced SimplePi.sh. It will exercise all the processors listed in /proc/cpuinfo by having them all
calculate pi to the number of decimal places you specify. Here is the scripts help message:
tc@E310:~/Scripting/SimplePi$ ./SimplePi.sh ?
Simple script for benchmarking by Richard A. Rost July 23, 2020.
Script to calculate Pi to between 10 and 1000000 digits (decimal places).
This script requires bc.tcz to be installed.
This script launches a calculation for each processor in the system.
Usage:
SimplePi.sh [NumberOfDigits]
If you don't specify NumberOfDigits, the scripts current default value of
1000 is used.
If you do specify NumberOfDigits, the scripts default value is updated.
For sub-second resolution, you will need core-utils.tcz for its date command.
tc@E310:~/Scripting/SimplePi$
Here are the results of several runs on a 2.80Ghz Pentium 4 with 3 Gbytes of RAM:
tc@E310:~/Scripting/SimplePi$ ./SimplePi.sh 1000
Task# 1 Elapsed Time=2.0719
Task# 2 Elapsed Time=2.0425
tc@E310:~/Scripting/SimplePi$ ./SimplePi.sh 2000
Task# 1 Elapsed Time=11.7848
Task# 2 Elapsed Time=11.6792
tc@E310:~/Scripting/SimplePi$ ./SimplePi.sh 3000
Task# 1 Elapsed Time=35.2416
Task# 2 Elapsed Time=35.3669
tc@E310:~/Scripting/SimplePi$ ./SimplePi.sh 4000
Task# 1 Elapsed Time=67.9158
Task# 2 Elapsed Time=67.7191
tc@E310:~/Scripting/SimplePi$ ./SimplePi.sh 5000
Task# 1 Elapsed Time=119.6054
Task# 2 Elapsed Time=119.6509
tc@E310:~/Scripting/SimplePi$
Top shows both CPUs maxed out:
top - 22:29:38 up 22 days, 21:30, 16 users, load average: 1.15, 0.40, 0.14
Tasks: 478 total, 3 running, 431 sleeping, 0 stopped, 0 zombie
Cpu(s): 99.3%us, 0.7%sy, 0.0%ni, 0.0%id, 0.0%wa, 0.0%hi, 0.0%si, 0.0%st
Mem: 3101620k total, 641956k used, 2459664k free, 53128k buffers
Swap: 1023996k total, 0k used, 1023996k free, 226652k cached
PID USER PR NI VIRT RES SHR S %CPU %MEM TIME+ COMMAND
13681 tc 20 0 3072 1496 1260 R 98 0.0 0:27.67 bc
13683 tc 20 0 3072 1380 1148 R 98 0.0 0:27.66 bc
13661 tc 20 0 2476 1920 1516 R 1 0.1 0:00.56 top
You can run this under 32 and 64 bit. Depending on your system, if you specify too many digits, you may receive an
Out of memory for malloc error. I stopped at 5000 digits. The script rejects anything above 1000000 digits.