Ejemplo n.º 1
0
 public Computation FinishComputation()
 {
     var computation = Computation;
     Computation = null;
     Status = RunnerStatus.Idle;
     return computation;
 }
Ejemplo n.º 2
0
 public void StartComputation(Computation computation)
 {
     Status = RunnerStatus.Running;
     Computation = computation;
     Computation.Worker = Id;
     Connector.StartComputation(computation);
 }
Ejemplo n.º 3
0
 public void StartComputation(Computation computation)
 {
     lock (controllerLock)
     {
         currentComputation = computation;
         var dataSourceConfig = computation.DataSetDefinition;
         var partitioner = dataSource.GetDataPartitioner(dataSourceConfig);
         var partitions = partitioner.Partition(dataSourceConfig, computation.PartitionSize);
         foreach (var dataPartition in partitions)
         {
             var computationPartition = new Computation();
             computationPartition.Algorithm = computation.Algorithm;
             computationPartition.Parameters = computation.Parameters;
             computationPartition.DataSetDefinition = dataPartition;
             todo.Enqueue(computationPartition);
         }
         computationInProgress = true;
         Console.WriteLine("Computation started with {0} tasks.", todo.Count);
     }
 }
Ejemplo n.º 4
0
 public void StartComputation(Computation computation)
 {
     Console.WriteLine("Calling start computation on node... " + computation.Serialize());
     serviceInterface.Post(computation, "/doComputation");
 }