You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@singa.apache.org by wa...@apache.org on 2016/03/23 13:12:40 UTC

[1/2] incubator-singa git commit: SIGNA-141 Undesired Hash collision when locating process id to workers and servers

Repository: incubator-singa
Updated Branches:
  refs/heads/master 348c5e54d -> 259422c41


SIGNA-141 Undesired Hash collision when locating process id to workers and servers

Circumvent undesired collision in Hash function by adding maximum range from calculating for workers
as the offset when calculating for servers.


Project: http://git-wip-us.apache.org/repos/asf/incubator-singa/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-singa/commit/122d3626
Tree: http://git-wip-us.apache.org/repos/asf/incubator-singa/tree/122d3626
Diff: http://git-wip-us.apache.org/repos/asf/incubator-singa/diff/122d3626

Branch: refs/heads/master
Commit: 122d3626b637e3b8b522dd3038acb19d64bad456
Parents: 8d4953a
Author: ijingo <ij...@gmail.com>
Authored: Tue Feb 23 20:00:41 2016 +0800
Committer: ijingo <ij...@gmail.com>
Committed: Tue Feb 23 20:00:41 2016 +0800

----------------------------------------------------------------------
 src/utils/cluster.cc | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-singa/blob/122d3626/src/utils/cluster.cc
----------------------------------------------------------------------
diff --git a/src/utils/cluster.cc b/src/utils/cluster.cc
index 391deee..5a8b87a 100644
--- a/src/utils/cluster.cc
+++ b/src/utils/cluster.cc
@@ -116,8 +116,10 @@ const vector<int> Cluster::ExecutorRng(int pid, int grp_size, int procs_size) {
 int Cluster::Hash(int gid, int id, int flag) {
   int ret = -1;
   if (flag == kServer) {
-    ret = (flag * cluster_.nserver_groups() + gid)
-          * cluster_.nservers_per_group() + id;
+    ret = kServer * cluster_.nworker_groups()
+      * cluster_.nworkers_per_group()
+      + (cluster_.nserver_groups() + gid)
+      * cluster_.nservers_per_group() + id;
   } else {
     ret = (flag * cluster_.nworker_groups() + gid)
           * cluster_.nworkers_per_group() + id;


[2/2] incubator-singa git commit: SINGA-141 Merge pull request fixing hash collision

Posted by wa...@apache.org.
SINGA-141 Merge pull request fixing hash collision


Project: http://git-wip-us.apache.org/repos/asf/incubator-singa/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-singa/commit/259422c4
Tree: http://git-wip-us.apache.org/repos/asf/incubator-singa/tree/259422c4
Diff: http://git-wip-us.apache.org/repos/asf/incubator-singa/diff/259422c4

Branch: refs/heads/master
Commit: 259422c413933aa4b25f7f6efddf06aa31cb7c59
Parents: 348c5e5 122d362
Author: Wei Wang <wa...@comp.nus.edu.sg>
Authored: Wed Mar 23 19:43:44 2016 +0800
Committer: Wei Wang <wa...@comp.nus.edu.sg>
Committed: Wed Mar 23 19:43:44 2016 +0800

----------------------------------------------------------------------
 src/utils/cluster.cc | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)
----------------------------------------------------------------------