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

Division by 0 on PartGraphKway when *nparts = 1 #67

Open
tim-tim707 opened this issue Jun 7, 2023 · 0 comments
Open

Division by 0 on PartGraphKway when *nparts = 1 #67

tim-tim707 opened this issue Jun 7, 2023 · 0 comments

Comments

@tim-tim707
Copy link

Division by 0 occurs in kmetis.c line 56 on this computation:

  /* set various run parameters that depend on the graph */
  ctrl->CoarsenTo = gk_max((*nvtxs)/(40*gk_log2(*nparts)), 30*(*nparts));

This is because gk_log2 will return 0 if its input is 1.

=================================================================
==6382==ERROR: AddressSanitizer: FPE on unknown address 0x5622b6c7e8f0 (pc 0x5622b6c7e8f0 bp 0x7fff6575cc10 sp 0x7fff6575cb70 T0)
    #0 0x5622b6c7e8f0 in METIS_PartGraphKway METIS/libmetis/kmetis.c:56

AddressSanitizer can not provide additional info.
SUMMARY: AddressSanitizer: FPE METIS/libmetis/kmetis.c:56 in METIS_PartGraphKway
==6382==ABORTING```

There should be an error handling or a message of help for users.
(I am very happy that I could compile with gdb=1 to backtrack the bug, thanks !)
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

1 participant