- Timestamp:
- 02/17/11 14:47:56 (14 years ago)
- Location:
- branches/HeuristicLab.Hive-3.4/sources/HeuristicLab.Clients.Hive/3.4/ExperimentManager
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/HeuristicLab.Hive-3.4/sources/HeuristicLab.Clients.Hive/3.4/ExperimentManager/HiveExperimentClient.cs
r5458 r5511 24 24 using System.Linq; 25 25 using System.Threading; 26 using HeuristicLab.Clients.Common; 27 using HeuristicLab.Clients.Hive.Jobs; 26 28 using HeuristicLab.Common; 27 29 using HeuristicLab.Core; 30 using HeuristicLab.Optimization; 31 using HeuristicLab.Services.Hive.Common; 32 using HeuristicLab.Services.Hive.Common.DataTransfer; 33 using HeuristicLab.Services.Hive.Common.ServiceContracts; 28 34 using HeuristicLab.Tracing; 29 using HeuristicLab.Services.Hive.Common;30 using HeuristicLab.Services.Hive.Common.ServiceContracts;31 using HeuristicLab.Services.Hive.Common.DataTransfer;32 using HeuristicLab.Clients.Hive.Jobs;33 using HeuristicLab.Clients.Common;34 using HeuristicLab.Optimization;35 35 36 36 namespace HeuristicLab.Clients.Hive { 37 using System.Configuration; 38 using System.IO; 39 using HeuristicLab.PluginInfrastructure; 37 40 using DT = HeuristicLab.Services.Hive.Common.DataTransfer; 38 using HeuristicLab.PluginInfrastructure;39 using System.IO;40 using System.Configuration;41 using System.Reflection;42 using HeuristicLab.PluginInfrastructure.Manager;43 41 44 42 /// <summary> … … 301 299 private static Plugin UploadConfigurationFile(IHiveService service) { 302 300 string exeFilePath = Path.Combine(AppDomain.CurrentDomain.BaseDirectory, "HeuristicLab 3.3.exe"); 303 string configFileName = ConfigurationManager.OpenExeConfiguration(exeFilePath).FilePath;301 string configFileName = Path.GetFileName(ConfigurationManager.OpenExeConfiguration(exeFilePath).FilePath); 304 302 305 303 Plugin configPlugin = new Plugin() { … … 331 329 if (hiveJob.OptimizerJob.ComputeInParallel && 332 330 (hiveJob.OptimizerJob.Optimizer is Optimization.Experiment || hiveJob.OptimizerJob.Optimizer is Optimization.BatchRun)) { 333 hiveJob.Job. JobState = JobState.WaitingForChildJobs;331 hiveJob.Job.SetState(JobState.FinishOnChildJobsFinished); 334 332 hiveJob.OptimizerJob.CollectChildJobs = false; // don't collect child-jobs on slaves 335 333 jobData = hiveJob.GetAsJobData(true, out plugins); … … 522 520 if (hj != null) { 523 521 hj.UpdateFromLightweightJob(lightweightJob); 524 if ((hj.Job. JobState == JobState.Aborted ||525 hj.Job. JobState == JobState.Failed ||526 hj.Job. JobState == JobState.Finished) &&522 if ((hj.Job.State == JobState.Aborted || 523 hj.Job.State == JobState.Failed || 524 hj.Job.State == JobState.Finished) && 527 525 !hj.IsFinishedOptimizerDownloaded) { 528 526 LogMessage(hj.Job.Id, "Downloading optimizer for job"); -
branches/HeuristicLab.Hive-3.4/sources/HeuristicLab.Clients.Hive/3.4/ExperimentManager/HiveJobClient.cs
r5404 r5511 23 23 using System.Collections.Generic; 24 24 using System.Drawing; 25 using System.IO;26 25 using System.Linq; 27 26 using HeuristicLab.Clients.Hive.Jobs; … … 32 31 using HeuristicLab.PluginInfrastructure; 33 32 using HeuristicLab.Services.Hive.Common.DataTransfer; 34 using HeuristicLab.PluginInfrastructure.Manager;35 33 36 34 namespace HeuristicLab.Clients.Hive { … … 45 43 return HeuristicLab.Common.Resources.VSImageLibrary.Event; 46 44 } else { 47 if (job. JobState == JobState.Waiting) return HeuristicLab.Common.Resources.VSImageLibrary.ExecutablePrepared;48 else if (job. JobState == JobState.WaitingForChildJobs) return HeuristicLab.Common.Resources.VSImageLibrary.ExecutablePrepared;49 else if (job. JobState == JobState.Calculating) return HeuristicLab.Common.Resources.VSImageLibrary.ExecutableStarted;50 else if (job. JobState == JobState.Aborted) return HeuristicLab.Common.Resources.VSImageLibrary.ExecutableStopped;51 else if (job. JobState == JobState.Failed) return HeuristicLab.Common.Resources.VSImageLibrary.Error;52 else if (job. JobState == JobState.Finished) return HeuristicLab.Common.Resources.VSImageLibrary.ExecutableStopped;45 if (job.State == JobState.Waiting) return HeuristicLab.Common.Resources.VSImageLibrary.ExecutablePrepared; 46 else if (job.State == JobState.FinishOnChildJobsFinished) return HeuristicLab.Common.Resources.VSImageLibrary.ExecutablePrepared; 47 else if (job.State == JobState.Calculating) return HeuristicLab.Common.Resources.VSImageLibrary.ExecutableStarted; 48 else if (job.State == JobState.Aborted) return HeuristicLab.Common.Resources.VSImageLibrary.ExecutableStopped; 49 else if (job.State == JobState.Failed) return HeuristicLab.Common.Resources.VSImageLibrary.Error; 50 else if (job.State == JobState.Finished) return HeuristicLab.Common.Resources.VSImageLibrary.ExecutableStopped; 53 51 else return HeuristicLab.Common.Resources.VSImageLibrary.Event; 54 52 } … … 108 106 public HiveJob() { 109 107 this.Job = new Job() { 110 JobState = JobState.Offline,111 DateCreated = DateTime.Now,112 108 CoresNeeded = 1, 113 109 MemoryNeeded = 0 114 110 }; 111 job.SetState(JobState.Offline); 115 112 this.childHiveJobs = new ItemList<HiveJob>(); 116 113 syncJobsWithOptimizers = true; … … 406 403 if (lightweightJob != null) { 407 404 job.Id = lightweightJob.Id; 408 job.DateCreated = lightweightJob.DateCreated;409 job.DateCalculated = lightweightJob.DateCalculated;410 job.DateFinished = lightweightJob.DateFinished;411 job.Exception = lightweightJob.Exception;412 405 job.Id = lightweightJob.Id; 413 406 job.ExecutionTime = lightweightJob.ExecutionTime; 414 job. JobState = lightweightJob.JobState;407 job.StateLog = new List<StateLog>(lightweightJob.StateLog); 415 408 // what about parentJob 416 409 OnJobStateChanged(); … … 488 481 public event EventHandler JobStateChanged; 489 482 private void OnJobStateChanged() { 490 LogMessage("JobStateChanged (State: " + this.Job. JobState + ", ExecutionTime: " + this.Job.ExecutionTime.ToString() + ")");483 LogMessage("JobStateChanged (State: " + this.Job.State + ", ExecutionTime: " + this.Job.ExecutionTime.ToString() + ")"); 491 484 EventHandler handler = JobStateChanged; 492 485 if (handler != null) handler(this, EventArgs.Empty);
Note: See TracChangeset
for help on using the changeset viewer.