tutulino / Megaminer

Multipool and multialgo windows miner
GNU General Public License v3.0
78 stars 69 forks source link

Excavator Benchmark Problem.... latest version 28/02/18 #340

Open reset77 opened 6 years ago

reset77 commented 6 years ago

Thanks Tutulino

just small problem here

Excavator never stops benchmark, when new interval starts its just the same loop of excavator always benchamrk... im not sure but i was able to make it work closing MM when new interval is starting before it starts excavator again, but im not sure whats the problem

Thanks!!

tutulino commented 6 years ago

have you speed in miner window? have you speed in active miners section?

reset77 commented 6 years ago

Hi Tutulino

Yeah i have speed in miner window and active miners section, i know powerlimits benchmarks, but this problem was like a loop, excavator will keep benchmarking the same algo with the same powerlimit, its like its not able to save the stats file....

i was able to fix it by closing MM just when new interval is starting, when is loading pools information, you close MM and when you open MM again benchmark will continue to next algo or power limit, its like when you close MM its able to save stats file and it works...

i did this several times till benchmarks were done, closing MM after every benchmark when new interval is starting... and its now working really good

Thanks!!

tutulino commented 6 years ago

See if you have hashrate file for that combinations in statsfolder. If afirmative, check content, you must have speed records with "BenchmarkintervalTime" greater to 0.66 * @@Benchmarktime config.txt variable.

Any combination without that are marked as pending benchmarks.

baktery commented 6 years ago

Hey Tutulino, first of all, very good work with Megaminer!

About benchmark not finishing, I had similar problems. Not only benchmarking but also mining normally.

After some debugging I saw that the problem was that it was waiting for a key. There's a bug in Function Timed_ReadKb.

Here's an example of fixed version of that function:

Function Timed_ReadKb{   
    param(
        [Parameter(Mandatory = $true)]
        [int]$secondsToWait,
        [Parameter(Mandatory = $true)]
        [array]$ValidKeys

    )

    $Loopstart=get-date 
    $KeyPressed=$null    

    while ((NEW-TIMESPAN $Loopstart (get-date)).Seconds -le $SecondsToWait -and $ValidKeys -notcontains $KeyPressed){
        if ($host.ui.RawUi.KeyAvailable)
        {
            $key = $host.UI.RawUI.ReadKey("NoEcho,IncludeKeyUp,IncludeKeyDown")
            if ( $Key.KeyDown)
            {
                $KeyPressed=$Key.character                    
            }                    

            while ($Host.UI.RawUI.KeyAvailable)  {$host.ui.RawUi.Flushinputbuffer()} #keyb buffer flush            
        }

        start-sleep -m 30
   }  

   $KeyPressed
}

The problem was that if you press down a key and switch to another window (alt+tab is an example to reproduce it) a key up event is never received and it produces that host.UI.RawUI.ReadKey is waiting forever (until you press a key) because it was only waiting for keyup events. If you return to the window with the mouse you will see that MegaMiner does not respond until you press a key.