Repository: incubator-reef Updated Branches: refs/heads/master e1be758b5 -> c330dcff5
http://git-wip-us.apache.org/repos/asf/incubator-reef/blob/c330dcff/lang/cs/Org.Apache.REEF.Network/Group/Task/Impl/CommunicationGroupClient.cs ---------------------------------------------------------------------- diff --git a/lang/cs/Org.Apache.REEF.Network/Group/Task/Impl/CommunicationGroupClient.cs b/lang/cs/Org.Apache.REEF.Network/Group/Task/Impl/CommunicationGroupClient.cs index a4d9e70..3fcdc2f 100644 --- a/lang/cs/Org.Apache.REEF.Network/Group/Task/Impl/CommunicationGroupClient.cs +++ b/lang/cs/Org.Apache.REEF.Network/Group/Task/Impl/CommunicationGroupClient.cs @@ -36,7 +36,7 @@ using Org.Apache.REEF.Utilities.Logging; namespace Org.Apache.REEF.Network.Group.Task.Impl { /// <summary> - /// Used by Tasks to fetch MPI Operators in the group configured by the driver. + /// Used by Tasks to fetch Group Communication Operators in the group configured by the driver. /// </summary> public class CommunicationGroupClient : ICommunicationGroupClient { @@ -48,7 +48,7 @@ namespace Org.Apache.REEF.Network.Group.Task.Impl private readonly Dictionary<string, IInjector> _operatorInjectors; private readonly Dictionary<string, object> _operators; private readonly NetworkService<GroupCommunicationMessage> _networkService; - private readonly IMpiNetworkObserver _mpiNetworkHandler; + private readonly IGroupCommNetworkObserver _groupCommNetworkHandler; private readonly ICommunicationGroupNetworkObserver _commGroupNetworkHandler; /// <summary> @@ -58,17 +58,17 @@ namespace Org.Apache.REEF.Network.Group.Task.Impl /// <param name="groupName">The name of the CommunicationGroup</param> /// <param name="driverId">The identifier for the driver</param> /// <param name="operatorConfigs">The serialized operator configurations</param> - /// <param name="mpiNetworkObserver">The handler for all incoming messages + /// <param name="groupCommNetworkObserver">The handler for all incoming messages /// across all Communication Groups</param> /// <param name="networkService">The network service used to send messages.</param> /// <param name="configSerializer">Used to deserialize operator configuration.</param> [Inject] public CommunicationGroupClient( [Parameter(typeof(TaskConfigurationOptions.Identifier))] string taskId, - [Parameter(typeof(MpiConfigurationOptions.CommunicationGroupName))] string groupName, - [Parameter(typeof(MpiConfigurationOptions.DriverId))] string driverId, - [Parameter(typeof(MpiConfigurationOptions.SerializedOperatorConfigs))] ISet<string> operatorConfigs, - IMpiNetworkObserver mpiNetworkObserver, + [Parameter(typeof(GroupCommConfigurationOptions.CommunicationGroupName))] string groupName, + [Parameter(typeof(GroupCommConfigurationOptions.DriverId))] string driverId, + [Parameter(typeof(GroupCommConfigurationOptions.SerializedOperatorConfigs))] ISet<string> operatorConfigs, + IGroupCommNetworkObserver groupCommNetworkObserver, NetworkService<GroupCommunicationMessage> networkService, AvroConfigurationSerializer configSerializer, CommunicationGroupNetworkObserver commGroupNetworkHandler) @@ -81,20 +81,20 @@ namespace Org.Apache.REEF.Network.Group.Task.Impl _operatorInjectors = new Dictionary<string, IInjector>(); _networkService = networkService; - _mpiNetworkHandler = mpiNetworkObserver; + _groupCommNetworkHandler = groupCommNetworkObserver; _commGroupNetworkHandler = commGroupNetworkHandler; - _mpiNetworkHandler.Register(groupName, _commGroupNetworkHandler); + _groupCommNetworkHandler.Register(groupName, _commGroupNetworkHandler); // Deserialize operator configuration and store each injector. - // When user requests the MPI Operator, use type information to + // When user requests the Group Communication Operator, use type information to // create the instance. foreach (string operatorConfigStr in operatorConfigs) { IConfiguration operatorConfig = configSerializer.FromString(operatorConfigStr); IInjector injector = TangFactory.GetTang().NewInjector(operatorConfig); - string operatorName = injector.GetNamedInstance<MpiConfigurationOptions.OperatorName, string>( - GenericType<MpiConfigurationOptions.OperatorName>.Class); + string operatorName = injector.GetNamedInstance<GroupCommConfigurationOptions.OperatorName, string>( + GenericType<GroupCommConfigurationOptions.OperatorName>.Class); _operatorInjectors[operatorName] = injector; } } @@ -171,14 +171,14 @@ namespace Org.Apache.REEF.Network.Group.Task.Impl } /// <summary> - /// Gets the MPI operator with the specified name and type. + /// Gets the Group Communication operator with the specified name and type. /// If the operator hasn't been instanciated yet, find the injector /// associated with the given operator name and use the type information /// to create a new operator of that type. /// </summary> /// <typeparam name="T">The type of operator to create</typeparam> /// <param name="operatorName">The name of the operator</param> - /// <returns>The newly created MPI Operator</returns> + /// <returns>The newly created Group Communication Operator</returns> private T GetOperatorInstance<T>(string operatorName) where T : class { if (string.IsNullOrEmpty(operatorName)) @@ -196,7 +196,7 @@ namespace Org.Apache.REEF.Network.Group.Task.Impl IInjector injector = _operatorInjectors[operatorName]; injector.BindVolatileParameter(GenericType<TaskConfigurationOptions.Identifier>.Class, _taskId); - injector.BindVolatileParameter(GenericType<MpiConfigurationOptions.CommunicationGroupName>.Class, GroupName); + injector.BindVolatileParameter(GenericType<GroupCommConfigurationOptions.CommunicationGroupName>.Class, GroupName); injector.BindVolatileInstance(GenericType<ICommunicationGroupNetworkObserver>.Class, _commGroupNetworkHandler); injector.BindVolatileInstance(GenericType<NetworkService<GroupCommunicationMessage>>.Class, _networkService); injector.BindVolatileInstance(GenericType<ICommunicationGroupClient>.Class, this); @@ -208,7 +208,7 @@ namespace Org.Apache.REEF.Network.Group.Task.Impl } catch (InjectionException) { - LOGGER.Log(Level.Error, "Cannot inject MPI operator: No known operator of type: {0}", typeof(T)); + LOGGER.Log(Level.Error, "Cannot inject Group Communication operator: No known operator of type: {0}", typeof(T)); throw; } } http://git-wip-us.apache.org/repos/asf/incubator-reef/blob/c330dcff/lang/cs/Org.Apache.REEF.Network/Group/Task/Impl/CommunicationGroupNetworkObserver.cs ---------------------------------------------------------------------- diff --git a/lang/cs/Org.Apache.REEF.Network/Group/Task/Impl/CommunicationGroupNetworkObserver.cs b/lang/cs/Org.Apache.REEF.Network/Group/Task/Impl/CommunicationGroupNetworkObserver.cs index 20f17ec..444c4a1 100644 --- a/lang/cs/Org.Apache.REEF.Network/Group/Task/Impl/CommunicationGroupNetworkObserver.cs +++ b/lang/cs/Org.Apache.REEF.Network/Group/Task/Impl/CommunicationGroupNetworkObserver.cs @@ -43,8 +43,8 @@ namespace Org.Apache.REEF.Network.Group.Task.Impl /// </summary> [Inject] public CommunicationGroupNetworkObserver( - [Parameter(typeof(MpiConfigurationOptions.RetryCountWaitingForHanler))] int retryCount, - [Parameter(typeof(MpiConfigurationOptions.SleepTimeWaitingForHandler))] int sleepTime) + [Parameter(typeof(GroupCommConfigurationOptions.RetryCountWaitingForHanler))] int retryCount, + [Parameter(typeof(GroupCommConfigurationOptions.SleepTimeWaitingForHandler))] int sleepTime) { _handlers = new Dictionary<string, IObserver<GroupCommunicationMessage>>(); _retryCount = retryCount; http://git-wip-us.apache.org/repos/asf/incubator-reef/blob/c330dcff/lang/cs/Org.Apache.REEF.Network/Group/Task/Impl/GroupCommClient.cs ---------------------------------------------------------------------- diff --git a/lang/cs/Org.Apache.REEF.Network/Group/Task/Impl/GroupCommClient.cs b/lang/cs/Org.Apache.REEF.Network/Group/Task/Impl/GroupCommClient.cs new file mode 100644 index 0000000..4f0f283 --- /dev/null +++ b/lang/cs/Org.Apache.REEF.Network/Group/Task/Impl/GroupCommClient.cs @@ -0,0 +1,107 @@ +/** + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ + +using System; +using System.Collections.Generic; +using Org.Apache.REEF.Common.Tasks; +using Org.Apache.REEF.Network.Group.Config; +using Org.Apache.REEF.Network.Group.Driver.Impl; +using Org.Apache.REEF.Network.NetworkService; +using Org.Apache.REEF.Tang.Annotations; +using Org.Apache.REEF.Tang.Formats; +using Org.Apache.REEF.Tang.Implementations.Tang; +using Org.Apache.REEF.Tang.Interface; +using Org.Apache.REEF.Tang.Util; +using Org.Apache.REEF.Wake.Remote.Impl; + +namespace Org.Apache.REEF.Network.Group.Task.Impl +{ + /// <summary> + /// Used by Tasks to fetch CommunicationGroupClients. + /// </summary> + public class GroupCommClient : IGroupCommClient + { + private readonly Dictionary<string, ICommunicationGroupClient> _commGroups; + + private readonly INetworkService<GroupCommunicationMessage> _networkService; + + /// <summary> + /// Creates a new GroupCommClient and registers the task ID with the Name Server. + /// </summary> + /// <param name="groupConfigs">The set of serialized Group Communication configurations</param> + /// <param name="taskId">The identifier for this task</param> + /// <param name="groupCommNetworkObserver">The network handler to receive incoming messages + /// for this task</param> + /// <param name="networkService">The network service used to send messages</param> + /// <param name="configSerializer">Used to deserialize Group Communication configuration</param> + [Inject] + public GroupCommClient( + [Parameter(typeof(GroupCommConfigurationOptions.SerializedGroupConfigs))] ISet<string> groupConfigs, + [Parameter(typeof(TaskConfigurationOptions.Identifier))] string taskId, + IGroupCommNetworkObserver groupCommNetworkObserver, + NetworkService<GroupCommunicationMessage> networkService, + AvroConfigurationSerializer configSerializer) + { + _commGroups = new Dictionary<string, ICommunicationGroupClient>(); + _networkService = networkService; + networkService.Register(new StringIdentifier(taskId)); + + foreach (string serializedGroupConfig in groupConfigs) + { + IConfiguration groupConfig = configSerializer.FromString(serializedGroupConfig); + + IInjector injector = TangFactory.GetTang().NewInjector(groupConfig); + injector.BindVolatileParameter(GenericType<TaskConfigurationOptions.Identifier>.Class, taskId); + injector.BindVolatileInstance(GenericType<IGroupCommNetworkObserver>.Class, groupCommNetworkObserver); + injector.BindVolatileInstance(GenericType<NetworkService<GroupCommunicationMessage>>.Class, networkService); + + ICommunicationGroupClient commGroup = injector.GetInstance<ICommunicationGroupClient>(); + _commGroups[commGroup.GroupName] = commGroup; + } + } + + /// <summary> + /// Gets the CommunicationGroupClient for the given group name. + /// </summary> + /// <param name="groupName">The name of the CommunicationGroupClient</param> + /// <returns>The CommunicationGroupClient</returns> + public ICommunicationGroupClient GetCommunicationGroup(string groupName) + { + if (string.IsNullOrEmpty(groupName)) + { + throw new ArgumentNullException("groupName"); + } + if (!_commGroups.ContainsKey(groupName)) + { + throw new ArgumentException("No CommunicationGroupClient with name: " + groupName); + } + + return _commGroups[groupName]; + } + + /// <summary> + /// Disposes of the GroupCommClient's services. + /// </summary> + public void Dispose() + { + _networkService.Unregister(); + _networkService.Dispose(); + } + } +} http://git-wip-us.apache.org/repos/asf/incubator-reef/blob/c330dcff/lang/cs/Org.Apache.REEF.Network/Group/Task/Impl/GroupCommNetworkObserver.cs ---------------------------------------------------------------------- diff --git a/lang/cs/Org.Apache.REEF.Network/Group/Task/Impl/GroupCommNetworkObserver.cs b/lang/cs/Org.Apache.REEF.Network/Group/Task/Impl/GroupCommNetworkObserver.cs new file mode 100644 index 0000000..5604885 --- /dev/null +++ b/lang/cs/Org.Apache.REEF.Network/Group/Task/Impl/GroupCommNetworkObserver.cs @@ -0,0 +1,108 @@ +/** + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ + +using System; +using System.Collections.Generic; +using System.Linq; +using Org.Apache.REEF.Network.Group.Driver.Impl; +using Org.Apache.REEF.Network.NetworkService; +using Org.Apache.REEF.Tang.Annotations; +using Org.Apache.REEF.Utilities.Logging; + +namespace Org.Apache.REEF.Network.Group.Task.Impl +{ + /// <summary> + /// Handles all incoming messages for this Task. + /// </summary> + public class GroupCommNetworkObserver : IGroupCommNetworkObserver + { + private static readonly Logger LOGGER = Logger.GetLogger(typeof(GroupCommNetworkObserver)); + + private readonly Dictionary<string, IObserver<GroupCommunicationMessage>> _commGroupHandlers; + + /// <summary> + /// Creates a new GroupCommNetworkObserver. + /// </summary> + [Inject] + public GroupCommNetworkObserver() + { + _commGroupHandlers = new Dictionary<string, IObserver<GroupCommunicationMessage>>(); + } + + /// <summary> + /// Handles the incoming NsMessage for this Task. + /// Delegates the GroupCommunicationMessage to the correct + /// CommunicationGroupNetworkObserver. + /// </summary> + /// <param name="nsMessage"></param> + public void OnNext(NsMessage<GroupCommunicationMessage> nsMessage) + { + if (nsMessage == null) + { + throw new ArgumentNullException("nsMessage"); + } + + try + { + GroupCommunicationMessage gcm = nsMessage.Data.First(); + _commGroupHandlers[gcm.GroupName].OnNext(gcm); + } + catch (InvalidOperationException) + { + LOGGER.Log(Level.Error, "Group Communication Network Handler received message with no data"); + throw; + } + catch (KeyNotFoundException) + { + LOGGER.Log(Level.Error, "Group Communication Network Handler received message for nonexistant group"); + throw; + } + } + + /// <summary> + /// Registers the network handler for the given CommunicationGroup. + /// When messages are sent to the specified group name, the given handler + /// will be invoked with that message. + /// </summary> + /// <param name="groupName">The group name for the network handler</param> + /// <param name="commGroupHandler">The network handler to invoke when + /// messages are sent to the given group.</param> + public void Register(string groupName, IObserver<GroupCommunicationMessage> commGroupHandler) + { + if (string.IsNullOrEmpty(groupName)) + { + throw new ArgumentNullException("groupName"); + } + if (commGroupHandler == null) + { + throw new ArgumentNullException("commGroupHandler"); + } + + _commGroupHandlers[groupName] = commGroupHandler; + } + + public void OnError(Exception error) + { + } + + public void OnCompleted() + { + } + } +} http://git-wip-us.apache.org/repos/asf/incubator-reef/blob/c330dcff/lang/cs/Org.Apache.REEF.Network/Group/Task/Impl/MpiClient.cs ---------------------------------------------------------------------- diff --git a/lang/cs/Org.Apache.REEF.Network/Group/Task/Impl/MpiClient.cs b/lang/cs/Org.Apache.REEF.Network/Group/Task/Impl/MpiClient.cs deleted file mode 100644 index 97a43ea..0000000 --- a/lang/cs/Org.Apache.REEF.Network/Group/Task/Impl/MpiClient.cs +++ /dev/null @@ -1,107 +0,0 @@ -/** - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ - -using System; -using System.Collections.Generic; -using Org.Apache.REEF.Common.Tasks; -using Org.Apache.REEF.Network.Group.Config; -using Org.Apache.REEF.Network.Group.Driver.Impl; -using Org.Apache.REEF.Network.NetworkService; -using Org.Apache.REEF.Tang.Annotations; -using Org.Apache.REEF.Tang.Formats; -using Org.Apache.REEF.Tang.Implementations.Tang; -using Org.Apache.REEF.Tang.Interface; -using Org.Apache.REEF.Tang.Util; -using Org.Apache.REEF.Wake.Remote.Impl; - -namespace Org.Apache.REEF.Network.Group.Task.Impl -{ - /// <summary> - /// Used by Tasks to fetch CommunicationGroupClients. - /// </summary> - public class MpiClient : IMpiClient - { - private readonly Dictionary<string, ICommunicationGroupClient> _commGroups; - - private readonly INetworkService<GroupCommunicationMessage> _networkService; - - /// <summary> - /// Creates a new MpiClient and registers the task ID with the Name Server. - /// </summary> - /// <param name="groupConfigs">The set of serialized Group Communication configurations</param> - /// <param name="taskId">The identifier for this task</param> - /// <param name="mpiNetworkObserver">The network handler to receive incoming messages - /// for this task</param> - /// <param name="networkService">The network service used to send messages</param> - /// <param name="configSerializer">Used to deserialize Group Communication configuration</param> - [Inject] - public MpiClient( - [Parameter(typeof(MpiConfigurationOptions.SerializedGroupConfigs))] ISet<string> groupConfigs, - [Parameter(typeof(TaskConfigurationOptions.Identifier))] string taskId, - IMpiNetworkObserver mpiNetworkObserver, - NetworkService<GroupCommunicationMessage> networkService, - AvroConfigurationSerializer configSerializer) - { - _commGroups = new Dictionary<string, ICommunicationGroupClient>(); - _networkService = networkService; - networkService.Register(new StringIdentifier(taskId)); - - foreach (string serializedGroupConfig in groupConfigs) - { - IConfiguration groupConfig = configSerializer.FromString(serializedGroupConfig); - - IInjector injector = TangFactory.GetTang().NewInjector(groupConfig); - injector.BindVolatileParameter(GenericType<TaskConfigurationOptions.Identifier>.Class, taskId); - injector.BindVolatileInstance(GenericType<IMpiNetworkObserver>.Class, mpiNetworkObserver); - injector.BindVolatileInstance(GenericType<NetworkService<GroupCommunicationMessage>>.Class, networkService); - - ICommunicationGroupClient commGroup = injector.GetInstance<ICommunicationGroupClient>(); - _commGroups[commGroup.GroupName] = commGroup; - } - } - - /// <summary> - /// Gets the CommunicationGroupClient for the given group name. - /// </summary> - /// <param name="groupName">The name of the CommunicationGroupClient</param> - /// <returns>The CommunicationGroupClient</returns> - public ICommunicationGroupClient GetCommunicationGroup(string groupName) - { - if (string.IsNullOrEmpty(groupName)) - { - throw new ArgumentNullException("groupName"); - } - if (!_commGroups.ContainsKey(groupName)) - { - throw new ArgumentException("No CommunicationGroupClient with name: " + groupName); - } - - return _commGroups[groupName]; - } - - /// <summary> - /// Disposes of the MpiClient's services. - /// </summary> - public void Dispose() - { - _networkService.Unregister(); - _networkService.Dispose(); - } - } -} http://git-wip-us.apache.org/repos/asf/incubator-reef/blob/c330dcff/lang/cs/Org.Apache.REEF.Network/Group/Task/Impl/MpiNetworkObserver.cs ---------------------------------------------------------------------- diff --git a/lang/cs/Org.Apache.REEF.Network/Group/Task/Impl/MpiNetworkObserver.cs b/lang/cs/Org.Apache.REEF.Network/Group/Task/Impl/MpiNetworkObserver.cs deleted file mode 100644 index 10a2ba5..0000000 --- a/lang/cs/Org.Apache.REEF.Network/Group/Task/Impl/MpiNetworkObserver.cs +++ /dev/null @@ -1,108 +0,0 @@ -/** - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ - -using System; -using System.Collections.Generic; -using System.Linq; -using Org.Apache.REEF.Network.Group.Driver.Impl; -using Org.Apache.REEF.Network.NetworkService; -using Org.Apache.REEF.Tang.Annotations; -using Org.Apache.REEF.Utilities.Logging; - -namespace Org.Apache.REEF.Network.Group.Task.Impl -{ - /// <summary> - /// Handles all incoming messages for this Task. - /// </summary> - public class MpiNetworkObserver : IMpiNetworkObserver - { - private static readonly Logger LOGGER = Logger.GetLogger(typeof(MpiNetworkObserver)); - - private readonly Dictionary<string, IObserver<GroupCommunicationMessage>> _commGroupHandlers; - - /// <summary> - /// Creates a new MpiNetworkObserver. - /// </summary> - [Inject] - public MpiNetworkObserver() - { - _commGroupHandlers = new Dictionary<string, IObserver<GroupCommunicationMessage>>(); - } - - /// <summary> - /// Handles the incoming NsMessage for this Task. - /// Delegates the GroupCommunicationMessage to the correct - /// CommunicationGroupNetworkObserver. - /// </summary> - /// <param name="nsMessage"></param> - public void OnNext(NsMessage<GroupCommunicationMessage> nsMessage) - { - if (nsMessage == null) - { - throw new ArgumentNullException("nsMessage"); - } - - try - { - GroupCommunicationMessage gcm = nsMessage.Data.First(); - _commGroupHandlers[gcm.GroupName].OnNext(gcm); - } - catch (InvalidOperationException) - { - LOGGER.Log(Level.Error, "Mpi Network Handler received message with no data"); - throw; - } - catch (KeyNotFoundException) - { - LOGGER.Log(Level.Error, "Mpi Network Handler received message for nonexistant group"); - throw; - } - } - - /// <summary> - /// Registers the network handler for the given CommunicationGroup. - /// When messages are sent to the specified group name, the given handler - /// will be invoked with that message. - /// </summary> - /// <param name="groupName">The group name for the network handler</param> - /// <param name="commGroupHandler">The network handler to invoke when - /// messages are sent to the given group.</param> - public void Register(string groupName, IObserver<GroupCommunicationMessage> commGroupHandler) - { - if (string.IsNullOrEmpty(groupName)) - { - throw new ArgumentNullException("groupName"); - } - if (commGroupHandler == null) - { - throw new ArgumentNullException("commGroupHandler"); - } - - _commGroupHandlers[groupName] = commGroupHandler; - } - - public void OnError(Exception error) - { - } - - public void OnCompleted() - { - } - } -} http://git-wip-us.apache.org/repos/asf/incubator-reef/blob/c330dcff/lang/cs/Org.Apache.REEF.Network/Group/Task/Impl/OperatorTopology.cs ---------------------------------------------------------------------- diff --git a/lang/cs/Org.Apache.REEF.Network/Group/Task/Impl/OperatorTopology.cs b/lang/cs/Org.Apache.REEF.Network/Group/Task/Impl/OperatorTopology.cs index 2e98d3d..315cf64 100644 --- a/lang/cs/Org.Apache.REEF.Network/Group/Task/Impl/OperatorTopology.cs +++ b/lang/cs/Org.Apache.REEF.Network/Group/Task/Impl/OperatorTopology.cs @@ -68,7 +68,7 @@ namespace Org.Apache.REEF.Network.Group.Task.Impl /// <summary> /// Creates a new OperatorTopology object. /// </summary> - /// <param name="operatorName">The name of the MPI Operator</param> + /// <param name="operatorName">The name of the Group Communication Operator</param> /// <param name="groupName">The name of the operator's Communication Group</param> /// <param name="taskId">The operator's Task identifier</param> /// <param name="driverId">The identifer for the driver</param> @@ -79,14 +79,14 @@ namespace Org.Apache.REEF.Network.Group.Task.Impl /// <param name="sender">The Sender used to do point to point communication</param> [Inject] public OperatorTopology( - [Parameter(typeof(MpiConfigurationOptions.OperatorName))] string operatorName, - [Parameter(typeof(MpiConfigurationOptions.CommunicationGroupName))] string groupName, + [Parameter(typeof(GroupCommConfigurationOptions.OperatorName))] string operatorName, + [Parameter(typeof(GroupCommConfigurationOptions.CommunicationGroupName))] string groupName, [Parameter(typeof(TaskConfigurationOptions.Identifier))] string taskId, - [Parameter(typeof(MpiConfigurationOptions.DriverId))] string driverId, - [Parameter(typeof(MpiConfigurationOptions.Timeout))] int timrout, - [Parameter(typeof(MpiConfigurationOptions.RetryCount))] int retryCount, - [Parameter(typeof(MpiConfigurationOptions.TopologyRootTaskId))] string rootId, - [Parameter(typeof(MpiConfigurationOptions.TopologyChildTaskIds))] ISet<string> childIds, + [Parameter(typeof(GroupCommConfigurationOptions.DriverId))] string driverId, + [Parameter(typeof(GroupCommConfigurationOptions.Timeout))] int timrout, + [Parameter(typeof(GroupCommConfigurationOptions.RetryCount))] int retryCount, + [Parameter(typeof(GroupCommConfigurationOptions.TopologyRootTaskId))] string rootId, + [Parameter(typeof(GroupCommConfigurationOptions.TopologyChildTaskIds))] ISet<string> childIds, NetworkService<GroupCommunicationMessage> networkService, ICodec<T> codec, Sender sender) http://git-wip-us.apache.org/repos/asf/incubator-reef/blob/c330dcff/lang/cs/Org.Apache.REEF.Network/Group/Topology/FlatTopology.cs ---------------------------------------------------------------------- diff --git a/lang/cs/Org.Apache.REEF.Network/Group/Topology/FlatTopology.cs b/lang/cs/Org.Apache.REEF.Network/Group/Topology/FlatTopology.cs index 909dc4c..d5c84c8 100644 --- a/lang/cs/Org.Apache.REEF.Network/Group/Topology/FlatTopology.cs +++ b/lang/cs/Org.Apache.REEF.Network/Group/Topology/FlatTopology.cs @@ -31,7 +31,7 @@ using Org.Apache.REEF.Network.Group.Pipelining; namespace Org.Apache.REEF.Network.Group.Topology { /// <summary> - /// Represents a graph of MPI Operators where there are only two levels of + /// Represents a graph of Group Communication Operators where there are only two levels of /// nodes: the root and all children extending from the root. /// </summary> /// <typeparam name="T">The message type</typeparam> @@ -85,8 +85,8 @@ namespace Org.Apache.REEF.Network.Group.Topology { var confBuilder = TangFactory.GetTang().NewConfigurationBuilder() .BindImplementation(typeof(ICodec<T1>), OperatorSpec.Codec) - .BindNamedParameter<MpiConfigurationOptions.TopologyRootTaskId, string>( - GenericType<MpiConfigurationOptions.TopologyRootTaskId>.Class, + .BindNamedParameter<GroupCommConfigurationOptions.TopologyRootTaskId, string>( + GenericType<GroupCommConfigurationOptions.TopologyRootTaskId>.Class, _rootId); if (taskId.Equals(_rootId)) @@ -95,8 +95,8 @@ namespace Org.Apache.REEF.Network.Group.Topology { if (!tId.Equals(_rootId)) { - confBuilder.BindSetEntry<MpiConfigurationOptions.TopologyChildTaskIds, string>( - GenericType<MpiConfigurationOptions.TopologyChildTaskIds>.Class, + confBuilder.BindSetEntry<GroupCommConfigurationOptions.TopologyChildTaskIds, string>( + GenericType<GroupCommConfigurationOptions.TopologyChildTaskIds>.Class, tId); } } @@ -112,11 +112,11 @@ namespace Org.Apache.REEF.Network.Group.Topology if (taskId.Equals(broadcastSpec.SenderId)) { - confBuilder.BindImplementation(GenericType<IMpiOperator<T1>>.Class, GenericType<BroadcastSender<T1>>.Class); + confBuilder.BindImplementation(GenericType<IGroupCommOperator<T1>>.Class, GenericType<BroadcastSender<T1>>.Class); } else { - confBuilder.BindImplementation(GenericType<IMpiOperator<T1>>.Class, GenericType<BroadcastReceiver<T1>>.Class); + confBuilder.BindImplementation(GenericType<IGroupCommOperator<T1>>.Class, GenericType<BroadcastReceiver<T1>>.Class); } } else if (OperatorSpec is ReduceOperatorSpec<T1, T2>) @@ -129,11 +129,11 @@ namespace Org.Apache.REEF.Network.Group.Topology if (taskId.Equals(reduceSpec.ReceiverId)) { - confBuilder.BindImplementation(GenericType<IMpiOperator<T1>>.Class, GenericType<ReduceReceiver<T1>>.Class); + confBuilder.BindImplementation(GenericType<IGroupCommOperator<T1>>.Class, GenericType<ReduceReceiver<T1>>.Class); } else { - confBuilder.BindImplementation(GenericType<IMpiOperator<T1>>.Class, GenericType<ReduceSender<T1>>.Class); + confBuilder.BindImplementation(GenericType<IGroupCommOperator<T1>>.Class, GenericType<ReduceSender<T1>>.Class); } } else if (OperatorSpec is ScatterOperatorSpec<T1, T2>) @@ -141,11 +141,11 @@ namespace Org.Apache.REEF.Network.Group.Topology ScatterOperatorSpec<T1, T2> scatterSpec = OperatorSpec as ScatterOperatorSpec<T1, T2>; if (taskId.Equals(scatterSpec.SenderId)) { - confBuilder.BindImplementation(GenericType<IMpiOperator<T1>>.Class, GenericType<ScatterSender<T1>>.Class); + confBuilder.BindImplementation(GenericType<IGroupCommOperator<T1>>.Class, GenericType<ScatterSender<T1>>.Class); } else { - confBuilder.BindImplementation(GenericType<IMpiOperator<T1>>.Class, GenericType<ScatterReceiver<T1>>.Class); + confBuilder.BindImplementation(GenericType<IGroupCommOperator<T1>>.Class, GenericType<ScatterReceiver<T1>>.Class); } } else http://git-wip-us.apache.org/repos/asf/incubator-reef/blob/c330dcff/lang/cs/Org.Apache.REEF.Network/Group/Topology/ITopology.cs ---------------------------------------------------------------------- diff --git a/lang/cs/Org.Apache.REEF.Network/Group/Topology/ITopology.cs b/lang/cs/Org.Apache.REEF.Network/Group/Topology/ITopology.cs index 3f15318..083330d 100644 --- a/lang/cs/Org.Apache.REEF.Network/Group/Topology/ITopology.cs +++ b/lang/cs/Org.Apache.REEF.Network/Group/Topology/ITopology.cs @@ -24,7 +24,7 @@ using Org.Apache.REEF.Wake.Remote; namespace Org.Apache.REEF.Network.Group.Topology { /// <summary> - /// Represents a topology graph for IMpiOperators. + /// Represents a topology graph for IGroupCommOperators. /// </summary> public interface ITopology<T1, T2> where T2 : ICodec<T1> { http://git-wip-us.apache.org/repos/asf/incubator-reef/blob/c330dcff/lang/cs/Org.Apache.REEF.Network/Group/Topology/TreeTopology.cs ---------------------------------------------------------------------- diff --git a/lang/cs/Org.Apache.REEF.Network/Group/Topology/TreeTopology.cs b/lang/cs/Org.Apache.REEF.Network/Group/Topology/TreeTopology.cs index 1ee459e..b129f8a 100644 --- a/lang/cs/Org.Apache.REEF.Network/Group/Topology/TreeTopology.cs +++ b/lang/cs/Org.Apache.REEF.Network/Group/Topology/TreeTopology.cs @@ -107,15 +107,15 @@ namespace Org.Apache.REEF.Network.Group.Topology //add parentid, if no parent, add itself var confBuilder = TangFactory.GetTang().NewConfigurationBuilder() .BindImplementation(typeof(ICodec<T1>), OperatorSpec.Codec) - .BindNamedParameter<MpiConfigurationOptions.TopologyRootTaskId, string>( - GenericType<MpiConfigurationOptions.TopologyRootTaskId>.Class, + .BindNamedParameter<GroupCommConfigurationOptions.TopologyRootTaskId, string>( + GenericType<GroupCommConfigurationOptions.TopologyRootTaskId>.Class, parentId); //add all its children foreach (TaskNode childNode in selfTaskNode.GetChildren()) { - confBuilder.BindSetEntry<MpiConfigurationOptions.TopologyChildTaskIds, string>( - GenericType<MpiConfigurationOptions.TopologyChildTaskIds>.Class, + confBuilder.BindSetEntry<GroupCommConfigurationOptions.TopologyChildTaskIds, string>( + GenericType<GroupCommConfigurationOptions.TopologyChildTaskIds>.Class, childNode.TaskId); } @@ -127,11 +127,11 @@ namespace Org.Apache.REEF.Network.Group.Topology .BindImplementation(GenericType<ICodec<PipelineMessage<T1>>>.Class, GenericType<PipelineMessageCodec<T1>>.Class); if (taskId.Equals(broadcastSpec.SenderId)) { - confBuilder.BindImplementation(GenericType<IMpiOperator<T1>>.Class, GenericType<BroadcastSender<T1>>.Class); + confBuilder.BindImplementation(GenericType<IGroupCommOperator<T1>>.Class, GenericType<BroadcastSender<T1>>.Class); } else { - confBuilder.BindImplementation(GenericType<IMpiOperator<T1>>.Class, GenericType<BroadcastReceiver<T1>>.Class); + confBuilder.BindImplementation(GenericType<IGroupCommOperator<T1>>.Class, GenericType<BroadcastReceiver<T1>>.Class); } } else if (OperatorSpec is ReduceOperatorSpec<T1, T2>) @@ -144,11 +144,11 @@ namespace Org.Apache.REEF.Network.Group.Topology if (taskId.Equals(reduceSpec.ReceiverId)) { - confBuilder.BindImplementation(GenericType<IMpiOperator<T1>>.Class, GenericType<ReduceReceiver<T1>>.Class); + confBuilder.BindImplementation(GenericType<IGroupCommOperator<T1>>.Class, GenericType<ReduceReceiver<T1>>.Class); } else { - confBuilder.BindImplementation(GenericType<IMpiOperator<T1>>.Class, GenericType<ReduceSender<T1>>.Class); + confBuilder.BindImplementation(GenericType<IGroupCommOperator<T1>>.Class, GenericType<ReduceSender<T1>>.Class); } } else if (OperatorSpec is ScatterOperatorSpec<T1, T2>) @@ -156,11 +156,11 @@ namespace Org.Apache.REEF.Network.Group.Topology ScatterOperatorSpec<T1, T2> scatterSpec = OperatorSpec as ScatterOperatorSpec<T1, T2>; if (taskId.Equals(scatterSpec.SenderId)) { - confBuilder.BindImplementation(GenericType<IMpiOperator<T1>>.Class, GenericType<ScatterSender<T1>>.Class); + confBuilder.BindImplementation(GenericType<IGroupCommOperator<T1>>.Class, GenericType<ScatterSender<T1>>.Class); } else { - confBuilder.BindImplementation(GenericType<IMpiOperator<T1>>.Class, GenericType<ScatterReceiver<T1>>.Class); + confBuilder.BindImplementation(GenericType<IGroupCommOperator<T1>>.Class, GenericType<ScatterReceiver<T1>>.Class); } } else http://git-wip-us.apache.org/repos/asf/incubator-reef/blob/c330dcff/lang/cs/Org.Apache.REEF.Network/Org.Apache.REEF.Network.csproj ---------------------------------------------------------------------- diff --git a/lang/cs/Org.Apache.REEF.Network/Org.Apache.REEF.Network.csproj b/lang/cs/Org.Apache.REEF.Network/Org.Apache.REEF.Network.csproj index 58e41a8..9834269 100644 --- a/lang/cs/Org.Apache.REEF.Network/Org.Apache.REEF.Network.csproj +++ b/lang/cs/Org.Apache.REEF.Network/Org.Apache.REEF.Network.csproj @@ -52,17 +52,17 @@ under the License. <ItemGroup> <Compile Include="Group\Codec\GcmMessageProto.cs" /> <Compile Include="Group\Codec\GroupCommunicationMessageCodec.cs" /> - <Compile Include="Group\Config\MpiConfigurationOptions.cs" /> + <Compile Include="Group\Config\GroupCommConfigurationOptions.cs" /> <Compile Include="Group\Driver\ICommunicationGroupDriver.cs" /> - <Compile Include="Group\Driver\IMpiDriver.cs" /> + <Compile Include="Group\Driver\IGroupCommDriver.cs" /> <Compile Include="Group\Driver\Impl\CommunicationGroupDriver.cs" /> <Compile Include="Group\Driver\Impl\GroupCommunicationMessage.cs" /> <Compile Include="Group\Driver\Impl\MessageType.cs" /> - <Compile Include="Group\Driver\Impl\MpiDriver.cs" /> + <Compile Include="Group\Driver\Impl\GroupCommDriver.cs" /> <Compile Include="Group\Driver\Impl\TaskStarter.cs" /> <Compile Include="Group\Operators\IBroadcastReceiver.cs" /> <Compile Include="Group\Operators\IBroadcastSender.cs" /> - <Compile Include="Group\Operators\IMpiOperator.cs" /> + <Compile Include="Group\Operators\IGroupCommOperator.cs" /> <Compile Include="Group\Operators\Impl\BroadcastOperatorSpec.cs" /> <Compile Include="Group\Operators\Impl\BroadcastReceiver.cs" /> <Compile Include="Group\Operators\Impl\BroadcastSender.cs" /> @@ -87,12 +87,12 @@ under the License. <Compile Include="Group\Pipelining\PipelineMessageCodec.cs" /> <Compile Include="Group\Task\ICommunicationGroupClient.cs" /> <Compile Include="Group\Task\ICommunicationGroupNetworkObserver.cs" /> - <Compile Include="Group\Task\IMpiClient.cs" /> - <Compile Include="Group\Task\IMpiNetworkObserver.cs" /> + <Compile Include="Group\Task\IGroupCommClient.cs" /> + <Compile Include="Group\Task\IGroupCommNetworkObserver.cs" /> <Compile Include="Group\Task\Impl\CommunicationGroupClient.cs" /> <Compile Include="Group\Task\Impl\CommunicationGroupNetworkObserver.cs" /> - <Compile Include="Group\Task\Impl\MpiClient.cs" /> - <Compile Include="Group\Task\Impl\MpiNetworkObserver.cs" /> + <Compile Include="Group\Task\Impl\GroupCommClient.cs" /> + <Compile Include="Group\Task\Impl\GroupCommNetworkObserver.cs" /> <Compile Include="Group\Task\Impl\NodeStruct.cs" /> <Compile Include="Group\Task\Impl\OperatorTopology.cs" /> <Compile Include="Group\Topology\FlatTopology.cs" /> http://git-wip-us.apache.org/repos/asf/incubator-reef/blob/c330dcff/lang/cs/Org.Apache.REEF.Tests/Functional/Group/BroadcastReduceTest.cs ---------------------------------------------------------------------- diff --git a/lang/cs/Org.Apache.REEF.Tests/Functional/Group/BroadcastReduceTest.cs b/lang/cs/Org.Apache.REEF.Tests/Functional/Group/BroadcastReduceTest.cs index 94529c1..7dc3423 100644 --- a/lang/cs/Org.Apache.REEF.Tests/Functional/Group/BroadcastReduceTest.cs +++ b/lang/cs/Org.Apache.REEF.Tests/Functional/Group/BroadcastReduceTest.cs @@ -87,15 +87,15 @@ namespace Org.Apache.REEF.Tests.Functional.Group numTasks.ToString(CultureInfo.InvariantCulture)) .Build(); - IConfiguration mpiDriverConfig = TangFactory.GetTang().NewConfigurationBuilder() - .BindStringNamedParam<MpiConfigurationOptions.DriverId>(GroupTestConstants.DriverId) - .BindStringNamedParam<MpiConfigurationOptions.MasterTaskId>(GroupTestConstants.MasterTaskId) - .BindStringNamedParam<MpiConfigurationOptions.GroupName>(GroupTestConstants.GroupName) - .BindIntNamedParam<MpiConfigurationOptions.FanOut>(GroupTestConstants.FanOut.ToString(CultureInfo.InvariantCulture).ToString(CultureInfo.InvariantCulture)) - .BindIntNamedParam<MpiConfigurationOptions.NumberOfTasks>(numTasks.ToString(CultureInfo.InvariantCulture)) + IConfiguration groupCommDriverConfig = TangFactory.GetTang().NewConfigurationBuilder() + .BindStringNamedParam<GroupCommConfigurationOptions.DriverId>(GroupTestConstants.DriverId) + .BindStringNamedParam<GroupCommConfigurationOptions.MasterTaskId>(GroupTestConstants.MasterTaskId) + .BindStringNamedParam<GroupCommConfigurationOptions.GroupName>(GroupTestConstants.GroupName) + .BindIntNamedParam<GroupCommConfigurationOptions.FanOut>(GroupTestConstants.FanOut.ToString(CultureInfo.InvariantCulture).ToString(CultureInfo.InvariantCulture)) + .BindIntNamedParam<GroupCommConfigurationOptions.NumberOfTasks>(numTasks.ToString(CultureInfo.InvariantCulture)) .Build(); - IConfiguration merged = Configurations.Merge(driverConfig, mpiDriverConfig); + IConfiguration merged = Configurations.Merge(driverConfig, groupCommDriverConfig); HashSet<string> appDlls = new HashSet<string>(); appDlls.Add(typeof(IDriver).Assembly.GetName().Name); http://git-wip-us.apache.org/repos/asf/incubator-reef/blob/c330dcff/lang/cs/Org.Apache.REEF.Tests/Functional/Group/PipelinedBroadcastReduceTest.cs ---------------------------------------------------------------------- diff --git a/lang/cs/Org.Apache.REEF.Tests/Functional/Group/PipelinedBroadcastReduceTest.cs b/lang/cs/Org.Apache.REEF.Tests/Functional/Group/PipelinedBroadcastReduceTest.cs index 0c918b5..fe098a8 100644 --- a/lang/cs/Org.Apache.REEF.Tests/Functional/Group/PipelinedBroadcastReduceTest.cs +++ b/lang/cs/Org.Apache.REEF.Tests/Functional/Group/PipelinedBroadcastReduceTest.cs @@ -89,15 +89,15 @@ namespace Org.Apache.REEF.Tests.Functional.Group GroupTestConstants.ChunkSize.ToString(CultureInfo.InvariantCulture)) .Build(); - IConfiguration mpiDriverConfig = TangFactory.GetTang().NewConfigurationBuilder() - .BindStringNamedParam<MpiConfigurationOptions.DriverId>(GroupTestConstants.DriverId) - .BindStringNamedParam<MpiConfigurationOptions.MasterTaskId>(GroupTestConstants.MasterTaskId) - .BindStringNamedParam<MpiConfigurationOptions.GroupName>(GroupTestConstants.GroupName) - .BindIntNamedParam<MpiConfigurationOptions.FanOut>(GroupTestConstants.FanOut.ToString(CultureInfo.InvariantCulture).ToString(CultureInfo.InvariantCulture)) - .BindIntNamedParam<MpiConfigurationOptions.NumberOfTasks>(numTasks.ToString(CultureInfo.InvariantCulture)) + IConfiguration groupCommDriverConfig = TangFactory.GetTang().NewConfigurationBuilder() + .BindStringNamedParam<GroupCommConfigurationOptions.DriverId>(GroupTestConstants.DriverId) + .BindStringNamedParam<GroupCommConfigurationOptions.MasterTaskId>(GroupTestConstants.MasterTaskId) + .BindStringNamedParam<GroupCommConfigurationOptions.GroupName>(GroupTestConstants.GroupName) + .BindIntNamedParam<GroupCommConfigurationOptions.FanOut>(GroupTestConstants.FanOut.ToString(CultureInfo.InvariantCulture).ToString(CultureInfo.InvariantCulture)) + .BindIntNamedParam<GroupCommConfigurationOptions.NumberOfTasks>(numTasks.ToString(CultureInfo.InvariantCulture)) .Build(); - IConfiguration merged = Configurations.Merge(driverConfig, mpiDriverConfig); + IConfiguration merged = Configurations.Merge(driverConfig, groupCommDriverConfig); HashSet<string> appDlls = new HashSet<string>(); appDlls.Add(typeof(IDriver).Assembly.GetName().Name); http://git-wip-us.apache.org/repos/asf/incubator-reef/blob/c330dcff/lang/cs/Org.Apache.REEF.Tests/Functional/Group/ScatterReduceTest.cs ---------------------------------------------------------------------- diff --git a/lang/cs/Org.Apache.REEF.Tests/Functional/Group/ScatterReduceTest.cs b/lang/cs/Org.Apache.REEF.Tests/Functional/Group/ScatterReduceTest.cs index 083261a..868b3a1 100644 --- a/lang/cs/Org.Apache.REEF.Tests/Functional/Group/ScatterReduceTest.cs +++ b/lang/cs/Org.Apache.REEF.Tests/Functional/Group/ScatterReduceTest.cs @@ -84,15 +84,15 @@ namespace Org.Apache.REEF.Tests.Functional.Group numTasks.ToString(CultureInfo.InvariantCulture)) .Build(); - IConfiguration mpiDriverConfig = TangFactory.GetTang().NewConfigurationBuilder() - .BindStringNamedParam<MpiConfigurationOptions.DriverId>(GroupTestConstants.DriverId) - .BindStringNamedParam<MpiConfigurationOptions.MasterTaskId>(GroupTestConstants.MasterTaskId) - .BindStringNamedParam<MpiConfigurationOptions.GroupName>(GroupTestConstants.GroupName) - .BindIntNamedParam<MpiConfigurationOptions.FanOut>(GroupTestConstants.FanOut.ToString(CultureInfo.InvariantCulture).ToString(CultureInfo.InvariantCulture)) - .BindIntNamedParam<MpiConfigurationOptions.NumberOfTasks>(numTasks.ToString()) + IConfiguration groupCommDriverConfig = TangFactory.GetTang().NewConfigurationBuilder() + .BindStringNamedParam<GroupCommConfigurationOptions.DriverId>(GroupTestConstants.DriverId) + .BindStringNamedParam<GroupCommConfigurationOptions.MasterTaskId>(GroupTestConstants.MasterTaskId) + .BindStringNamedParam<GroupCommConfigurationOptions.GroupName>(GroupTestConstants.GroupName) + .BindIntNamedParam<GroupCommConfigurationOptions.FanOut>(GroupTestConstants.FanOut.ToString(CultureInfo.InvariantCulture).ToString(CultureInfo.InvariantCulture)) + .BindIntNamedParam<GroupCommConfigurationOptions.NumberOfTasks>(numTasks.ToString()) .Build(); - IConfiguration merged = Configurations.Merge(driverConfig, mpiDriverConfig); + IConfiguration merged = Configurations.Merge(driverConfig, groupCommDriverConfig); HashSet<string> appDlls = new HashSet<string>(); appDlls.Add(typeof(IDriver).Assembly.GetName().Name); http://git-wip-us.apache.org/repos/asf/incubator-reef/blob/c330dcff/lang/cs/Org.Apache.REEF.Tests/Functional/ML/KMeans/TestKMeans.cs ---------------------------------------------------------------------- diff --git a/lang/cs/Org.Apache.REEF.Tests/Functional/ML/KMeans/TestKMeans.cs b/lang/cs/Org.Apache.REEF.Tests/Functional/ML/KMeans/TestKMeans.cs index 6b3b26c..8044599 100644 --- a/lang/cs/Org.Apache.REEF.Tests/Functional/ML/KMeans/TestKMeans.cs +++ b/lang/cs/Org.Apache.REEF.Tests/Functional/ML/KMeans/TestKMeans.cs @@ -160,15 +160,15 @@ namespace Org.Apache.REEF.Tests.Functional.ML.KMeans .BindIntNamedParam<NumPartitions>(Partitions.ToString()) .Build(); - IConfiguration mpiDriverConfig = TangFactory.GetTang().NewConfigurationBuilder() - .BindStringNamedParam<MpiConfigurationOptions.DriverId>(Identifier) - .BindStringNamedParam<MpiConfigurationOptions.MasterTaskId>(Constants.MasterTaskId) - .BindStringNamedParam<MpiConfigurationOptions.GroupName>(Constants.KMeansCommunicationGroupName) - .BindIntNamedParam<MpiConfigurationOptions.FanOut>(fanOut.ToString(CultureInfo.InvariantCulture).ToString(CultureInfo.InvariantCulture)) - .BindIntNamedParam<MpiConfigurationOptions.NumberOfTasks>(totalEvaluators.ToString()) + IConfiguration groupCommunicationDriverConfig = TangFactory.GetTang().NewConfigurationBuilder() + .BindStringNamedParam<GroupCommConfigurationOptions.DriverId>(Identifier) + .BindStringNamedParam<GroupCommConfigurationOptions.MasterTaskId>(Constants.MasterTaskId) + .BindStringNamedParam<GroupCommConfigurationOptions.GroupName>(Constants.KMeansCommunicationGroupName) + .BindIntNamedParam<GroupCommConfigurationOptions.FanOut>(fanOut.ToString(CultureInfo.InvariantCulture).ToString(CultureInfo.InvariantCulture)) + .BindIntNamedParam<GroupCommConfigurationOptions.NumberOfTasks>(totalEvaluators.ToString()) .Build(); - return Configurations.Merge(driverConfig, mpiDriverConfig); + return Configurations.Merge(driverConfig, groupCommunicationDriverConfig); } private HashSet<string> AssembliesToCopy() http://git-wip-us.apache.org/repos/asf/incubator-reef/blob/c330dcff/lang/cs/Org.Apache.REEF.Tests/Org.Apache.REEF.Tests.csproj ---------------------------------------------------------------------- diff --git a/lang/cs/Org.Apache.REEF.Tests/Org.Apache.REEF.Tests.csproj b/lang/cs/Org.Apache.REEF.Tests/Org.Apache.REEF.Tests.csproj index 3827941..44fdfe3 100644 --- a/lang/cs/Org.Apache.REEF.Tests/Org.Apache.REEF.Tests.csproj +++ b/lang/cs/Org.Apache.REEF.Tests/Org.Apache.REEF.Tests.csproj @@ -119,10 +119,6 @@ under the License. </ProjectReference> </ItemGroup> <ItemGroup> - <Folder Include="bin\Debug\" /> - <Folder Include="bin\Release\" /> - </ItemGroup> - <ItemGroup> <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" /> </ItemGroup> <Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
