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

Introduce a System class in the core #4741

Merged
merged 6 commits into from
Jun 16, 2023
Merged

Conversation

jngrad
Copy link
Member

@jngrad jngrad commented Jun 9, 2023

Fixes #4615

Description of changes:

  • completely rewrite the EspressoSystemInterface class
    • the new System class uses composition for GPU particle data management, resource deallocation, and globals
    • GPU particle data management now uses standard thrust vectors and properly deallocates device memory
    • simplify the espressomd.system.System class
  • simplify GPU code

At normal program termination, thrust vectors might enter their
destructors when the CUDA primary context manager has already
expired, making it impossible to request the CUDA driver to free
device memory. To avoid this condition, deallocation methods are
wrapped in callbacks that are called by a cleanup class before
normal program termination.
@jngrad jngrad marked this pull request as ready for review June 12, 2023 12:11
@jngrad jngrad requested a review from reinaual June 12, 2023 12:54
Copy link
Contributor

@reinaual reinaual left a comment

Choose a reason for hiding this comment

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

Code looks good to me, as far as I understood the structure.

src/script_interface/system/SystemFacade.hpp Show resolved Hide resolved
@jngrad jngrad added this to the ESPResSo 4.3.0 milestone Jun 16, 2023
@jngrad jngrad added the automerge Merge with kodiak label Jun 16, 2023
@kodiakhq kodiakhq bot merged commit a78400b into espressomd:python Jun 16, 2023
5 checks passed
@jngrad jngrad deleted the system_class branch June 16, 2023 13:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Introduce an EspressoSystem class in the core
2 participants