"set_ingress_method" may choose incompatible method !
Hi,
The set_ingress_method method in distributed_graph.hpp can choose "PDS" by mistake because function "sharding_constraint::is_pds_compatible(num_shards, p)" does not check if p is a prime number. !
static bool is_pds_compatible(size_t num_shards, int& p) { p = floor(sqrt(num_shards-1)); return (p>0 && ((p*p+p+1) == (int)num_shards)); }
The source code of is_pds_compatible only checks if the p^2 + p + 1 equation is satisfied with no concerns for the second condition "p should be a prime number". For example, using auto ingress for a cluster of 21 machines should lead to Oblivious but GraphLab suggests PDS and then fail with error:
ERROR: generate_pds.hpp(get_pds:50): Fail to generate pds for p = 4 ERROR: sharding_constraint.hpp(sharding_constraint:96): Check failed: joint_nbr_cache[i][j].size()>0 [0 > 0]
Thanks, -Khaled
I'm not sure this is related, but I've done runs that get the same error for 43, which is p=6. 43 is prime, so don't know why it is failing.
Thanks,
Eric