Changeset 6394 for branches/MPI/HeuristicLab.MPIAlgorithmRunner
- Timestamp:
- 06/08/11 14:26:36 (13 years ago)
- Location:
- branches/MPI/HeuristicLab.MPIAlgorithmRunner/3.3
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/MPI/HeuristicLab.MPIAlgorithmRunner/3.3/AlgorithmBroker.cs
r6388 r6394 32 32 using HeuristicLab.Core; 33 33 using System.Threading; 34 using System.Xml; 34 35 35 36 namespace HeuristicLab.MPIAlgorithmRunner { … … 53 54 endpoint.Name = "AlgorithmBrokerEndpoint"; 54 55 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; 55 60 endpoint.Binding = netTCPBinding; 56 61 int port = FindFreeTcpPort(); 57 62 endpoint.Address = new EndpointAddress("net.tcp://localhost:" + port + "/AlgorithmBroker"); 58 63 service.AddServiceEndpoint(endpoint); 64 ServiceDebugBehavior debug = service.Description.Behaviors.Find<ServiceDebugBehavior>(); 65 debug.IncludeExceptionDetailInFaults = true; 59 66 60 67 return service; … … 85 92 public void TransmitAlgorithm(MPITransportWrapper<IAlgorithm> algorithm) { 86 93 Console.WriteLine("Transmitting Algorithm..."); 87 int clients = MPI.Communicator.world.Group.Size ;94 int clients = MPI.Communicator.world.Group.Size - 1; 88 95 89 96 for(int i = 0; i < clients; i++) { -
branches/MPI/HeuristicLab.MPIAlgorithmRunner/3.3/HeuristicLab.MPIAlgorithmRunner-3.3.csproj
r6393 r6394 129 129 <Reference Include="System" /> 130 130 <Reference Include="System.Core" /> 131 <Reference Include="System.Runtime.Serialization" /> 131 132 <Reference Include="System.ServiceModel" /> 132 133 <Reference Include="System.Xml.Linq" /> … … 168 169 SubWCRev "%25ProjectDir%25\" "%25ProjectDir%25\HeuristicLabMPIAlgorithmRunnerPlugin.cs.frame" "%25ProjectDir%25\HeuristicLabMPIAlgorithmRunnerPlugin.cs"</PreBuildEvent> 169 170 </PropertyGroup> 171 <PropertyGroup> 172 <PostBuildEvent>set ProjectName=$(ProjectName) 173 set Source=$(TargetPath) 174 set Configuration=$(ConfigurationName) 175 set Platform=$(PlatformName) 176 set SolutionDir=$(SolutionDir) 177 178 if exist "$(SolutionDir)CustomPostBuild.cmd" call "$(SolutionDir)CustomPostBuild.cmd"</PostBuildEvent> 179 </PropertyGroup> 170 180 <!-- To modify your build process, add your task inside one of the targets below and uncomment it. 171 181 Other similar extension points exist, see Microsoft.Common.targets. -
branches/MPI/HeuristicLab.MPIAlgorithmRunner/3.3/Program.cs
r6388 r6394 41 41 42 42 // 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"); 44 44 int jobId = System.Convert.ToInt32(System.Environment.GetEnvironmentVariable("CCP_JOBID")); 45 46 Console.WriteLine(jobId + "@" + headNodeName); 45 47 46 48 // Connect to the head node and get the job … … 63 65 static void Main(string[] args) { 64 66 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 66 70 int updateInterval = 5000; 67 71
Note: See TracChangeset
for help on using the changeset viewer.