Free cookie consent management tool by TermsFeed Policy Generator

Changeset 16618 for branches


Ignore:
Timestamp:
02/21/19 12:57:52 (6 years ago)
Author:
hmaislin
Message:

#2929: Added C and Go benchmark logs, fixed some MultiTest problems

Location:
branches/2929_PrioritizedGrammarEnumeration/HeuristicLab.Algorithms.DataAnalysis.PGE/3.3
Files:
66 added
2 edited

Legend:

Unmodified
Added
Removed
  • branches/2929_PrioritizedGrammarEnumeration/HeuristicLab.Algorithms.DataAnalysis.PGE/3.3/MultiTest.ps1

    r16617 r16618  
    11[cmdletbinding()]
    22param(
    3     [int] $WaitToStep = 500,
     3    [int] $WaitToStep = 200,
    44    [int] $PeelCnt = 3,
    55    [int] $EvalCnt = 3,
    66    [ValidateSet("method1","method2", "method3")][string] $InitMethod = "method1",
    77    [ValidateSet("method1","method2", "method3")][string] $GrowMethod = "method1",
    8     [int] $MaxJobs = 10,
     8    [int] $MaxJobs = 3,
    99    [switch] $NoClear,
    1010    [switch] $UseExisting
     
    1212
    1313$BenchmarksPath = Resolve-Path -Relative "go-code\go-pge\data\benchmark"
     14
     15$env:GOGC="off"
     16$env:GODEBUG="cgocheck=0"
     17$env:CGO_ENABLED=1
    1418
    1519$BenchFiles = Get-ChildItem -Path $BenchmarksPath -File
     
    3135
    3236$ActiveJobs.Values | Wait-Job | Out-Null
    33 foreach($BenchName in $ActiveJobs.Keys) {
     37foreach($BenchName in $ActiveJobs.Keys | Sort-Object) {
    3438    $Job = $ActiveJobs[$BenchName]
    3539    $Res = $Job | Receive-Job
  • branches/2929_PrioritizedGrammarEnumeration/HeuristicLab.Algorithms.DataAnalysis.PGE/3.3/TestResults.ps1

    r16617 r16618  
    11[cmdletbinding()]
    22param(
    3     [int] $WaitToStep = 30,
    4     [string] $BenchName = "Pagie_1",
     3    [int] $WaitToStep = 200,
     4    [parameter(Position=0)][string] $BenchName = "Pagie_1",
    55    [int] $PeelCnt = 3,
    66    [int] $EvalCnt = 3,
     
    88    [ValidateSet("method1","method2", "method3")][string] $GrowMethod = "method1",
    99    [switch] $NoClear,
    10     [switch] $UseExisting
     10    [switch] $UseExisting,
     11    [int]$MaxSecondsTimeout = 1500
    1112)
    1213
    1314$GenerateNew = -not $UseExisting.IsPresent
    14 $MaxSecondsTimeout = 90
    1515
    1616$LogFolder = Join-Path -Path $(Resolve-Path $PSScriptRoot) -ChildPath "tmplog"
    1717
    18 $CLog = Join-Path -Path $LogFolder -ChildPath "CGen_$($BenchName).log"
    19 $GoLog = Join-Path -Path $LogFolder -ChildPath "GoOut_$($BenchName).log"
    20 
    21 $CLogError = Join-Path -Path $LogFolder -ChildPath "CGen_$($BenchName).err"
    22 $GoLogError = Join-Path -Path $LogFolder -ChildPath "GoOut_$($BenchName).err"
     18$CLog = Join-Path -Path $LogFolder -ChildPath "$($BenchName)_CGen.log"
     19$GoLog = Join-Path -Path $LogFolder -ChildPath "$($BenchName)_GoOut.log"
     20
     21$CLogError = Join-Path -Path $LogFolder -ChildPath "$($BenchName)_CGen.err"
     22$GoLogError = Join-Path -Path $LogFolder -ChildPath "$($BenchName)_GoOut.err"
    2323
    2424$CExecutable = Join-Path -Path $(Resolve-Path $PSScriptRoot) -ChildPath 'testmulti.exe'
     
    4747}
    4848
    49 if($GenerateNew) {
    50     if(-not $(Test-Path $LogFolder -Type Container)) {
    51         New-Item -Path $LogFolder -ItemType Directory -Force
    52     }
    53 
    54   if(Test-Path $GoLog -Type Leaf) {
    55     Remove-Item -Path $GoLog
    56   }
     49$env:GOGC="off"
     50$env:GODEBUG="cgocheck=0"
     51$env:CGO_ENABLED=1
     52
     53if(-not $(Test-Path $LogFolder -Type Container)) {
     54   New-Item -Path $LogFolder -ItemType Directory -Force
     55}
     56
     57if($GenerateNew -or -not $(Test-Path -Path $CLog)) {
    5758  if(Test-Path $CLog -Type Leaf) {
    5859    Remove-Item -Path $CLog
    5960    }
    60     if(Test-Path $GoLogError -Type Leaf) {
    61         Remove-Item -Path $GoLogError
    62     }
    63     if(Test-Path $CLogError -Type Leaf) {
    64         Remove-Item -Path $CLogError
    65     }
    66  
     61   if(Test-Path $CLogError -Type Leaf) {
     62      Remove-Item -Path $CLogError
     63   }
    6764    $CGenProc = Start-Process -FilePath $CExecutable -ArgumentList "$BenchName -evals=$($EvalCnt) -peel=$($PeelCnt) -iter=$($WaitToStep) -init=$($InitMethod) -grow=$($GrowMethod)" -RedirectStandardOutput $CLog -RedirectStandardError $CLogError -WorkingDirectory $PSScriptRoot -PassThru
    6865    $StepReached = $false
     
    7471            $StepReached = $true
    7572        }
    76         if($LastLogLength -eq $CGenCont.Length) {
     73        if(-not $StepReached -and $LastLogLength -eq $CGenCont.Length) {
    7774            $Timeout--
    7875        } else {
     
    8481            exit 2
    8582        }
     83        $LastLogLength = $CGenCont.Length
    8684        Start-Sleep -Seconds 1
    87         $LastLogLength = $CGenCont.Length
    88     }
    89 
     85    }
    9086    $CGenProc  | Stop-Process -ErrorAction SilentlyContinue
    91 
    92   $env:GOGC="off"
    93   $env:GODEBUG="cgocheck=0"
    94   $env:CGO_ENABLED=1
     87}
     88 
     89if($GenerateNew -or -not $(Test-Path -Path $GoLog)) {
     90   if(Test-Path $GoLogError -Type Leaf) {
     91      Remove-Item -Path $GoLogError
     92   }
     93   if(Test-Path $GoLog -Type Leaf) {
     94    Remove-Item -Path $GoLog
     95  }
    9596    $GoGenProc = Start-Process -FilePath $GoExecutable -ArgumentList "-pcfg=prob/bench/$($BenchName).cfg -evals=$($EvalCnt) -peel=$($PeelCnt) -iter=$($WaitToStep) -init=$($InitMethod) -grow=$($GrowMethod)"  -RedirectStandardOutput $GoLog -RedirectStandardError $GoLogError -WorkingDirectory $(Split-Path -Path $GoExecutable -Parent) -PassThru
    9697    $StepReached = $false
     
    107108            $Timeout = $MaxSecondsTimeout
    108109        }
    109         if($Timeout -le 0) {
     110        if(-not $StepReached -and $Timeout -le 0) {
    110111            $GoGenProc | Stop-Process -ErrorAction SilentlyContinue -Force
    111112            Write-Error "Go-data generation timed out!"
    112113            exit 3
    113114        }
     115        $LastLogLength = $CGenCont.Length
    114116        Start-Sleep -Seconds 1
    115         $LastLogLength = $CGenCont.Length
    116117    }
    117118    $GoGenProc | Stop-Process -ErrorAction SilentlyContinue
Note: See TracChangeset for help on using the changeset viewer.