Free cookie consent management tool by TermsFeed Policy Generator

Ignore:
Timestamp:
06/08/11 14:26:36 (13 years ago)
Author:
svonolfe
Message:

Added first working version of the MPI engine (#1542)

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

Legend:

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

    r6388 r6394  
    3232using HeuristicLab.Core;
    3333using System.Threading;
     34using System.Xml;
    3435                     
    3536namespace HeuristicLab.MPIAlgorithmRunner {
     
    5354      endpoint.Name = "AlgorithmBrokerEndpoint";
    5455      NetTcpBinding netTCPBinding = new NetTcpBinding(SecurityMode.None);
     56      netTCPBinding.MaxReceivedMessageSize = int.MaxValue;
     57      XmlDictionaryReaderQuotas quotas = new XmlDictionaryReaderQuotas();
     58      quotas.MaxArrayLength = int.MaxValue;
     59      netTCPBinding.ReaderQuotas = quotas;
    5560      endpoint.Binding = netTCPBinding;
    5661      int port = FindFreeTcpPort();
    5762      endpoint.Address = new EndpointAddress("net.tcp://localhost:" + port + "/AlgorithmBroker");
    5863      service.AddServiceEndpoint(endpoint);
     64      ServiceDebugBehavior debug = service.Description.Behaviors.Find<ServiceDebugBehavior>();
     65      debug.IncludeExceptionDetailInFaults = true;
    5966
    6067      return service;
     
    8592    public void TransmitAlgorithm(MPITransportWrapper<IAlgorithm> algorithm) {
    8693      Console.WriteLine("Transmitting Algorithm...");
    87       int clients = MPI.Communicator.world.Group.Size;
     94      int clients = MPI.Communicator.world.Group.Size - 1;
    8895
    8996      for(int i = 0; i < clients; i++) {
  • branches/MPI/HeuristicLab.MPIAlgorithmRunner/3.3/HeuristicLab.MPIAlgorithmRunner-3.3.csproj

    r6393 r6394  
    129129    <Reference Include="System" />
    130130    <Reference Include="System.Core" />
     131    <Reference Include="System.Runtime.Serialization" />
    131132    <Reference Include="System.ServiceModel" />
    132133    <Reference Include="System.Xml.Linq" />
     
    168169SubWCRev "%25ProjectDir%25\" "%25ProjectDir%25\HeuristicLabMPIAlgorithmRunnerPlugin.cs.frame" "%25ProjectDir%25\HeuristicLabMPIAlgorithmRunnerPlugin.cs"</PreBuildEvent>
    169170  </PropertyGroup>
     171  <PropertyGroup>
     172    <PostBuildEvent>set ProjectName=$(ProjectName)
     173set Source=$(TargetPath)
     174set Configuration=$(ConfigurationName)
     175set Platform=$(PlatformName)
     176set SolutionDir=$(SolutionDir)
     177
     178if exist "$(SolutionDir)CustomPostBuild.cmd" call "$(SolutionDir)CustomPostBuild.cmd"</PostBuildEvent>
     179  </PropertyGroup>
    170180  <!-- To modify your build process, add your task inside one of the targets below and uncomment it.
    171181       Other similar extension points exist, see Microsoft.Common.targets.
  • branches/MPI/HeuristicLab.MPIAlgorithmRunner/3.3/Program.cs

    r6388 r6394  
    4141
    4242      // Discover the job's context from the environment
    43       String headNodeName = System.Environment.GetEnvironmentVariable("CCP_CLUSTER_NAME");
     43      String headNodeName = System.Environment.GetEnvironmentVariable("CCP_SCHEDULER");
    4444      int jobId = System.Convert.ToInt32(System.Environment.GetEnvironmentVariable("CCP_JOBID"));
     45
     46      Console.WriteLine(jobId + "@" + headNodeName);
    4547
    4648      // Connect to the head node and get the job
     
    6365    static void Main(string[] args) {
    6466      using (new MPI.Environment(ref args)) {
    65         int clients = MPI.Communicator.world.Group.Size;
     67        int clients = MPI.Communicator.world.Group.Size - 1;
     68        Console.WriteLine("Clients: " + clients);
     69
    6670        int updateInterval = 5000;
    6771
Note: See TracChangeset for help on using the changeset viewer.