Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

"set_ingress_method" may choose incompatible method ! #131

Open
khaledammar opened this issue Mar 24, 2014 · 1 comment
Open

"set_ingress_method" may choose incompatible method ! #131

khaledammar opened this issue Mar 24, 2014 · 1 comment

Comments

@khaledammar
Copy link

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

@elgood
Copy link

elgood commented Jun 18, 2014

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants