CFD-GO / TCLB

TCLB - Templated MPI+CUDA/CPU Lattice Boltzmann code
https://tclb.io
GNU General Public License v3.0
180 stars 71 forks source link

Don't exec CudaKernelRun when block/region has a size of 0 #430

Closed bhill23 closed 1 year ago

bhill23 commented 1 year ago

When outputting small regions over multiple MPI+CUDA processes, CudeKernelRun was sometimes called with a block size of 0 raising an "invalid configuration argument" error. This change just makes Get<?%s q$name ?> return before making kernel calls and memory allocations if this is the case. Should only impact MPI+CUDA builds, CPU-only already handled blocks with 0 size in the cross.h for loop.

codecov-commenter commented 1 year ago

Codecov Report

Patch coverage: 100.00% and no project coverage change.

Comparison is base (b080bc6) 32.52% compared to head (b2ed68b) 32.52%.

:mega: This organization is not using Codecov’s GitHub App Integration. We recommend you install it so Codecov can continue to function properly for your repositories. Learn more

Additional details and impacted files ```diff @@ Coverage Diff @@ ## develop #430 +/- ## ======================================== Coverage 32.52% 32.52% ======================================== Files 152 152 Lines 6453 6453 ======================================== Hits 2099 2099 Misses 4354 4354 ``` | Flag | Coverage Δ | | |---|---|---| | d2q9 | `30.45% <100.00%> (ø)` | | | d2q9_bc | `26.73% <100.00%> (ø)` | | | d2q9_kuper | `27.58% <100.00%> (ø)` | | Flags with carried forward coverage won't be shown. [Click here](https://docs.codecov.io/docs/carryforward-flags?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=CFD-GO#carryforward-flags-in-the-pull-request-comment) to find out more. | [Impacted Files](https://codecov.io/gh/CFD-GO/TCLB/pull/430?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=CFD-GO) | Coverage Δ | | |---|---|---| | [src/Lattice.cu.Rt](https://codecov.io/gh/CFD-GO/TCLB/pull/430?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=CFD-GO#diff-c3JjL0xhdHRpY2UuY3UuUnQ=) | `45.49% <100.00%> (ø)` | | Help us with your feedback. Take ten seconds to tell us [how you rate us](https://about.codecov.io/nps?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=CFD-GO). Have a feature suggestion? [Share it here.](https://app.codecov.io/gh/feedback/?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=CFD-GO)

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Do you have feedback about the report comment? Let us know in this issue.