Guidance
指路人
g.yi.org
Guidance Forums / wxWidgets (wxWindows) in C++ / Needed help in CPU test program..

Register 
注册
Search 搜索
首页 
Home Home
Software
Upload

  
Forum List • Thread List • Reply • Refresh • New Topic • Search • Previous • Next First 1 Last
Message1. Needed help in CPU test program..
#2871
Posted by: 2003-11-09 21:03:43
Hi probably you will start to hate me now, but it is time to release all my cards.. I am writing a benchmark program and yes my previous problem was part of it..
The benchmark program will include tests for cpu ram and hdd.. with the latest one being at not my responsobility..
The memory benchmark as it seems is working quite normal..
However I have some problems with CPU benchmark..
At first it uses self created alghorith that factors integers to test cpu.. test is divided n two parts ALU and FPU.. the first test uses simpler form of this alghorithm that uses only(or mostly) integer operations to do the job.. th second test uses the same alghorith which is optimised so it uses a lot of sqrt operations alhtough it styores the results in integers..
The problem is:

- both CPU behcmaks reached spesific margin which was hardly crossed by even very powerfull cpu`s.. thus the results vere very close once they reached the spesific margin..
I partly solved this by removing some obvios erors in both tests and moving all variables to cpu registers..  after this I selected the highest optimisation available in compiler and compiled aplication..
the results showed that..:

1.  ALU test hasn`t that margin anymore.. however it doesn`t measure the speed of the cpu bet the speed of FSB.. thus it is limited by the systems FSB and is very FSB hungry..
It would be a good FSB test but this wasn`t qute whaat I wanted..
My version is that this problem is caused by the fact that program data are located on memory enad cpu need to acsees it.. that is why it is so FSB hungry.. the solution could be to copy all necesarry data including variables to procesor cache(although i think all variables already should be in cpu registers).. does someone knows how this can be done?
yes it looks like low level programming, but probablu there is some way to do that.. the procesor testing procedure is very small so why procesoor allways looks for it in memory..
may be the errror is that I pot this procedure in loop so cpu allways needs to get new data from memory..
can anybody help here..
2nd problem is that FPU test still has some quite visible margin..
I do not know whatputs these brakes on even very powerfull cpu`s

Dawis
P.S.
I would be gratefull for any advice
Message2. Re: Needed help in CPU test program..
#2879
Posted by: upCASE 2003-11-11 18:25:11
Hi!
Have you had a look on how other benchmarks do these test? There are some available in source code maybe have a look.

BTW: My CPU test classes will take a bit longer to be finished. I need someone with an Intel CPU to run some test for me.

upcase
upCASE
-----------------------------------
If it was hard to write, it should be hard to read!- Do. Or do not. There is no try!
Message3. Re: Needed help in CPU test program..
#2880
Posted by: 2003-11-11 21:52:00
Hi,

   if you want you can give the code you want to test in my hands..
If it is better than the one you gave me before..
I will include it in my program and give it to testers.. the program generetes output files so you will be able to see ion what cpus your funtion runs coreclty and on what is genereates some problems..

Also I must report that one of the testers of my program reported that the clock oh his cpu was detected incorrectly.. His cpu was AMD athlon overlocked to nice 2.5Ghz but program showed something about 3.4Ghz which is something like imposible:)..

If you want i can send you output files.. that covers already your existing function implemented in my program..
Only I must aquiere infoprmationfom users what cpu`s they were using, because on those cpu`s your funtion failed to produce correct results in some cases it didn`t returned cpu name string..
so I will ask it to testers if it is needed..

so inform me when you decide what you and how you will do.. if you are still interested of course:)

