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

Check Subdimension.local is honored to avoid OOB accesses #1164

Open
FabioLuporini opened this issue Mar 13, 2020 · 4 comments
Open

Check Subdimension.local is honored to avoid OOB accesses #1164

FabioLuporini opened this issue Mar 13, 2020 · 4 comments
Assignees
Labels

Comments

@FabioLuporini
Copy link
Contributor

reproducer:

python tti_example.py

look at the generated code for the padfunc builtin, you'll see something along the lines of

phi[abc_x_l + 4][y + 4][z + 4] = phi[44][y + 4][z + 4];

the 44 should be a symbolic entity, not an hardcoded number

@FabioLuporini
Copy link
Contributor Author

FabioLuporini commented Mar 18, 2020

update: this is due to SubDimension(local=...

@FabioLuporini
Copy link
Contributor Author

however, the +40 due to nbl should become a symbol otherwise it's gonna be OOB if we supply a (much) smaller Function upon op.apply ?

@mloubout
Copy link
Contributor

gonna be OOB if we supply a (much) smaller Function upon op.apply ?

THis line should prevent it no?

if mode == 'reflect' and function.grid.distributor.is_parallel:

@mloubout
Copy link
Contributor

No would OOB for the constant case still.

@FabioLuporini FabioLuporini changed the title unlikely yet significant OOB over MPI in padfunc builtin Check Subdimension.local is honored to avoid OOB accesses Mar 31, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants