Free cookie consent management tool by TermsFeed Policy Generator

Changeset 7205


Ignore:
Timestamp:
12/19/11 11:08:33 (13 years ago)
Author:
svonolfe
Message:

Refactored solution (#1542)

Location:
branches/MPI
Files:
1 added
4 deleted
9 edited
5 moved

Legend:

Unmodified
Added
Removed
  • branches/MPI/HeuristicLab.ExtLibs/HeuristicLab.MPInet/1.0.0/HeuristicLab.MPInet-1.0.0.csproj

    r6394 r7205  
    4141    <DebugType>full</DebugType>
    4242    <Optimize>false</Optimize>
    43     <OutputPath>bin\Debug\</OutputPath>
     43    <OutputPath>..\..\..\..\trunk\sources\bin\</OutputPath>
    4444    <DefineConstants>DEBUG;TRACE</DefineConstants>
    4545    <ErrorReport>prompt</ErrorReport>
     
    100100    </Reference>
    101101    <Reference Include="HeuristicLab.PluginInfrastructure-3.3">
    102       <HintPath>..\..\..\..\..\..\..\Program Files\HeuristicLab 3.3\HeuristicLab.PluginInfrastructure-3.3.dll</HintPath>
     102      <HintPath>..\..\..\..\..\trunk\sources\bin\HeuristicLab.PluginInfrastructure-3.3.dll</HintPath>
     103      <Private>False</Private>
    103104    </Reference>
    104105    <Reference Include="System" />
     
    116117  </ItemGroup>
    117118  <ItemGroup>
    118     <Compile Include="HeuristicLabMPInetPlugin.cs" />
    119119    <Compile Include="Properties\AssemblyInfo.cs" />
    120120  </ItemGroup>
    121121  <ItemGroup>
     122    <None Include="Properties\AssemblyInfo.cs.frame" />
    122123    <None Include="HeuristicLab.snk" />
    123     <None Include="Properties\AssemblyInfo.frame" />
    124124  </ItemGroup>
    125125  <ItemGroup>
     
    168168  </PropertyGroup>
    169169  <PropertyGroup>
    170     <PostBuildEvent>set ProjectName=$(ProjectName)
    171 set Source=$(TargetPath)
    172 set Configuration=$(ConfigurationName)
    173 set Platform=$(PlatformName)
    174 set SolutionDir=$(SolutionDir)
    175 
    176 if exist "$(SolutionDir)CustomPostBuild.cmd" call "$(SolutionDir)CustomPostBuild.cmd"</PostBuildEvent>
     170    <PostBuildEvent>
     171    </PostBuildEvent>
    177172  </PropertyGroup>
    178173</Project>
  • branches/MPI/HeuristicLab.MPIAlgorithmRunner/3.3/HeuristicLab.MPIAlgorithmRunner-3.3.csproj

    r6394 r7205  
    3636  <PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Debug|AnyCPU'">
    3737    <DebugSymbols>true</DebugSymbols>
    38     <OutputPath>bin\Debug\</OutputPath>
     38    <OutputPath>..\..\..\..\trunk\sources\bin\</OutputPath>
    3939    <DefineConstants>DEBUG;TRACE</DefineConstants>
    4040    <DebugType>full</DebugType>
     
    103103  </PropertyGroup>
    104104  <ItemGroup>
    105     <Reference Include="HeuristicLab.Collections-3.3">
    106       <HintPath>..\..\..\..\..\..\Program Files\HeuristicLab 3.3\HeuristicLab.Collections-3.3.dll</HintPath>
     105    <Reference Include="HeuristicLab.Collections-3.3, Version=3.3.0.0, Culture=neutral, PublicKeyToken=ba48961d6f65dcec, processorArchitecture=MSIL">
     106      <HintPath>..\..\..\..\trunk\sources\bin\HeuristicLab.Collections-3.3.dll</HintPath>
     107      <Private>False</Private>
    107108    </Reference>
    108     <Reference Include="HeuristicLab.Common-3.3">
    109       <HintPath>..\..\..\..\..\..\Program Files\HeuristicLab 3.3\HeuristicLab.Common-3.3.dll</HintPath>
     109    <Reference Include="HeuristicLab.Common-3.3, Version=3.3.0.0, Culture=neutral, PublicKeyToken=ba48961d6f65dcec, processorArchitecture=MSIL">
     110      <HintPath>..\..\..\..\trunk\sources\bin\HeuristicLab.Common-3.3.dll</HintPath>
     111      <Private>False</Private>
    110112    </Reference>
    111     <Reference Include="HeuristicLab.Core-3.3">
    112       <HintPath>..\..\..\..\..\..\Program Files\HeuristicLab 3.3\HeuristicLab.Core-3.3.dll</HintPath>
     113    <Reference Include="HeuristicLab.Core-3.3, Version=3.3.0.0, Culture=neutral, PublicKeyToken=ba48961d6f65dcec, processorArchitecture=MSIL">
     114      <HintPath>..\..\..\..\trunk\sources\bin\HeuristicLab.Core-3.3.dll</HintPath>
     115      <Private>False</Private>
    113116    </Reference>
    114     <Reference Include="HeuristicLab.Optimization-3.3">
    115       <HintPath>..\..\..\..\..\..\Program Files\HeuristicLab 3.3\HeuristicLab.Optimization-3.3.dll</HintPath>
     117    <Reference Include="HeuristicLab.Optimization-3.3, Version=3.3.0.0, Culture=neutral, PublicKeyToken=ba48961d6f65dcec, processorArchitecture=MSIL">
     118      <HintPath>..\..\..\..\trunk\sources\bin\HeuristicLab.Optimization-3.3.dll</HintPath>
     119      <Private>False</Private>
    116120    </Reference>
    117     <Reference Include="HeuristicLab.Persistence-3.3">
    118       <HintPath>..\..\..\..\..\..\Program Files\HeuristicLab 3.3\HeuristicLab.Persistence-3.3.dll</HintPath>
     121    <Reference Include="HeuristicLab.Persistence-3.3, Version=3.3.0.0, Culture=neutral, PublicKeyToken=ba48961d6f65dcec, processorArchitecture=MSIL">
     122      <HintPath>..\..\..\..\trunk\sources\bin\HeuristicLab.Persistence-3.3.dll</HintPath>
     123      <Private>False</Private>
    119124    </Reference>
    120     <Reference Include="HeuristicLab.PluginInfrastructure-3.3">
    121       <HintPath>..\..\..\..\..\..\Program Files\HeuristicLab 3.3\HeuristicLab.PluginInfrastructure-3.3.dll</HintPath>
     125    <Reference Include="HeuristicLab.PluginInfrastructure-3.3, Version=3.3.0.0, Culture=neutral, PublicKeyToken=ba48961d6f65dcec, processorArchitecture=MSIL">
     126      <HintPath>..\..\..\..\trunk\sources\bin\HeuristicLab.PluginInfrastructure-3.3.dll</HintPath>
     127      <Private>False</Private>
    122128    </Reference>
    123129    <Reference Include="Microsoft.Hpc.Scheduler, Version=2.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
     
    139145  <ItemGroup>
    140146    <Compile Include="AlgorithmBroker.cs" />
    141     <Compile Include="HeuristicLabMPIAlgorithmRunnerPlugin.cs" />
    142147    <Compile Include="IAlgorithmBroker.cs" />
    143148    <Compile Include="Program.cs" />
     
    145150  </ItemGroup>
    146151  <ItemGroup>
     152    <None Include="HeuristicLab.snk" />
     153  </ItemGroup>
     154  <ItemGroup>
     155    <ProjectReference Include="..\..\HeuristicLab.ExtLibs\HeuristicLab.MPInet\1.0.0\HeuristicLab.MPInet-1.0.0.csproj">
     156      <Project>{C47EEE60-DF91-46DB-9B78-F2C2301D6FE7}</Project>
     157      <Name>HeuristicLab.MPInet-1.0.0</Name>
     158      <Private>False</Private>
     159    </ProjectReference>
    147160    <ProjectReference Include="..\..\HeuristicLab.Operators.MPISupport\3.3\HeuristicLab.Operators.MPISupport-3.3.csproj">
    148161      <Project>{6BD69CDA-4875-4045-8B35-6FD4602854F5}</Project>
    149162      <Name>HeuristicLab.Operators.MPISupport-3.3</Name>
     163      <Private>False</Private>
    150164    </ProjectReference>
    151     <ProjectReference Include="..\..\HeuristicLab.ExtLibs\HeuristicLab.MPInet\1.0.0\HeuristicLab.MPInet-1.0.0.csproj">
    152       <Project>{C47EEE60-DF91-46DB-9B78-F2C2301D6FE7}</Project>
    153       <Name>HeuristicLab.MPInet-1.0.0</Name>
    154     </ProjectReference>
    155   </ItemGroup>
    156   <ItemGroup>
    157     <None Include="HeuristicLab.snk" />
    158     <None Include="HeuristicLabMPIAlgorithmRunnerPlugin.cs.frame" />
    159     <None Include="Properties\AssemblyInfo.frame" />
    160165  </ItemGroup>
    161166  <Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
     
    166171set Outdir=$(Outdir)
    167172
    168 call PreBuildEvent.cmd
    169 SubWCRev "%25ProjectDir%25\" "%25ProjectDir%25\HeuristicLabMPIAlgorithmRunnerPlugin.cs.frame" "%25ProjectDir%25\HeuristicLabMPIAlgorithmRunnerPlugin.cs"</PreBuildEvent>
     173call PreBuildEvent.cmd</PreBuildEvent>
    170174  </PropertyGroup>
    171175  <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>
     176    <PostBuildEvent>
     177    </PostBuildEvent>
    179178  </PropertyGroup>
    180179  <!-- To modify your build process, add your task inside one of the targets below and uncomment it.
  • branches/MPI/HeuristicLab.MPIAlgorithmRunner/3.3/Program.cs

    r6402 r7205  
    2727using HeuristicLab.Persistence.Default.Xml;
    2828using System.Threading;
    29 using HeuristicLab.Operators.MPISupport;
    30 using HeuristicLab.Core;
    31 using Microsoft.Hpc.Scheduler;
    32 using System.ServiceModel;
    33 using System.Net;
    3429
    3530namespace HeuristicLab.MPIAlgorithmRunner {
    3631  class Program {
    37     private static void SetJobStatus(string address) {
    38       Console.WriteLine("Started service... at " + address);
    39 
    40       // Discover the job's context from the environment
    41       String headNodeName = System.Environment.GetEnvironmentVariable("CCP_SCHEDULER");
    42       int jobId = System.Convert.ToInt32(System.Environment.GetEnvironmentVariable("CCP_JOBID"));
    43 
    44       Console.WriteLine(jobId + "@" + headNodeName);
    45 
    46       // Connect to the head node and get the job
    47       IScheduler scheduler = new Scheduler();
    48       scheduler.Connect(headNodeName);
    49       ISchedulerJob job = scheduler.OpenJob(jobId);
    50 
    51       job.SetCustomProperty("address", address);
    52 
    53       job.Commit();
    54     }
    55 
    56     private static string GetAddress(ServiceHost service) {
    57       IPHostEntry IPHost = Dns.GetHostByName(Dns.GetHostName());
    58       string address = "net.tcp://" + IPHost.AddressList[0].ToString() + ":" + service.ChannelDispatchers[0].Listener.Uri.Port + "/AlgorithmBroker";
    59 
    60       return address;
    61     }
     32    EventWaitHandle waitHandle = new EventWaitHandle(false, EventResetMode.ManualReset);
    6233
    6334    static void Main(string[] args) {
     35      if (args.Length != 2) {
     36        Console.WriteLine("Args:" + args.Length);
     37
     38        throw new ArgumentException("You must provide two arguments - the algorithm file and the result file");
     39      }
     40
     41      string fileName = args[0];
     42      string resultName = args[1];
     43
    6444      using (new MPI.Environment(ref args)) {
    65         int clients = MPI.Communicator.world.Group.Size - 1;
    66         Console.WriteLine("Clients: " + clients);
    67 
    68         MPI.Communicator communicator = MPI.Communicator.world.Clone() as MPI.Communicator;
    69 
    70         if (communicator.Rank == 0) {
    71           ServiceHost service = AlgorithmBroker.StartService(communicator);
    72           AlgorithmBroker broker = (service.SingletonInstance as AlgorithmBroker);
    73 
    74           string address = GetAddress(service);
    75           SetJobStatus(address);
    76 
    77           bool[] finished = new bool[clients];
    78           int finishedCount = 0;
    79 
    80           while (finishedCount != clients) {
    81             ItemList<ResultCollection> results = new ItemList<ResultCollection>();
    82 
    83             for (int i = 0; i < clients; i++) {
    84               if (!finished[i]) {
    85                 int client = i + 1;
    86                 ResultCollection result = communicator.Receive<MPITransportWrapper<ResultCollection>>(client, 1).InnerItem;
    87 
    88                 Console.WriteLine("Received result " + result);
    89 
    90                 if (results.Count != clients) {
    91                   results.Add(result);
    92                 } else {
    93                   results[i] = result;
    94                 }
    95 
    96                 Console.WriteLine("Probing...");
    97                 if (communicator.ImmediateProbe(client, 2) != null) {
    98                   finished[i] = true;
    99                   finishedCount++;
    100                 }
    101               }
    102             }
    103 
    104             Console.WriteLine("Update results");
    105             lock (broker.resultLocker)
    106               broker.Results = results;
    107           }
    108 
    109           lock (broker.ExitWaitHandle) {
    110             broker.Terminated = true;
    111           }
    112 
    113           broker.ExitWaitHandle.WaitOne();
    114           Console.WriteLine("Finished.");
    115           Thread.Sleep(1000);
    116           service.Close();
    117         } else {
    118           Program p = new Program();
    119           p.StartAlgorithm(communicator);
    120         }
     45        Program p = new Program();
     46        p.StartAlgorithm(fileName, resultName + MPI.Communicator.world.Rank + ".hl");
    12147      }
    12248    }
    12349
    124     private EventWaitHandle waitHandle;
     50    public void StartAlgorithm(string fileName, string resultName) {
     51      IAlgorithm alg = XmlParser.Deserialize<HeuristicLab.Optimization.IAlgorithm>(fileName);
    12552
    126     public void StartAlgorithm(MPI.Communicator communicator) {
    127       IAlgorithm alg = communicator.Receive<MPITransportWrapper<IAlgorithm>>(0, 0).InnerItem;
    128       int updateInterval = communicator.Receive<int>(0, 1);
    129 
    130       Console.WriteLine("Starting algorithm...");
     53      alg.Stopped += new EventHandler(algorithm_Stopped);
     54      waitHandle.Reset();
    13155
    13256      alg.Prepare(true);
    133       waitHandle = new EventWaitHandle(false, EventResetMode.ManualReset);
    134       alg.Started += new EventHandler(alg_Started);
    13557      alg.Start();
     58
     59      Thread.Sleep(10000);     
     60      Thread t = new Thread(delegate() {
     61        while (true) {
     62          if (alg.ExecutionState == Core.ExecutionState.Started) {
     63            alg.Pause();
     64
     65            while (alg.ExecutionState == Core.ExecutionState.Started)
     66              Thread.Sleep(100);
     67
     68            if (alg.Results.ContainsKey("Best valid Solution Distance")) {
     69              Console.WriteLine("BestDistance: " + alg.Results["Best valid Solution Distance"].Value.ToString());
     70            }
     71
     72            if (alg.Results.ContainsKey("Best valid Solution Vehicles")) {
     73              Console.WriteLine("BestVehicles: " + alg.Results["Best valid Solution Vehicles"].Value.ToString());
     74            }
     75
     76            XmlGenerator.Serialize(alg, resultName);
     77            alg.Start();
     78          }
     79
     80          Thread.Sleep(300000);
     81        }
     82      });
     83      t.IsBackground = true;
     84      t.Start();
    13685
    13786      waitHandle.WaitOne();
    13887
    139       alg.Started -= new EventHandler(alg_Started);
    140 
    141       while (alg.ExecutionState != ExecutionState.Stopped) {
    142         Console.WriteLine("Pausing alg...");
    143         alg.Pause();
    144 
    145         while (alg.ExecutionState == ExecutionState.Started) {
    146           Thread.Sleep(100);
    147         }
    148 
    149         communicator.Send<MPITransportWrapper<ResultCollection>>(
    150           new MPITransportWrapper<ResultCollection>(alg.Results), 0, 1);
    151 
    152         Console.WriteLine("Sending update...");
    153 
    154         Console.WriteLine("Resuming alg...");
    155         if (alg.ExecutionState == ExecutionState.Paused)
    156           alg.Start();
    157         Thread.Sleep(updateInterval);
    158       }
    159 
    160       communicator.Send<int>(communicator.Rank, 0, 2);
    161       communicator.Send<MPITransportWrapper<ResultCollection>>(
    162           new MPITransportWrapper<ResultCollection>(alg.Results), 0, 1);
     88      XmlGenerator.Serialize(alg, resultName);
    16389    }
    16490
    165     void alg_Started(object sender, EventArgs e) {
     91    void algorithm_Stopped(object sender, EventArgs e) {
    16692      waitHandle.Set();
    16793    }
  • branches/MPI/HeuristicLab.MPIEngine/3.3

    • Property svn:ignore
      •  

        old new  
        33bin
        44obj
         5Plugin.cs
  • branches/MPI/HeuristicLab.MPIEngine/3.3/HeuristicLab.MPIEngine-3.3.csproj

    r6398 r7205  
    2020    <DebugType>full</DebugType>
    2121    <Optimize>false</Optimize>
    22     <OutputPath>bin\Debug\</OutputPath>
     22    <OutputPath>..\..\..\..\trunk\sources\bin\</OutputPath>
    2323    <DefineConstants>DEBUG;TRACE</DefineConstants>
    2424    <ErrorReport>prompt</ErrorReport>
     
    104104  </PropertyGroup>
    105105  <ItemGroup>
    106     <Reference Include="HeuristicLab.Collections-3.3">
    107       <HintPath>..\..\..\..\..\..\Program Files\HeuristicLab 3.3\HeuristicLab.Collections-3.3.dll</HintPath>
    108     </Reference>
    109     <Reference Include="HeuristicLab.Common-3.3">
    110       <HintPath>..\..\..\..\..\..\Program Files\HeuristicLab 3.3\HeuristicLab.Common-3.3.dll</HintPath>
    111     </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>
    115     <Reference Include="HeuristicLab.Core-3.3">
    116       <HintPath>..\..\..\..\..\..\Program Files\HeuristicLab 3.3\HeuristicLab.Core-3.3.dll</HintPath>
    117     </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>
    127     <Reference Include="HeuristicLab.Optimization-3.3">
    128       <HintPath>..\..\..\..\..\..\Program Files\HeuristicLab 3.3\HeuristicLab.Optimization-3.3.dll</HintPath>
    129     </Reference>
    130     <Reference Include="HeuristicLab.Persistence-3.3">
    131       <HintPath>..\..\..\..\..\..\Program Files\HeuristicLab 3.3\HeuristicLab.Persistence-3.3.dll</HintPath>
    132     </Reference>
    133     <Reference Include="HeuristicLab.PluginInfrastructure-3.3">
    134       <HintPath>..\..\..\..\..\..\Program Files\HeuristicLab 3.3\HeuristicLab.PluginInfrastructure-3.3.dll</HintPath>
    135     </Reference>
    136     <Reference Include="HeuristicLab.SequentialEngine-3.3">
    137       <HintPath>..\..\..\..\..\..\Program Files\HeuristicLab 3.3\HeuristicLab.SequentialEngine-3.3.dll</HintPath>
     106    <Reference Include="HeuristicLab.Collections-3.3, Version=3.3.0.0, Culture=neutral, PublicKeyToken=ba48961d6f65dcec, processorArchitecture=MSIL">
     107      <HintPath>..\..\..\..\trunk\sources\bin\HeuristicLab.Collections-3.3.dll</HintPath>
     108      <Private>False</Private>
     109    </Reference>
     110    <Reference Include="HeuristicLab.Common-3.3, Version=3.3.0.0, Culture=neutral, PublicKeyToken=ba48961d6f65dcec, processorArchitecture=MSIL">
     111      <HintPath>..\..\..\..\trunk\sources\bin\HeuristicLab.Common-3.3.dll</HintPath>
     112      <Private>False</Private>
     113    </Reference>
     114    <Reference Include="HeuristicLab.Core-3.3, Version=3.3.0.0, Culture=neutral, PublicKeyToken=ba48961d6f65dcec, processorArchitecture=MSIL">
     115      <HintPath>..\..\..\..\trunk\sources\bin\HeuristicLab.Core-3.3.dll</HintPath>
     116      <Private>False</Private>
     117    </Reference>
     118    <Reference Include="HeuristicLab.Core.Views-3.3, Version=3.3.0.0, Culture=neutral, PublicKeyToken=ba48961d6f65dcec, processorArchitecture=MSIL">
     119      <HintPath>..\..\..\..\trunk\sources\bin\HeuristicLab.Core.Views-3.3.dll</HintPath>
     120      <Private>False</Private>
     121    </Reference>
     122    <Reference Include="HeuristicLab.MainForm-3.3, Version=3.3.0.0, Culture=neutral, PublicKeyToken=ba48961d6f65dcec, processorArchitecture=MSIL">
     123      <HintPath>..\..\..\..\trunk\sources\bin\HeuristicLab.MainForm-3.3.dll</HintPath>
     124      <Private>False</Private>
     125    </Reference>
     126    <Reference Include="HeuristicLab.MainForm.WindowsForms-3.3, Version=3.3.0.0, Culture=neutral, PublicKeyToken=ba48961d6f65dcec, processorArchitecture=MSIL">
     127      <HintPath>..\..\..\..\trunk\sources\bin\HeuristicLab.MainForm.WindowsForms-3.3.dll</HintPath>
     128      <Private>False</Private>
     129    </Reference>
     130    <Reference Include="HeuristicLab.Optimization-3.3, Version=3.3.0.0, Culture=neutral, PublicKeyToken=ba48961d6f65dcec, processorArchitecture=MSIL">
     131      <HintPath>..\..\..\..\trunk\sources\bin\HeuristicLab.Optimization-3.3.dll</HintPath>
     132      <Private>False</Private>
     133    </Reference>
     134    <Reference Include="HeuristicLab.Persistence-3.3, Version=3.3.0.0, Culture=neutral, PublicKeyToken=ba48961d6f65dcec, processorArchitecture=MSIL">
     135      <HintPath>..\..\..\..\trunk\sources\bin\HeuristicLab.Persistence-3.3.dll</HintPath>
     136      <Private>False</Private>
     137    </Reference>
     138    <Reference Include="HeuristicLab.PluginInfrastructure-3.3, Version=3.3.0.0, Culture=neutral, PublicKeyToken=ba48961d6f65dcec, processorArchitecture=MSIL">
     139      <HintPath>..\..\..\..\trunk\sources\bin\HeuristicLab.PluginInfrastructure-3.3.dll</HintPath>
     140      <Private>False</Private>
     141    </Reference>
     142    <Reference Include="HeuristicLab.SequentialEngine-3.3, Version=3.3.0.0, Culture=neutral, PublicKeyToken=ba48961d6f65dcec, processorArchitecture=MSIL">
     143      <HintPath>..\..\..\..\trunk\sources\bin\HeuristicLab.SequentialEngine-3.3.dll</HintPath>
     144      <Private>False</Private>
    138145    </Reference>
    139146    <Reference Include="Microsoft.Hpc.Scheduler, Version=2.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
    140147      <HintPath>..\..\HeuristicLab.ExtLibs\HeuristicLab.MPInet\MPIAlgorithmRunner\3.3\Microsoft.Hpc.Scheduler.dll</HintPath>
     148      <Private>True</Private>
    141149    </Reference>
    142150    <Reference Include="Microsoft.Hpc.Scheduler.Properties, Version=2.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
    143151      <HintPath>..\..\Microsoft.Hpc.Scheduler.Properties.dll</HintPath>
     152      <Private>True</Private>
    144153    </Reference>
    145154    <Reference Include="System" />
     
    161170      <DependentUpon>MPIEngineView.cs</DependentUpon>
    162171    </Compile>
    163     <Compile Include="HeuristicLabMPIEnginePlugin.cs" />
     172    <Compile Include="Plugin.cs" />
    164173    <Compile Include="Properties\AssemblyInfo.cs" />
    165174    <Compile Include="MPIEngine.cs" />
    166175  </ItemGroup>
    167176  <ItemGroup>
     177    <None Include="Properties\AssemblyInfo.cs.frame" />
    168178    <None Include="HeuristicLab.snk" />
    169     <None Include="HeuristicLabMPIEnginePlugin.cs.frame" />
    170     <None Include="Properties\AssemblyInfo.frame" />
     179    <None Include="Plugin.cs.frame" />
    171180  </ItemGroup>
    172181  <ItemGroup>
     
    174183      <Project>{62C3B458-430E-4EF4-8250-C50BCF94D035}</Project>
    175184      <Name>HeuristicLab.MPIAlgorithmRunner-3.3</Name>
     185      <Private>False</Private>
    176186    </ProjectReference>
    177187    <ProjectReference Include="..\..\HeuristicLab.Operators.MPISupport\3.3\HeuristicLab.Operators.MPISupport-3.3.csproj">
    178188      <Project>{6BD69CDA-4875-4045-8B35-6FD4602854F5}</Project>
    179189      <Name>HeuristicLab.Operators.MPISupport-3.3</Name>
     190      <Private>False</Private>
    180191    </ProjectReference>
    181192  </ItemGroup>
     
    187198set Outdir=$(Outdir)
    188199
    189 call PreBuildEvent.cmd
    190 SubWCRev "%25ProjectDir%25\" "%25ProjectDir%25\HeuristicLabMPIEnginePlugin.cs.frame" "%25ProjectDir%25\HeuristicLabMPIEnginePlugin.cs"</PreBuildEvent>
    191   </PropertyGroup>
    192   <PropertyGroup>
    193     <PostBuildEvent>set ProjectName=$(ProjectName)
    194 set Source=$(TargetPath)
    195 set Configuration=$(ConfigurationName)
    196 set Platform=$(PlatformName)
    197 set SolutionDir=$(SolutionDir)
    198 
    199 if exist "$(SolutionDir)CustomPostBuild.cmd" call "$(SolutionDir)CustomPostBuild.cmd"</PostBuildEvent>
     200call PreBuildEvent.cmd</PreBuildEvent>
     201  </PropertyGroup>
     202  <PropertyGroup>
     203    <PostBuildEvent>
     204    </PostBuildEvent>
    200205  </PropertyGroup>
    201206  <!-- To modify your build process, add your task inside one of the targets below and uncomment it.
  • branches/MPI/HeuristicLab.Operators.MPISupport/3.3

    • Property svn:ignore
      •  

        old new  
        33obj
        44HeuristicLabOperatorsMPISupportPlugin.cs
         5Plugin.cs
  • branches/MPI/HeuristicLab.Operators.MPISupport/3.3/HeuristicLab.Operators.MPISupport-3.3.csproj

    r6393 r7205  
    4141    <DebugType>full</DebugType>
    4242    <Optimize>false</Optimize>
    43     <OutputPath>bin\Debug\</OutputPath>
     43    <OutputPath>..\..\..\..\trunk\sources\bin\</OutputPath>
    4444    <DefineConstants>DEBUG;TRACE</DefineConstants>
    4545    <ErrorReport>prompt</ErrorReport>
     
    9696  </PropertyGroup>
    9797  <ItemGroup>
    98     <Reference Include="Accessibility">
    99       <EmbedInteropTypes>True</EmbedInteropTypes>
     98    <Reference Include="HeuristicLab.Collections-3.3, Version=3.3.0.0, Culture=neutral, PublicKeyToken=ba48961d6f65dcec, processorArchitecture=MSIL">
     99      <HintPath>..\..\..\..\trunk\sources\bin\HeuristicLab.Collections-3.3.dll</HintPath>
     100      <Private>False</Private>
    100101    </Reference>
    101     <Reference Include="HeuristicLab.Collections-3.3">
    102       <HintPath>..\..\..\..\..\..\Program Files\HeuristicLab 3.3\HeuristicLab.Collections-3.3.dll</HintPath>
     102    <Reference Include="HeuristicLab.Common-3.3, Version=3.3.0.0, Culture=neutral, PublicKeyToken=ba48961d6f65dcec, processorArchitecture=MSIL">
     103      <HintPath>..\..\..\..\trunk\sources\bin\HeuristicLab.Common-3.3.dll</HintPath>
     104      <Private>False</Private>
    103105    </Reference>
    104     <Reference Include="HeuristicLab.Common-3.3">
    105       <HintPath>..\..\..\..\..\..\Program Files\HeuristicLab 3.3\HeuristicLab.Common-3.3.dll</HintPath>
     106    <Reference Include="HeuristicLab.Core-3.3, Version=3.3.0.0, Culture=neutral, PublicKeyToken=ba48961d6f65dcec, processorArchitecture=MSIL">
     107      <HintPath>..\..\..\..\trunk\sources\bin\HeuristicLab.Core-3.3.dll</HintPath>
     108      <Private>False</Private>
    106109    </Reference>
    107     <Reference Include="HeuristicLab.Core-3.3">
    108       <HintPath>..\..\..\..\..\..\Program Files\HeuristicLab 3.3\HeuristicLab.Core-3.3.dll</HintPath>
     110    <Reference Include="HeuristicLab.Operators-3.3, Version=3.3.0.0, Culture=neutral, PublicKeyToken=ba48961d6f65dcec, processorArchitecture=MSIL">
     111      <HintPath>..\..\..\..\trunk\sources\bin\HeuristicLab.Operators-3.3.dll</HintPath>
     112      <Private>False</Private>
    109113    </Reference>
    110     <Reference Include="HeuristicLab.Operators-3.3">
    111       <HintPath>..\..\..\..\..\..\Program Files\HeuristicLab 3.3\HeuristicLab.Operators-3.3.dll</HintPath>
     114    <Reference Include="HeuristicLab.Optimization-3.3, Version=3.3.0.0, Culture=neutral, PublicKeyToken=ba48961d6f65dcec, processorArchitecture=MSIL">
     115      <HintPath>..\..\..\..\trunk\sources\bin\HeuristicLab.Optimization-3.3.dll</HintPath>
     116      <Private>False</Private>
    112117    </Reference>
    113     <Reference Include="HeuristicLab.Optimization-3.3">
    114       <HintPath>..\..\..\..\..\..\Program Files\HeuristicLab 3.3\HeuristicLab.Optimization-3.3.dll</HintPath>
     118    <Reference Include="HeuristicLab.Persistence-3.3, Version=3.3.0.0, Culture=neutral, PublicKeyToken=ba48961d6f65dcec, processorArchitecture=MSIL">
     119      <HintPath>..\..\..\..\trunk\sources\bin\HeuristicLab.Persistence-3.3.dll</HintPath>
     120      <Private>False</Private>
    115121    </Reference>
    116     <Reference Include="HeuristicLab.Persistence-3.3">
    117       <HintPath>..\..\..\..\..\..\Program Files\HeuristicLab 3.3\HeuristicLab.Persistence-3.3.dll</HintPath>
    118     </Reference>
    119     <Reference Include="HeuristicLab.PluginInfrastructure-3.3">
    120       <HintPath>..\..\..\..\..\..\Program Files\HeuristicLab 3.3\HeuristicLab.PluginInfrastructure-3.3.dll</HintPath>
     122    <Reference Include="HeuristicLab.PluginInfrastructure-3.3, Version=3.3.0.0, Culture=neutral, PublicKeyToken=ba48961d6f65dcec, processorArchitecture=MSIL">
     123      <HintPath>..\..\..\..\trunk\sources\bin\HeuristicLab.PluginInfrastructure-3.3.dll</HintPath>
     124      <Private>False</Private>
    121125    </Reference>
    122126    <Reference Include="MPI, Version=1.0.0.0, Culture=neutral, PublicKeyToken=29b4a045737654fe, processorArchitecture=MSIL">
     
    136140  </ItemGroup>
    137141  <ItemGroup>
    138     <None Include="HeuristicLabOperatorsMPISupportPlugin.cs.frame" />
    139     <Compile Include="HeuristicLabOperatorsMPISupportPlugin.cs" />
    140142    <Compile Include="MPITransportWrapper.cs" />
    141143    <Compile Include="MPIUnidirectionalRingMigrator.cs" />
     144    <Compile Include="Plugin.cs" />
    142145    <Compile Include="Properties\AssemblyInfo.cs" />
    143146  </ItemGroup>
    144147  <ItemGroup>
     148    <None Include="Properties\AssemblyInfo.cs.frame" />
    145149    <None Include="HeuristicLab.snk" />
    146     <None Include="Properties\AssemblyInfo.frame" />
     150    <None Include="Plugin.cs.frame" />
    147151  </ItemGroup>
    148152  <ItemGroup>
     
    177181set Outdir=$(Outdir)
    178182
    179 call PreBuildEvent.cmd
    180 SubWCRev "%25ProjectDir%25\" "%25ProjectDir%25\HeuristicLabOperatorsMPISupportPlugin.cs.frame" "%25ProjectDir%25\HeuristicLabOperatorsMPISupportPlugin.cs"</PreBuildEvent>
     183call PreBuildEvent.cmd</PreBuildEvent>
    181184  </PropertyGroup>
    182185  <PropertyGroup>
    183     <PostBuildEvent>set ProjectName=$(ProjectName)
    184 set Source=$(TargetPath)
    185 set Configuration=$(ConfigurationName)
    186 set Platform=$(PlatformName)
    187 set SolutionDir=$(SolutionDir)
    188 
    189 if exist "$(SolutionDir)CustomPostBuild.cmd" call "$(SolutionDir)CustomPostBuild.cmd"</PostBuildEvent>
     186    <PostBuildEvent>
     187    </PostBuildEvent>
    190188  </PropertyGroup>
    191189</Project>
  • branches/MPI/HeuristicLab.Operators.MPISupport/3.3/MPIUnidirectionalRingMigrator.cs

    r6354 r7205  
    4848      if (MPI.Communicator.world != null) {
    4949        int size = MPI.Communicator.world.Size;
    50         if (size > 2) {
     50        if (size > 1) {
    5151          int i = MPI.Communicator.world.Rank;
    5252          IScope scope = ExecutionContext.Scope;
     
    5656          int recipent = i + 1;
    5757          if (recipent == size)
    58             recipent = 1;
     58            recipent = 0;
    5959
    6060          Console.WriteLine("MIGRATE " + i + " TO " + recipent);
     
    6464          IScope immigrants = null;
    6565          int sender = i - 1;
    66           if (sender < 1)
     66          if (sender < 0)
    6767            sender = size - 1;
    6868
  • branches/MPI/PreBuildEvent.cmd

    r6393 r7205  
    1 SubWCRev "%ProjectDir%\" "%ProjectDir%\Properties\AssemblyInfo.frame" "%ProjectDir%\Properties\AssemblyInfo.cs"
     1IF EXIST "%ProjectDir%\Properties\AssemblyInfo.cs.frame" SubWCRev "%ProjectDir%\" "%ProjectDir%\Properties\AssemblyInfo.cs.frame" "%ProjectDir%\Properties\AssemblyInfo.cs"
     2IF EXIST "%ProjectDir%\Plugin.cs.frame" SubWCRev "%ProjectDir%\" "%ProjectDir%\Plugin.cs.frame" "%ProjectDir%\Plugin.cs"
Note: See TracChangeset for help on using the changeset viewer.