Skip to content

Fixes for NVHPC 23.1 compiler#2239

Merged
alexsavulescu merged 9 commits into
masterfrom
magkanar/fix_nvhpc_231
Feb 22, 2023
Merged

Fixes for NVHPC 23.1 compiler#2239
alexsavulescu merged 9 commits into
masterfrom
magkanar/fix_nvhpc_231

Conversation

@iomaganaris

@iomaganaris iomaganaris commented Feb 17, 2023

Copy link
Copy Markdown
Member
  • Use -Kieee flag for src/oc/math.cpp and NVHPC>=23.1 and update t13.hoc results for external_nrntest

Tested with NVHPC 23.1 in https://bbpgitlab.epfl.ch/hpc/cellular/nrn/-/pipelines/102984

@codecov

codecov Bot commented Feb 17, 2023

Copy link
Copy Markdown

Codecov Report

Merging #2239 (81393c7) into master (8a23590) will increase coverage by 0.00%.
The diff coverage is n/a.

@@           Coverage Diff           @@
##           master    #2239   +/-   ##
=======================================
  Coverage   56.14%   56.14%           
=======================================
  Files         620      620           
  Lines      124237   124235    -2     
=======================================
  Hits        69752    69752           
+ Misses      54485    54483    -2     
Impacted Files Coverage Δ
src/sundials/cvodes/cvodes.c 32.69% <0.00%> (+0.02%) ⬆️

📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more

@iomaganaris

Copy link
Copy Markdown
Member Author

There is a new issue with coreneuron_modtests::test_watchrange_py_cpu and NVHPC 23.1 (https://bbpgitlab.epfl.ch/hpc/cellular/nrn/-/jobs/560251) which seems pretty strange since it's on the CPU and only when OpenMP is enabled.
Have to investigate.. Some more details regarding the issue:

CoreNEURON run
[New Thread 0x7fff47ce0000 (LWP 297596)]
[New Thread 0x7fff4741b000 (LWP 297597)]
[New Thread 0x7fff469b9000 (LWP 297598)]
net_send td-t = -0.125 SelfEvent target=Bounce 0 flag=3

Thread 1 "special" received signal SIGABRT, Aborted.
__pthread_kill_implementation (no_tid=0, signo=6, threadid=140737324187648) at ./nptl/pthread_kill.c:44
44      ./nptl/pthread_kill.c: No such file or directory.
(gdb) bt
#0  __pthread_kill_implementation (no_tid=0, signo=6, threadid=140737324187648) at ./nptl/pthread_kill.c:44
#1  __pthread_kill_internal (signo=6, threadid=140737324187648) at ./nptl/pthread_kill.c:78
#2  __GI___pthread_kill (threadid=140737324187648, signo=signo@entry=6) at ./nptl/pthread_kill.c:89
#3  0x00007ffff341a476 in __GI_raise (sig=sig@entry=6) at ../sysdeps/posix/raise.c:26
#4  0x00007ffff34007f3 in __GI_abort () at ./stdlib/abort.c:79
#5  0x00007ffff6d13c0e in coreneuron::net_send (v=0x147e150, weight_index_=-1, pnt=<optimized out>, td=<optimized out>, flag=3)
    at /home/magkanar/bbp_repos/nrn/src/coreneuron/network/netcvode.cpp:93
#6  0x00007ffff6c85edb in coreneuron::net_buf_receive_Bounce (nt=<optimized out>) at x86_64/corenrn/mod2c/watchrange.cpp:655
#7  0x00007ffff6d12e1f in coreneuron::NetCvode::deliver_net_events (this=<optimized out>, nt=0x1476518)
    at /home/magkanar/bbp_repos/nrn/src/coreneuron/network/netcvode.cpp:686
#8  0x00007ffff6cf82d7 in coreneuron::nrn_fixed_step_thread (nth=0x48a4f) at /home/magkanar/bbp_repos/nrn/src/coreneuron/sim/fadvance_core.cpp:337
#9  0x00007ffff6cf6278 in coreneuron::nrn_fixed_step_group_thread (nth=0x1476518, step_group_max=8, step_group_begin=<optimized out>, 
    step_group_end=@0x7fffffff99f4: 0) at /home/magkanar/bbp_repos/nrn/src/coreneuron/sim/fadvance_core.cpp:187

@azure-pipelines

Copy link
Copy Markdown

✔️ 2615d68 -> Azure artifacts URL

@pramodk

pramodk commented Feb 17, 2023

Copy link
Copy Markdown
Member
     if (td < nt->_t) {
         char buf[100];
         std::snprintf(buf, sizeof(buf), "net_send td-t = %g", td - nt->_t);
         se->pr(buf, td, net_cvode_instance);
         abort();
         hoc_execerror("net_send delay < 0", 0);
     }

If that is abort from above place then it says event delivery time is less than the current sim time (which shouldn't happen). May be need a better look at what is going on. Can check next week together.

@azure-pipelines

Copy link
Copy Markdown

✔️ ba96dca -> Azure artifacts URL

@azure-pipelines

Copy link
Copy Markdown

✔️ 086af47 -> Azure artifacts URL

iomaganaris added a commit to BlueBrain/nmodl that referenced this pull request Feb 22, 2023
* 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/nrn#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>
@iomaganaris iomaganaris marked this pull request as ready for review February 22, 2023 10:02
Comment thread src/nrniv/CMakeLists.txt Outdated
@azure-pipelines

Copy link
Copy Markdown

✔️ 8a86412 -> Azure artifacts URL

@azure-pipelines

Copy link
Copy Markdown

✔️ 81393c7 -> Azure artifacts URL

@alexsavulescu alexsavulescu merged commit de2c927 into master Feb 22, 2023
@alexsavulescu alexsavulescu deleted the magkanar/fix_nvhpc_231 branch February 22, 2023 13:18
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

Successfully merging this pull request may close these issues.

5 participants