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

Monitor_nD event lists are somehow (still) not written in "atomic" fashion on GPU #1794

Open
willend opened this issue Dec 9, 2024 · 3 comments

Comments

@willend
Copy link
Contributor

willend commented Dec 9, 2024

Most event lists created using openacc end up empty.

As e.g. "normal" 2D histogram function, the issue likely occurs in the calculation of the "index" into the (currently) 1-dimensional Buffer array.

@willend
Copy link
Contributor Author

willend commented Dec 11, 2024

It turned out that the cure was to do an "atomic capture" to define a local TRACE copy of the "particle count", to be used everywhere in TRACE...

In a CPU setting where only one thread is active at a time we can of course make do with the usual, global variable on the structure.

@willend
Copy link
Contributor Author

willend commented Dec 11, 2024

PR with fix is incoming.

@willend
Copy link
Contributor Author

willend commented Jan 14, 2025

New observation - atomic / mostly correct particle data block written in list model, but the latest related edits in monitor_nd-lib.c lead to a couple of side effects:

  1. On CPU, there is always a first bogus event present in the file 0 0 0 0 0 0

  2. On GPU, the particle "id" is not incremented correctly (often resides in col no. 4)

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

No branches or pull requests

1 participant