Changeset 16618 for branches/2929_PrioritizedGrammarEnumeration
- Timestamp:
- 02/21/19 12:57:52 (6 years ago)
- 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 1 1 [cmdletbinding()] 2 2 param( 3 [int] $WaitToStep = 500,3 [int] $WaitToStep = 200, 4 4 [int] $PeelCnt = 3, 5 5 [int] $EvalCnt = 3, 6 6 [ValidateSet("method1","method2", "method3")][string] $InitMethod = "method1", 7 7 [ValidateSet("method1","method2", "method3")][string] $GrowMethod = "method1", 8 [int] $MaxJobs = 10,8 [int] $MaxJobs = 3, 9 9 [switch] $NoClear, 10 10 [switch] $UseExisting … … 12 12 13 13 $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 14 18 15 19 $BenchFiles = Get-ChildItem -Path $BenchmarksPath -File … … 31 35 32 36 $ActiveJobs.Values | Wait-Job | Out-Null 33 foreach($BenchName in $ActiveJobs.Keys ) {37 foreach($BenchName in $ActiveJobs.Keys | Sort-Object) { 34 38 $Job = $ActiveJobs[$BenchName] 35 39 $Res = $Job | Receive-Job -
branches/2929_PrioritizedGrammarEnumeration/HeuristicLab.Algorithms.DataAnalysis.PGE/3.3/TestResults.ps1
r16617 r16618 1 1 [cmdletbinding()] 2 2 param( 3 [int] $WaitToStep = 30,4 [ string] $BenchName = "Pagie_1",3 [int] $WaitToStep = 200, 4 [parameter(Position=0)][string] $BenchName = "Pagie_1", 5 5 [int] $PeelCnt = 3, 6 6 [int] $EvalCnt = 3, … … 8 8 [ValidateSet("method1","method2", "method3")][string] $GrowMethod = "method1", 9 9 [switch] $NoClear, 10 [switch] $UseExisting 10 [switch] $UseExisting, 11 [int]$MaxSecondsTimeout = 1500 11 12 ) 12 13 13 14 $GenerateNew = -not $UseExisting.IsPresent 14 $MaxSecondsTimeout = 9015 15 16 16 $LogFolder = Join-Path -Path $(Resolve-Path $PSScriptRoot) -ChildPath "tmplog" 17 17 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" 23 23 24 24 $CExecutable = Join-Path -Path $(Resolve-Path $PSScriptRoot) -ChildPath 'testmulti.exe' … … 47 47 } 48 48 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 53 if(-not $(Test-Path $LogFolder -Type Container)) { 54 New-Item -Path $LogFolder -ItemType Directory -Force 55 } 56 57 if($GenerateNew -or -not $(Test-Path -Path $CLog)) { 57 58 if(Test-Path $CLog -Type Leaf) { 58 59 Remove-Item -Path $CLog 59 60 } 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 } 67 64 $CGenProc = Start-Process -FilePath $CExecutable -ArgumentList "$BenchName -evals=$($EvalCnt) -peel=$($PeelCnt) -iter=$($WaitToStep) -init=$($InitMethod) -grow=$($GrowMethod)" -RedirectStandardOutput $CLog -RedirectStandardError $CLogError -WorkingDirectory $PSScriptRoot -PassThru 68 65 $StepReached = $false … … 74 71 $StepReached = $true 75 72 } 76 if( $LastLogLength -eq $CGenCont.Length) {73 if(-not $StepReached -and $LastLogLength -eq $CGenCont.Length) { 77 74 $Timeout-- 78 75 } else { … … 84 81 exit 2 85 82 } 83 $LastLogLength = $CGenCont.Length 86 84 Start-Sleep -Seconds 1 87 $LastLogLength = $CGenCont.Length 88 } 89 85 } 90 86 $CGenProc | Stop-Process -ErrorAction SilentlyContinue 91 92 $env:GOGC="off" 93 $env:GODEBUG="cgocheck=0" 94 $env:CGO_ENABLED=1 87 } 88 89 if($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 } 95 96 $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 96 97 $StepReached = $false … … 107 108 $Timeout = $MaxSecondsTimeout 108 109 } 109 if( $Timeout -le 0) {110 if(-not $StepReached -and $Timeout -le 0) { 110 111 $GoGenProc | Stop-Process -ErrorAction SilentlyContinue -Force 111 112 Write-Error "Go-data generation timed out!" 112 113 exit 3 113 114 } 115 $LastLogLength = $CGenCont.Length 114 116 Start-Sleep -Seconds 1 115 $LastLogLength = $CGenCont.Length116 117 } 117 118 $GoGenProc | Stop-Process -ErrorAction SilentlyContinue
Note: See TracChangeset
for help on using the changeset viewer.