Free cookie consent management tool by TermsFeed Policy Generator

Changeset 6398


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

Added MPIEngine view (#1542)

Location:
branches/MPI
Files:
2 added
6 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...");
  • branches/MPI/HeuristicLab.MPIEngine/3.3/HeuristicLab.MPIEngine-3.3.csproj

    r6394 r6398  
    110110      <HintPath>..\..\..\..\..\..\Program Files\HeuristicLab 3.3\HeuristicLab.Common-3.3.dll</HintPath>
    111111    </Reference>
     112    <Reference Include="HeuristicLab.Common.Resources-3.3">
     113      <HintPath>..\..\..\..\..\..\Program Files\HeuristicLab 3.3\HeuristicLab.Common.Resources-3.3.dll</HintPath>
     114    </Reference>
    112115    <Reference Include="HeuristicLab.Core-3.3">
    113116      <HintPath>..\..\..\..\..\..\Program Files\HeuristicLab 3.3\HeuristicLab.Core-3.3.dll</HintPath>
    114117    </Reference>
     118    <Reference Include="HeuristicLab.Core.Views-3.3">
     119      <HintPath>..\..\..\..\..\..\Program Files\HeuristicLab 3.3\HeuristicLab.Core.Views-3.3.dll</HintPath>
     120    </Reference>
     121    <Reference Include="HeuristicLab.MainForm-3.3">
     122      <HintPath>..\..\..\..\..\..\Program Files\HeuristicLab 3.3\HeuristicLab.MainForm-3.3.dll</HintPath>
     123    </Reference>
     124    <Reference Include="HeuristicLab.MainForm.WindowsForms-3.3">
     125      <HintPath>..\..\..\..\..\..\Program Files\HeuristicLab 3.3\HeuristicLab.MainForm.WindowsForms-3.3.dll</HintPath>
     126    </Reference>
    115127    <Reference Include="HeuristicLab.Optimization-3.3">
    116128      <HintPath>..\..\..\..\..\..\Program Files\HeuristicLab 3.3\HeuristicLab.Optimization-3.3.dll</HintPath>
     
    133145    <Reference Include="System" />
    134146    <Reference Include="System.Core" />
     147    <Reference Include="System.Drawing" />
    135148    <Reference Include="System.Runtime.Serialization" />
    136149    <Reference Include="System.ServiceModel" />
     150    <Reference Include="System.Windows.Forms" />
    137151    <Reference Include="System.Xml.Linq" />
    138152    <Reference Include="System.Data.DataSetExtensions" />
     
    141155  </ItemGroup>
    142156  <ItemGroup>
     157    <Compile Include="MPIEngineView.cs">
     158      <SubType>UserControl</SubType>
     159    </Compile>
     160    <Compile Include="MPIEngineView.designer.cs">
     161      <DependentUpon>MPIEngineView.cs</DependentUpon>
     162    </Compile>
    143163    <Compile Include="HeuristicLabMPIEnginePlugin.cs" />
    144164    <Compile Include="Properties\AssemblyInfo.cs" />
  • branches/MPI/HeuristicLab.MPIEngine/3.3/HeuristicLabMPIEnginePlugin.cs.frame

    r6388 r6398  
    3333  [PluginDependency("HeuristicLab.Collections", "3.3")]
    3434  [PluginDependency("HeuristicLab.Common", "3.3")]
     35  [PluginDependency("HeuristicLab.Common.Resources", "3.3")]
    3536  [PluginDependency("HeuristicLab.Core", "3.3")]
     37  [PluginDependency("HeuristicLab.Core.Views", "3.3")]
     38  [PluginDependency("HeuristicLab.MainForm", "3.3")]
     39  [PluginDependency("HeuristicLab.MainForm.WindowsForms", "3.3")]
    3640  [PluginDependency("HeuristicLab.MPInet", "1.0.0")]
    3741  [PluginDependency("HeuristicLab.MPIAlgorithmRunner", "3.3")]
  • branches/MPI/HeuristicLab.MPIEngine/3.3/MPIEngine.cs

    r6395 r6398  
    3737using Microsoft.Hpc.Scheduler.Properties;
    3838using System.Xml;
     39using System.ComponentModel;
    3940
    4041namespace HeuristicLab.MPIEngine {
     
    4748  public class MPIEngine : Engine {
    4849    private string username;
     50
     51    [Category("MPISettings")]
     52    [Browsable(true)]
     53    public string UserName {
     54      get {
     55        return username;
     56      }
     57
     58      set {
     59        username = value;
     60      }
     61    }
     62
    4963    private string password;
    5064
     65    [Category("MPISettings")]
     66    [Browsable(true)]
     67    [PasswordPropertyText(true)]
     68    public string Password {
     69      get {
     70        return password;
     71      }
     72
     73      set {
     74        password = value;
     75      }
     76    }
     77
    5178    [Storable]
    5279    private string headNode;
    5380
     81    [Category("MPISettings")]
     82    [Browsable(true)]
     83    public string HeadNode {
     84      get {
     85        return headNode;
     86      }
     87
     88      set {
     89        headNode = value;
     90      }
     91    }
     92
    5493    [Storable]
    5594    private string path;
    5695
     96    [Category("MPISettings")]
     97    [Browsable(true)]
     98    public string Path {
     99      get {
     100        return path;
     101      }
     102
     103      set {
     104        path = value;
     105      }
     106    }
     107
     108    [Storable]
     109    private int updateInterval;
     110
     111    [Category("MPISettings")]
     112    [Browsable(true)]
     113    public int UpdateInterval {
     114      get {
     115        return updateInterval;
     116      }
     117
     118      set {
     119        updateInterval = value;
     120      }
     121    }
     122
    57123    [Storable]
    58124    private int cpuPerNode;
    59125
     126    [Category("MPISettings")]
     127    [Browsable(true)]
     128    public int CpuPerNode {
     129      get {
     130        return cpuPerNode;
     131      }
     132
     133      set {
     134        cpuPerNode = value;
     135      }
     136    }
     137
    60138    [Storable]
    61139    private List<string> requestedNodes;
     140
     141    [Category("MPISettings")]
     142    [Browsable(true)]
     143    public List<string> RequestedNodes {
     144      get {
     145        return requestedNodes;
     146      }
     147
     148      set {
     149        requestedNodes = value;
     150      }
     151    }
    62152
    63153    [StorableConstructor]
     
    69159      headNode = original.headNode;
    70160      path = original.path;
     161      updateInterval = original.updateInterval;
    71162      cpuPerNode = original.cpuPerNode;
    72163      requestedNodes = new List<string>();
     
    80171      headNode = "blade00.hpc.fh-hagenberg.at";
    81172      path = @"C:\public\MPISupport";
    82       cpuPerNode = 8;
     173      updateInterval = 5000;
     174      cpuPerNode = 3;
    83175      requestedNodes = new List<string>();
    84176      requestedNodes.Add("BLADE00");
     
    172264          netTCPBinding.ReaderQuotas = quotas;
    173265          netTCPBinding.MaxReceivedMessageSize = int.MaxValue;
     266          netTCPBinding.SendTimeout = new TimeSpan(100000000);
     267          netTCPBinding.ReceiveTimeout = new TimeSpan(100000000);
    174268          ChannelFactory<IAlgorithmBroker> factory = new ChannelFactory<IAlgorithmBroker>(netTCPBinding, address);
    175269          IAlgorithmBroker proxy = factory.CreateChannel();
    176270
    177           proxy.TransmitAlgorithm(new MPITransportWrapper<IAlgorithm>(algorithm));
     271          proxy.TransmitAlgorithm(new MPITransportWrapper<IAlgorithm>(algorithm), updateInterval);
    178272
    179273          while (!proxy.IsAlgorithmTerminated()) {
     
    191285            }
    192286
    193             System.Threading.Thread.Sleep(5000);
     287            System.Threading.Thread.Sleep(updateInterval);
    194288          }
    195289        }
Note: See TracChangeset for help on using the changeset viewer.