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

Test for compacting all res 1 cells #914

Closed
wants to merge 14 commits into from
Closed

Conversation

ajfriend
Copy link
Contributor

  • compactCells currently fails when trying to compact all res 1 cells.
  • note that, interestingly, it also fails if you try to compact just the first 41 res 1 cells.

@ajfriend
Copy link
Contributor Author

I'm not sure why it did all this formatting... Any ideas?

@isaacbrodsky
Copy link
Collaborator

I'm not sure why it did all this formatting... Any ideas?

Probably different version of clang-format being used?

@ajfriend
Copy link
Contributor Author

Probably different version of clang-format being used?

Do we have a standard version I should be using?

@isaacbrodsky
Copy link
Collaborator

Probably different version of clang-format being used?

Do we have a standard version I should be using?

Yes, it is important to use clang-format-14 (until we update the formatter version again) as they change defaults between versions.

@coveralls
Copy link

coveralls commented Sep 26, 2024

Coverage Status

coverage: 98.825% (+0.001%) from 98.824%
when pulling a3a28e6 on compact_all_res1_test
into 4899d29 on master.

@ajfriend
Copy link
Contributor Author

Yes, it is important to use clang-format-14 (until we update the formatter version again) as they change defaults between versions.

OK. For my future reference, I had to run

brew install llvm@14
ln -s "$(brew --prefix llvm@14)/bin/clang-format" /opt/homebrew/bin/clang-format

which feels a bit janky.

@ajfriend
Copy link
Contributor Author

ajfriend commented Sep 26, 2024

I can also make it fail on a different (disjoint from the first example) set of cells with something like

int64_t numUncompacted = 44;
t_assertSuccess(
    H3_EXPORT(compactCells)(&cells1[80], out, numUncompacted));

And I can get this example to pass if I set numUncompacted = 43.

This is making me wonder if the failure has something to do with how we handle pentagons.

@isaacbrodsky
Copy link
Collaborator

The problem is around line

return parentError;
, the parentRes is -1 but we try to take cellToParent of currIndex at parentRes anyways.

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

Successfully merging this pull request may close these issues.

3 participants