Skip to content

Fixed double allocations and added assert statements#293

Merged
pelesh merged 5 commits intodevelopfrom
shaked/cpu_only_gmres_fix
Jun 4, 2025
Merged

Fixed double allocations and added assert statements#293
pelesh merged 5 commits intodevelopfrom
shaked/cpu_only_gmres_fix

Conversation

@shakedregev
Copy link
Copy Markdown
Collaborator

@shakedregev shakedregev commented May 30, 2025

Description

Error messages are returned when running GMRES tests suggesting the solver is trying to access GPU memory. These are benign messages as computation is carried out to completion on a CPU device and all GPU calls are ignored, but the code should not be trying to access the the device memory in the CPU mode in the first place.

_Closes #286 _

@pelesh

Proposed changes

My changes enforce strict checks on owning gpu data and remove double allocations.

Checklist

Put an x in the boxes that apply. You can also fill these out after creating
the PR. If you're unsure about any of them, don't hesitate to ask. We're here
to help! This is simply a reminder of what we are going to look for before
merging your code.

  • All tests pass. Code tested on
    • CPU backend
    • CUDA backend
    • HIP backend
  • Code compiles cleanly with flags -Wall -Wpedantic -Wconversion -Wextra.
  • The new code follows Re::Solve style guidelines.
  • There are unit tests for the new code.
  • The new code is documented.
  • The feature branch is rebased with respect to the target branch.

The rebase was required to get tests passing.

@shakedregev shakedregev requested a review from pelesh May 30, 2025 14:31
@shakedregev shakedregev self-assigned this May 30, 2025
Copy link
Copy Markdown
Collaborator

@pelesh pelesh left a comment

Choose a reason for hiding this comment

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

Build and installation tests pass, straightforward fix.

@pelesh pelesh merged commit a8b70b5 into develop Jun 4, 2025
4 checks passed
@pelesh pelesh deleted the shaked/cpu_only_gmres_fix branch July 24, 2025 20:50
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.

2 participants