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

How to deal with boundary condition in CUDA OP2? #225

Open
lj-cug opened this issue Jan 28, 2022 · 2 comments
Open

How to deal with boundary condition in CUDA OP2? #225

lj-cug opened this issue Jan 28, 2022 · 2 comments

Comments

@lj-cug
Copy link

lj-cug commented Jan 28, 2022

Dear Sir:
Another question: How should I deal with the boundary condition in OP2-CUDA? The branch divergence problem always exists in cuda code when there's many if-conditions, especially for hydrodynamic simulation cases.
Thanks
Li Jian

@reguly
Copy link
Collaborator

reguly commented Jan 28, 2022 via email

@reguly
Copy link
Collaborator

reguly commented Jan 28, 2022

Let me correct that (I mixed up OPS and OP2 here). For OP2, you can create sets which only include the boundary elements, and then do an op_par_loop only over those. Or you can create a dataset which flags which elements are on the boundary, and do the if conditions inside the kernel for an op_par_loop over the entire domain.

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

2 participants