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

Assigning idcpu in one go #3731

Closed
ax3l opened this issue Jan 30, 2024 · 0 comments · Fixed by #3733
Closed

Assigning idcpu in one go #3731

ax3l opened this issue Jan 30, 2024 · 0 comments · Fixed by #3733
Assignees

Comments

@ax3l
Copy link
Member

ax3l commented Jan 30, 2024

I think it would be efficient if we had a function that is make64bit(cpu, id) that we can assign straight to the idcpu array value:

pa_idcpu[ip] = newFunction(cpuid, pid+ip);

Do we have such a thing already?

I work around this now via

pa_idcpu[ip] = 0;
amrex::ParticleIDWrapper{pa_idcpu[ip]} = pid+ip;
amrex::ParticleCPUWrapper{pa_idcpu[ip]} = cpuid;

to avoid valgrind (uninit data read) warnings during the first assign.

x-ref: ECP-WarpX/WarpX#4653

ax3l added a commit that referenced this issue Jan 31, 2024
Also sneaking in a small ignore_unused fix.

Close #3731.

Co-authored-by: Axel Huebl <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants