Free cookie consent management tool by TermsFeed Policy Generator

Ignore:
Timestamp:
06/08/11 15:52:16 (13 years ago)
Author:
svonolfe
Message:

Added MPIEngine view (#1542)

Location:
branches/MPI/HeuristicLab.MPIAlgorithmRunner/3.3
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • branches/MPI/HeuristicLab.MPIAlgorithmRunner/3.3/AlgorithmBroker.cs

    r6394 r6398  
    5858      quotas.MaxArrayLength = int.MaxValue;
    5959      netTCPBinding.ReaderQuotas = quotas;
     60      netTCPBinding.SendTimeout = new TimeSpan(100000000);
     61      netTCPBinding.ReceiveTimeout = new TimeSpan(100000000);
    6062      endpoint.Binding = netTCPBinding;
    6163      int port = FindFreeTcpPort();
     
    9092    #region IAlgorithmBroker Members
    9193
    92     public void TransmitAlgorithm(MPITransportWrapper<IAlgorithm> algorithm) {
     94    public void TransmitAlgorithm(MPITransportWrapper<IAlgorithm> algorithm, int updateInterval) {
    9395      Console.WriteLine("Transmitting Algorithm...");
    9496      int clients = MPI.Communicator.world.Group.Size - 1;
     
    9799        int client = i + 1;
    98100        communicator.Send<MPITransportWrapper<IAlgorithm>>(algorithm, client, 0);
     101        communicator.Send<int>(updateInterval, client, 1);
    99102      }
    100103    }
  • branches/MPI/HeuristicLab.MPIAlgorithmRunner/3.3/IAlgorithmBroker.cs

    r6388 r6398  
    3333  public interface IAlgorithmBroker {
    3434    [OperationContract]
    35     void TransmitAlgorithm(MPITransportWrapper<IAlgorithm> algorithm);
     35    void TransmitAlgorithm(MPITransportWrapper<IAlgorithm> algorithm, int updateInterval);
    3636
    3737    [OperationContract]
  • branches/MPI/HeuristicLab.MPIAlgorithmRunner/3.3/Program.cs

    r6394 r6398  
    6868        Console.WriteLine("Clients: " + clients);
    6969
    70         int updateInterval = 5000;
    71 
    7270        MPI.Communicator communicator = MPI.Communicator.world.Clone() as MPI.Communicator;
    7371
     
    119117        } else {
    120118          Program p = new Program();
    121           p.StartAlgorithm(updateInterval, communicator);
     119          p.StartAlgorithm(communicator);
    122120        }
    123121      }
    124122    }
    125123
    126     public void StartAlgorithm(int updateInterval, MPI.Communicator communicator) {
     124    public void StartAlgorithm(MPI.Communicator communicator) {
    127125      IAlgorithm alg = communicator.Receive<MPITransportWrapper<IAlgorithm>>(0, 0).InnerItem;
     126      int updateInterval = communicator.Receive<int>(0, 1);
    128127
    129128      Console.WriteLine("Starting algorithm...");
Note: See TracChangeset for help on using the changeset viewer.