Fixes issue with code generation of net_send_buffering()#1005
Conversation
does this produce bogus results? 🤔 |
Yes, without these changes on CPU and the following debug print we get: With these changes on CPU (and same on GPU): |
Codecov Report
@@ Coverage Diff @@
## master #1005 +/- ##
==========================================
+ Coverage 68.74% 69.23% +0.48%
==========================================
Files 189 189
Lines 25789 25816 +27
==========================================
+ Hits 17729 17874 +145
+ Misses 8060 7942 -118
Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here. |
|
Logfiles from GitLab pipeline #103450 (:white_check_mark:) have been uploaded here! Status and direct links: |
|
Logfiles from GitLab pipeline #103761 (:white_check_mark:) have been uploaded here! Status and direct links: |
|
I'm a bit skeptical about the fact that coverage of src/codegen/codegen_acc_visitor.cpp increased so much while testing only a very small part of it but I guess it's better than reducing it. We can follow up on that in #957 |
olupton
left a comment
There was a problem hiding this comment.
I'm curious...are we sure all these changes to the code generation needed?
Did you check if the change to print_net_send_buf_update_to_host is sufficient without the changes to the atomic update part?
A couple of code-printing nitpicks.
- Fix formatting and small improvement with restarting blocks Co-authored-by: Olli Lupton <oliver.lupton@epfl.ch>
Yes, the changes to |
|
Logfiles from GitLab pipeline #103817 (:white_check_mark:) have been uploaded here! Status and direct links: |
Bit late here - @iomaganaris: similar to the two below bug reports, did you see if it's worth reporting to nvofurm? (if not already reported) https://forums.developer.nvidia.com/t/incorrect-gpu-results-with-pragma-acc-atomic-capture/187962 |
I am trying to create a small reproducer but I haven't managed until now. I was just able to reproduce the first issue of these with my own example. I will try with Olli's as well.
Note that this was not needed for the fix but I find it a bit cleaner and maybe less error prone. |
…modl#1005) * If OpenMP GPU backend is enabled then `#pragma omp atomic capture` is not executed properly on CPU with NVHPC 23.1 (more details and tests in neuronsimulator/nrnBlueBrain/nmodl#2239) * Wrap the update of `nsb->_cnt` inside an `if-statement` based on `nt->compute_gpu` in OpenACC visitor * Use C++ `if-statement` instead of in OpenMP pragma in some cases * Added unit test for code generation of `net_send_buffering()` on code generated for GPU --------- Co-authored-by: Olli Lupton <oliver.lupton@epfl.ch> NMODL Repo SHA: BlueBrain/nmodl@c3b0736
OpenMPGPU backend is enabled then#pragma omp atomic captureis not executed properly on CPU with NVHPC 23.1 (more details and tests in Fixes for NVHPC 23.1 compiler neuronsimulator/nrn#2239)nsb->_cntinside anif-statementbased onnt->compute_gpu