Skip to content

Conversation

@dzzz2001
Copy link
Collaborator

Description

Fix a GPU memory leak in Forces<double, base_device::DEVICE_GPU>::deriv_drhoc_scc function.

Changes

  • Added delmem_var_op() call to properly free GPU memory (aux_d, gx_arr_d, drhocg_d) inside the GPU-specific conditional block.

Issue

The GPU memory (aux_d, gx_arr_d, drhocg_d) was allocated inside an if (this->device == base_device::GpuDevice) block but never freed, causing memory leaks.

Testing

Verified using compute-sanitizer that the memory leak is resolved.

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.

1 participant