Changeset 5179 for branches/HeuristicLab.Hive-3.3/sources/HeuristicLab.Hive/HeuristicLab.Hive.ExperimentManager/3.3
- Timestamp:
- 12/29/10 00:52:06 (14 years ago)
- Location:
- branches/HeuristicLab.Hive-3.3/sources/HeuristicLab.Hive/HeuristicLab.Hive.ExperimentManager/3.3
- Files:
-
- 2 added
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/HeuristicLab.Hive-3.3/sources/HeuristicLab.Hive/HeuristicLab.Hive.ExperimentManager/3.3/HeuristicLab.Hive.ExperimentManager-3.3.csproj
r5093 r5179 11 11 <RootNamespace>HeuristicLab.Hive.ExperimentManager</RootNamespace> 12 12 <AssemblyName>HeuristicLab.Hive.ExperimentManager-3.3</AssemblyName> 13 <TargetFrameworkVersion>v 3.5</TargetFrameworkVersion>13 <TargetFrameworkVersion>v4.0</TargetFrameworkVersion> 14 14 <TargetFrameworkProfile> 15 15 </TargetFrameworkProfile> … … 81 81 <ItemGroup> 82 82 <Reference Include="HeuristicLab.Clients.Common-3.3, Version=3.3.0.0, Culture=neutral, PublicKeyToken=ba48961d6f65dcec, processorArchitecture=MSIL"> 83 <HintPath> ..\..\..\..\..\..\..\..\Program Files\HeuristicLab 3.3\HeuristicLab.Clients.Common-3.3.dll</HintPath>83 <HintPath>C:\Program Files\HeuristicLab 3.3\HeuristicLab.Clients.Common-3.3.dll</HintPath> 84 84 </Reference> 85 85 <Reference Include="HeuristicLab.Collections-3.3"> … … 121 121 <SubType>Designer</SubType> 122 122 </None> 123 <None Include="christoph - app.config"> 124 <SubType>Designer</SubType> 125 </None> 123 126 <None Include="f005pc.hagenberg.fhooe.at - app.config"> 124 127 <SubType>Designer</SubType> … … 126 129 <None Include="HeuristicLabHiveExperimentManagerPlugin.cs.frame" /> 127 130 <Compile Include="Exceptions\AddJobToHiveException.cs" /> 131 <Compile Include="HiveJobDownloader.cs" /> 128 132 <Compile Include="HiveExperiment.cs" /> 129 133 <Compile Include="HiveJob.cs" /> -
branches/HeuristicLab.Hive-3.3/sources/HeuristicLab.Hive/HeuristicLab.Hive.ExperimentManager/3.3/HiveExperiment.cs
r5171 r5179 534 534 IsProgressing = true; 535 535 int totalJobCount = 0; 536 int jobCount = 0;537 536 JobResultList allResults; 538 IDictionary<Guid, SerializedJob> allSerializedJobs = new Dictionary<Guid, SerializedJob>(); 537 539 538 progress.Status = "Connecting to Server..."; 540 using (Disposable<IClientFacade> service = ServiceLocator.Instance.StreamedClientFacadePool.GetService()) { 541 // fetch all JobDto objects to create the full tree of tree of HiveJob objects 539 using (Disposable<IClientFacade> service = ServiceLocator.Instance.ClientFacadePool.GetService()) { 542 540 progress.Status = "Downloading list of jobs..."; 543 541 allResults = service.Obj.GetChildJobResults(rootJobId.Value, true, true).Obj; 544 542 totalJobCount = allResults.Count; 545 546 // download them first 547 foreach (JobResult jobResult in allResults) { 548 jobCount++; 549 progress.Status = string.Format("Downloading {0} of {1} jobs...", jobCount, totalJobCount); 550 allSerializedJobs.Add(jobResult.Id, service.Obj.GetLastSerializedResult(jobResult.Id).Obj); 551 progress.ProgressValue = (double)jobCount / totalJobCount; 552 } 553 } 554 555 jobCount = 1; 556 progress.Status = string.Format("Deserializing {0} of {1} jobs... ({2} kb)", jobCount, totalJobCount, allSerializedJobs[this.rootJobId.Value].SerializedJobData.Count() / 1024); 557 this.HiveJob = new HiveJob(allSerializedJobs[this.rootJobId.Value], false); 558 allSerializedJobs.Remove(this.rootJobId.Value); // reduce memory footprint 559 progress.ProgressValue = (double)jobCount / totalJobCount; 543 } 544 545 HiveJobDownloader downloader = new HiveJobDownloader(allResults.Select(x => x.Id)); 546 downloader.StartAsync(); 547 548 while (!downloader.IsFinished) { 549 progress.ProgressValue = downloader.FinishedCount / (double)totalJobCount; 550 progress.Status = string.Format("Downloading/deserializing jobs... ({0}/{1} finished)", downloader.FinishedCount, totalJobCount); 551 Thread.Sleep(500); 552 } 553 IDictionary<Guid, HiveJob> allHiveJobs = downloader.Results; 554 555 this.HiveJob = allHiveJobs[this.rootJobId.Value]; 560 556 561 557 if (this.HiveJob.JobDto.DateFinished.HasValue) { … … 571 567 } 572 568 573 // build child-job tree 574 LoadChildResults(this.HiveJob, allResults, allSerializedJobs, progress, totalJobCount, ref jobCount); 569 BuildHiveJobTree(this.HiveJob, allResults, allHiveJobs); 575 570 StartResultPolling(); 576 571 } … … 583 578 } 584 579 585 private void LoadChildResults(HiveJob parentHiveJob, JobResultList allResults, IDictionary<Guid, SerializedJob> allSerializedJobs, IProgress progress, int totalJobCount, ref int jobCount) {580 private void BuildHiveJobTree(HiveJob parentHiveJob, JobResultList allResults, IDictionary<Guid, HiveJob> allHiveJobs) { 586 581 IEnumerable<JobResult> childResults = from result in allResults 587 582 where result.ParentJobId.HasValue && result.ParentJobId.Value == parentHiveJob.JobDto.Id … … 589 584 select result; 590 585 foreach (JobResult jobResult in childResults) { 591 jobCount++; 592 progress.Status = string.Format("Deserializing {0} of {1} jobs ({2} kb)...", jobCount, totalJobCount, allSerializedJobs[jobResult.Id].SerializedJobData.Count() / 1024); 593 OptimizerJob optimizerJob = null; 594 try { 595 optimizerJob = SerializedJob.Deserialize<OptimizerJob>(allSerializedJobs[jobResult.Id].SerializedJobData); 596 } 597 catch { 598 optimizerJob = null; 599 } 600 progress.ProgressValue = (double)jobCount / totalJobCount; 601 HiveJob childHiveJob = new HiveJob(optimizerJob, false); 586 HiveJob childHiveJob = allHiveJobs[jobResult.Id]; 602 587 parentHiveJob.AddChildHiveJob(childHiveJob); 603 childHiveJob.JobDto = allSerializedJobs[jobResult.Id].JobInfo; 604 allSerializedJobs.Remove(jobResult.Id); // reduce memory footprint 605 if (jobCount % 10 == 0) GC.Collect(); // this is needed or otherwise HL takes over the system when the number of jobs is high 606 LoadChildResults(childHiveJob, allResults, allSerializedJobs, progress, totalJobCount, ref jobCount); 588 BuildHiveJobTree(childHiveJob, allResults, allHiveJobs); 607 589 } 608 590 } -
branches/HeuristicLab.Hive-3.3/sources/HeuristicLab.Hive/HeuristicLab.Hive.ExperimentManager/3.3/Jobs/OptimizerJob.cs
r5153 r5179 108 108 return new OptimizerJob(this, cloner); 109 109 } 110 public object Clone() {111 return Clone(new Cloner());112 }113 110 [StorableHook(HookType.AfterDeserialization)] 114 111 protected virtual void AfterDeserialization() { … … 256 253 257 254 protected virtual void optimizer_Stopped(object sender, EventArgs e) { 255 optimizer.Prepare(); // reduce memory consumption 258 256 OnJobStopped(); 259 257 } -
branches/HeuristicLab.Hive-3.3/sources/HeuristicLab.Hive/HeuristicLab.Hive.ExperimentManager/3.3/Properties/AssemblyInfo.cs.frame
r5054 r5179 36 36 [assembly: AssemblyTrademark("")] 37 37 [assembly: AssemblyCulture("")] 38 [assembly: AllowPartiallyTrustedCallers]39 38 40 39 // Setting ComVisible to false makes the types in this assembly not visible -
branches/HeuristicLab.Hive-3.3/sources/HeuristicLab.Hive/HeuristicLab.Hive.ExperimentManager/3.3/app.config
r5171 r5179 29 29 </bindings> 30 30 <client> 31 <endpoint address="net.tcp:// services.heuristiclab.com:8000/Hive-3.3/ClientService.svc" binding="netTcpBinding" bindingConfiguration="ClientTcpStreamedEndpoint" contract="HeuristicLab.Hive.Contracts.Interfaces.IClientFacade" name="ClientTcpStreamedEndpoint">31 <endpoint address="net.tcp://christoph:9001/Hive-3.3/ClientService.svc" binding="netTcpBinding" bindingConfiguration="ClientTcpStreamedEndpoint" contract="HeuristicLab.Hive.Contracts.Interfaces.IClientFacade" name="ClientTcpStreamedEndpoint"> 32 32 <identity> 33 <dns value=" services.heuristiclab.com"/>33 <dns value="localhost"/> 34 34 </identity> 35 35 </endpoint> 36 <endpoint address="http:// services.heuristiclab.com/Hive-3.3/ClientService.svc" binding="wsHttpBinding" bindingConfiguration="ClientHttpEndpoint" contract="HeuristicLab.Hive.Contracts.Interfaces.IClientFacade" name="ClientHttpEndpoint">36 <endpoint address="http://christoph/Hive-3.3/ClientService.svc" binding="wsHttpBinding" bindingConfiguration="ClientHttpEndpoint" contract="HeuristicLab.Hive.Contracts.Interfaces.IClientFacade" name="ClientHttpEndpoint"> 37 37 <identity> 38 <certificate encodedValue="AwAAAAEAAAAUAAAA wK1+2oAmcy/mI2P2QjyiJRh0y60gAAAAAQAAACoCAAAwggImMIIBj6ADAgECAhAIkseQ2EEhgU720qJA61gqMA0GCSqGSIb3DQEBBAUAMCQxIjAgBgNVBAMTGXNlcnZpY2VzLmhldXJpc3RpY2xhYi5jb20wHhcNMTAwNTExMTExNDAyWhcNMzkxMjMxMjM1OTU5WjAkMSIwIAYDVQQDExlzZXJ2aWNlcy5oZXVyaXN0aWNsYWIuY29tMIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQCq26Bwmwc7k+4W30qLQ2j+FInEL5BuH6opDY6CSlrtt3xQS/anrhvpbf3QghLDVINzcHkzbPmm/SguG4F85QLB6xO+tJaOvRo0iEK5g3c307vMIru7FJwk/OhplEQ5J1hbDgL3zOJlrWlgtqRVxCtVdF3XroI9BctOt1NkeKv9ewIDAQABo1kwVzBVBgNVHQEETjBMgBCjbgdYd4j5JgUuJ1Wo/GxroSYwJDEiMCAGA1UEAxMZc2VydmljZXMuaGV1cmlzdGljbGFiLmNvbYIQCJLHkNhBIYFO9tKiQOtYKjANBgkqhkiG9w0BAQQFAAOBgQAb/2xk2uQad68shSPl/uixWgvFI8WkxOTBopOLaLtDxwCeZ3mWVHdV9VnixHtThubnEBXAhYOCQSIXWtQuXFWO+gH3YyjTRJY5kTmXyuvBRTn3/so5SrQ7Rdlm9hf6E5YVX3tCjAy7ybUyaDUkQfmH5vmvgvpMzRfsJ1qhnUpJiQ=="/>38 <certificate encodedValue="AwAAAAEAAAAUAAAAozaKcSPdw1Cdd57hw9mr3eCjxTIgAAAAAQAAAPIBAAAwggHuMIIBW6ADAgECAhBhrVLVbjrtvUe4zWuGbVeuMAkGBSsOAwIdBQAwFDESMBAGA1UEAxMJbG9jYWxob3N0MB4XDTEwMTAxMjA2NTYyNloXDTM5MTIzMTIzNTk1OVowFDESMBAGA1UEAxMJbG9jYWxob3N0MIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQDFM6bQUgvCnsnBO9TZnOrC6x1riE2pXUzU6H38GYot674WNfir82fMh9+ojWSY/CiMzExcNWFtC3i8BG7giLYVwSanuwQ8QyRFYq3g5UMqdlm4/aof/4QMmS+SuRDsa8F4lbvdS9zBVFiyyUNYzlzO/rY08DrkCgx4X2IQGOvixwIDAQABo0kwRzBFBgNVHQEEPjA8gBCjMn9uvzNhU2c//E3RSYmUoRYwFDESMBAGA1UEAxMJbG9jYWxob3N0ghBhrVLVbjrtvUe4zWuGbVeuMAkGBSsOAwIdBQADgYEADIf8as2VBfZEpwb/GuVifvPTR0Ud+dTCwTjBdMymqjNR5NTSi408DifssSTBVGIi7xkWbQDlQQHOZmVqVFoqfNbGrtm9w1MSK24HAEMXr0WFBltvldGKCvtYnZqf377qU5gq7IBXcJZi87bZ2l1M3icr6RJo4fIbnZOa5M430aw="/> 39 39 </identity> 40 40 </endpoint> 41 41 </client> 42 42 43 43 </system.serviceModel> 44 44 <startup><supportedRuntime version="v2.0.50727"/></startup></configuration>
Note: See TracChangeset
for help on using the changeset viewer.