Threads-Charts
Threads-Charts is a portable program which saves a chart of the (real) CPU time needed to get the result of a lengthy floating point calculation, depending on the number of threads it uses. It takes five runs with 0 to 32 threads and saves the results (lines "YYYYYY real 0" to "YYYYYY real 4")
It has been tested (working ;) on the following OSes (alphabetically):
- AIX
- FreeBSD
- HP-UX
- Irix
- Linux
- NetBSD
- Solaris
- Tru64
The results look like this (this is the chart of a 16 CPU Itanium II running Linux):
How can you get such a graph?
See the documentation site for further explanations and the results site for more results. As a fast guide, do the following (as a normal user, no root privileges needed) in a shell or terminal:[THREADS-CHARTS_DIR is the directory the threads-charts-XX.tar.gz has been saved to and XX is the version number of Threads-Charts]
Term:
$ cd THREADS-CHARTS_DIR $ gunzip threads-charts-XX.tar.gz
$ tar xvf threads-charts-XX.tar
$ cd threads-charts-XX
$ make
Note: It can take half an hour to several hours, depending on the speed of your computer, but on a recent system it should take less than an hour.
What does it do exactly?
The makefile compiles thread_test.c to the binary executable threads_test, which is the programm that does the floating point calculations. This executable takes three commandline arguments, one of them is the number of threads it uses for the calculation.When the executable is compiled, the makefile starts the script make_output, which starts the executable with a various number of threads (0 to 32) and saves the time it takes to get the result, to a file, this procedure is repeated five times (the five lines in the graph). After that, the results are parsed and saved as a Gnuplot file and as a CSV file (with semicolons as the record separators).
The last step is to display the gnuplot file with gnuplot.
You can do each of the last two steps yourself, like so:
Term:
$ make output $ make display
"make display" displays the gnuplot file on your screen.
NOTE: the makefile tries to use the native compiler of each OS, if you don't have it, you can use "make linux_gcc" or "make irix_gcc" (just for irix) to compile the executable with gcc.