Free cookie consent management tool by TermsFeed Policy Generator

Changeset 1755


Ignore:
Timestamp:
05/07/09 14:34:33 (16 years ago)
Author:
kgrading
Message:

added the "coresNeeded" and made a fallback concerning dynamic plugin loading... (#467)

Location:
trunk/sources
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • trunk/sources/HeuristicLab.Hive.Client.Core/3.2/ConfigurationManager/ConfigManager.cs

    r1449 r1755  
    135135    }
    136136
     137    public int GetUsedCores() {
     138      Dictionary<Guid, Executor> engines = Core.GetExecutionEngines();
     139      Dictionary<Guid, Job> jobs = Core.GetJobs();
     140      int usedCores = 0;
     141      lock (engines) {       
     142        foreach (KeyValuePair<Guid, Job> kvp in jobs)
     143          usedCores += kvp.Value.CoresNeeded;
     144      }
     145      return usedCores;
     146    }
     147
    137148  }
    138149}
  • trunk/sources/HeuristicLab.Hive.Client.Core/3.2/Core.cs

    r1719 r1755  
    6565    public void Start() {     
    6666      abortRequested = false;
    67 
     67      PluginManager.Manager.Initialize();
    6868      Logging.Instance.Info(this.ToString(), "Hive Client started");
    6969      ClientConsoleServer server = new ClientConsoleServer();
     
    206206
    207207    void wcfService_SendJobCompleted(object sender, SendJobCompletedEventArgs e) {
    208       if (e.Result.StatusMessage != ApplicationConstants.RESPONSE_COMMUNICATOR_NO_JOBS_LEFT) {
     208      if (e.Result.StatusMessage != ApplicationConstants.RESPONSE_COMMUNICATOR_NO_JOBS_LEFT) {       
    209209        bool sandboxed = false;
    210 
    211         PluginManager.Manager.Initialize();
     210        //todo: For testing!!!
     211        //beat.StopHeartBeat();       
    212212        //Todo: make a set & override the equals method
    213213        List<byte[]> files = new List<byte[]>();
     
    305305     
    306306    }
     307
     308    internal Dictionary<Guid, Job> GetJobs() {
     309      return jobs;
     310    }
    307311  }
    308312}
  • trunk/sources/HeuristicLab.Hive.Client.Core/3.2/Heartbeat.cs

    r1530 r1755  
    7878      int mb = (int)(counter.NextValue() / 1024 / 1024);
    7979
     80     
    8081
    81         HeartBeatData heartBeatData = new HeartBeatData {
     82      HeartBeatData heartBeatData = new HeartBeatData {
    8283        ClientId = info.Id,
    83         FreeCores = info.NrOfCores - (ClientStatusInfo.JobsFetched - ClientStatusInfo.JobsProcessed),
     84        FreeCores = info.NrOfCores - ConfigManager.Instance.GetUsedCores(),
    8485        FreeMemory = mb,
    8586        JobProgress = ConfigManager.Instance.GetProgressOfAllJobs()
  • trunk/sources/HeuristicLab.PluginInfrastructure/PluginManager.cs

    r1730 r1755  
    229229      NotifyListeners(PluginManagerAction.Initializing, "All plugins");
    230230
    231       if (assemblyFiles != null && assemblyFiles.Count > 0)
    232         remoteRunner.LoadPlugins(assemblyFiles);
     231      //if (assemblyFiles != null && assemblyFiles.Count > 0)
     232      //  remoteRunner.LoadPlugins(assemblyFiles);
    233233     
    234       /*if (depPlugins != null && depPlugins.Count > 0) {       
    235         remoteRunner.LoadPlugins(depPlugins);
    236       }*/
     234      //if (depPlugins != null && depPlugins.Count > 0) {       
     235        remoteRunner.LoadPlugins(ActivePlugins);
     236      //}
    237237      NotifyListeners(PluginManagerAction.Initialized, "All plugins");
    238238      return applicationDomain;
Note: See TracChangeset for help on using the changeset viewer.