Dawis
Message4. Re: Needed help in CPU test program..
#2881
Posted by: 2003-11-11 22:31:20
about that cpu test problem.. it turned out that it is probably not conectet with FSB bottlencek what preses AMD cpus behing Intel ones.. The reason could be that Intel cpu`s some of the ALU instructions can execute at double frequency.. probably I my test touches exacly these instructions..
Message5. Re: Needed help in CPU test program..
#2882
Posted by: upCASE 2003-11-11 23:15:50
Hi Dawis!
Yep, indeed you where the first one I thought of to test my new code :)
I can't promise anything. I hope that it'll work better and get more accurate infos. I changed the methods and interface a bit, but that won't be a big problem I guess.

Yes, I'm aware that the clock speed isn't dectected correctly on some systems. That's what's currently keeping me from releasing a new version. I'll have to rewrite my code. I experienced this problem on my system (Athlon 800), too. The speed it gave me ranged from 795 MHz to 801 MHz. Not bad, but not very accurate... I guessed that on faster systems the range would be wider, like you described it.

upcase
upCASE
-----------------------------------
If it was hard to write, it should be hard to read!- Do. Or do not. There is no try!
Message6. Re: Needed help in CPU test program..
#2883
Posted by: 2003-11-11 23:40:42
So when you have version you would like to test just give it to me i will include it in new release on my program and people will test it so you will see the results too..
You may not worry about interface for me as I for my self need only char arrays returned by the functions(my program uses them in win interface)..
currently observed bugs:
for P III
cpu name char array was empty
for some older cpu runing at about 400-500Mhz:
cpu name string returned char array of undisplayable chars that windows displayed as series of recentagles(at least in final form of html result file)..
and for Athlon XP OC @2.5Ghz
it shoved the clock of 3.4Ghz which is obviosly a problem to virry about..
I don`t think it is becaue of your described range problem..
If on 800Mhz CPU it is about 10Mhz then on 2.5Ghz it could be about maximum 50Mhz which isn`t of course very good but not too bad..
but here we speak about almost 1Ghz:) ..
by the way it did returned corect aprox Mhz of 3Ghz P4
Dawis
Message7. Re: Needed help in CPU test program..
#2896
Posted by: upCASE 2003-11-16 20:07:46
Hi!
Sorry that I didn't reply for a long time, but I'm currently busy. So, it may take a while to finish my work on that.

But I did some updates and I think that I'm on the right way...
"for P III
cpu name char array was empty
for some older cpu runing at about 400-500Mhz:
cpu name string returned char array of undisplayable chars that windows displayed as series of recentagles(at least in final form of html result file).."
This is quite correct. I have an old Pentium 100 right now for testing and it seems like on some systems the CPU name just isn't there :)
That's why you get these results. I found another way, but it is a bit uglier, because it uses hard coded strings. Anyway, if there is no cpu name the prog will put "Unknown" and I implemented the hardcoded stuff as a model string. For my Pentium 100 this gives

MHz approx.:    102.768
Vendor:        GenuineIntel
Serial:         0
CPU Name:       Unknown

Standard Family: 5
Standard Model: 2
Model String: Intel Pentium - 75-200
Stepping: 5

I think one can work with this info... The features are going to be implemented in a different way too. I think of returning a char array that holds the strings of the different features seperated by a : or ;...

The MHz problem seems to be solved (maybe, have to check this on a fast system).

upcase
upCASE
-----------------------------------
If it was hard to write, it should be hard to read!- Do. Or do not. There is no try!
Message8. Re: Needed help in CPU test program..
#2898
Posted by: 2003-11-16 23:16:25
Hi..
The CPU name isn`t so important for older cpu`s as you can allways gues it form model..
Howver it would be really nice if your code returned more or less precisely calculated Mhz and processor multiplier (so we could calculate FSB)...
I ask this because my program as a benchmark needs uch info..
I think you can get multiplier form model or from some data in bios..
I really can`t suggest you how to do this, because I don`t know anything in ASM.. I can only wish you good luck..
May be you can retrieve this information form some module in OS liek directX or registry, but that wount work even on all win OS..

Dawis
Forum List • Thread List • Reply • Refresh • New Topic • Search • Previous • Next First 1 Last
掌柜推荐
 
 
 
 
 
 
 
 
 
 
 
 
© Tue 2024-4-16  Guidance Laboratory Inc.
Email:webmaster1g.yi.org Hits:0