Skip to content

Petsc 64 bit int fixes#5252

Open
leo-collins wants to merge 8 commits into
leo/64bit-intfrom
leo/petsc-int-fixes
Open

Petsc 64 bit int fixes#5252
leo-collins wants to merge 8 commits into
leo/64bit-intfrom
leo/petsc-int-fixes

Conversation

@leo-collins

Copy link
Copy Markdown
Contributor

Fixes #5250 and #3913.

Use PetscInt as much as we can essentially. Tested locally on a 64 bit Petsc build

@connorjward

Copy link
Copy Markdown
Contributor

Thanks for this hard work!

If you don't mind, would you be able to take this the last step of the way and enable int64 testing on CI? It'd be exactly the same as what we do for complex and single (in #5033). That would be really amazing.

@leo-collins
leo-collins force-pushed the leo/petsc-int-fixes branch from 90f881d to 14f85c5 Compare July 16, 2026 13:01
@leo-collins
leo-collins changed the base branch from release to leo/64bit-int July 16, 2026 13:01
@leo-collins leo-collins added the ci:int64 Do a 64 bit integer build label Jul 16, 2026
@leo-collins
leo-collins force-pushed the leo/petsc-int-fixes branch from bae6480 to 14f85c5 Compare July 16, 2026 13:27
@leo-collins leo-collins added the base:release Run this PR using a release build label Jul 16, 2026
Comment thread firedrake/evaluate.h
size_t ncells_ignore,
int* cells_ignore);
PetscReal *found_ref_cell_dist_l1,
PetscInt ncells_ignore,

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is this always going to be large enough? Size_t is unsigned and comes with guarantees that int doesn't

Comment thread firedrake/locate.c
for (uint64_t i = 0; i < nids; i++) {
current_ref_cell_dist_l1 = (*try_candidate)(temp_ref_coords, f, ids[i], x);
for (uint64_t j = 0; j < ncells_ignore; j++) {
for (PetscInt j = 0; j < ncells_ignore; j++) {

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Same question here about int range

Comment thread firedrake/locate.c
PetscInt l = ids[i] % nlayers;
current_ref_cell_dist_l1 = (*try_candidate_xtr)(temp_ref_coords, f, c, l, x);
for (uint64_t j = 0; j < ncells_ignore; j++) {
for (PetscInt j = 0; j < ncells_ignore; j++) {

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

And here

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

base:release Run this PR using a release build ci:int64 Do a 64 bit integer build

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants