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

Race condition in zeroing Nyquist plane #6

Open
lgarrison opened this issue May 20, 2021 · 0 comments
Open

Race condition in zeroing Nyquist plane #6

lgarrison opened this issue May 20, 2021 · 0 comments

Comments

@lgarrison
Copy link
Member

The ky=k_nyquist plane may not be zeroed correctly due to an OpenMP race condition:

zeldovich-PLT/zeldovich.cpp

Lines 537 to 542 in 82e268e

#pragma omp parallel for schedule(static)
for (int zres=0;zres<array.block;zres++) {
for (a=0;a<array.narray;a++) {
for (x=0;x<array.ppd;x++) AZYX(slab,a,zres,y,x) = 0.0;
}
}

Loop variables for #pragma-annotated loops are thread-private by default, but I am pretty sure this does not apply to nested loops. We could double-check this.

As to what this means, clearly the values weren't garbage or nans, as we would have noticed that in the AbacusSummit sims. Maybe they are recycled values, in which case the error would be mild. I need to remind myself how the block loading works.

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

No branches or pull requests

1 participant