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

HRG for n >= 10^7 #32

Open
DanielStephan97 opened this issue Apr 5, 2020 · 1 comment
Open

HRG for n >= 10^7 #32

DanielStephan97 opened this issue Apr 5, 2020 · 1 comment

Comments

@DanielStephan97
Copy link

After building from source the simplest way, running ./genhrg with n >= 10^7, the assertion "hyperbolicDistance(nodeInA.radius, nodeInA.angle, nodeInB.radius, nodeInB.angle) < m_R" fails and thus no graph is generated.

@chistopher
Copy link
Owner

I was able to reproduce the problem. You encountered floating point problems.
It all comes down to how you compute hyperbolic distance.
The fast way we outlined in the paper says nodes are closer than $R$
cosh(d) = 16403128956290.799
cosh(R) = 16414031750058.705.
while the other formula says otherwise
d = 31.122344335589894
R = 31.122304860022076.

Here double precision just reaches it's limits for intermediate values.
We tried to investigate in issue #9.
For most use cases it does not matter if there are slight inaccuracies, anyway.

If you want to fix this, be my guest.
Otherwise I suggest you build in release to ignore this.

./configure
# now default build configurations are in .localconfig
./configure
# if you left the config unchanged, the build should be in ./build/
cmake --build ./build

This changed the runtime of ./genhrg -n 10000000 on my laptop from 40s to 4s.
Or 1.5s with -threads 4.

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