If NMODL is built with the NVIDIA HPC compilers (nvc/nvc++, I tested 22.3) and assertions enabled, e.g.
cmake -G Ninja .. -DCMAKE_BUILD_TYPE=Debug
then compilation succeeds but tests fail, e.g.
$ ctest -R cabpump.mod --output-on-failure
Test project /gpfs/bbp.cscs.ch/home/olupton/nmodl/build
Start 85: cabpump.mod
1/1 Test #85: cabpump.mod ......................Subprocess aborted***Exception: 0.10 sec
[NMODL] [info] :: Processing /gpfs/bbp.cscs.ch/home/olupton/nmodl/test/integration/mod/cabpump.mod
[NMODL] [info] :: Running semantic analysis visitor
[NMODL] [info] :: Running symtab visitor
[NMODL] [warning] :: SYMTAB :: var [Argument] in var_init shadows <range assigned_definition> definition in NMODL_GLOBAL
[NMODL] [info] :: Running CVode to cnexp visitor
[NMODL] [info] :: Running code compatibility checker
[NMODL] [info] :: Running verbatim rename visitor
[NMODL] [info] :: Running KINETIC block visitor
[NMODL] [warning] :: SYMTAB :: var [Argument] in var_init shadows <range assigned_definition> definition in NMODL_GLOBAL
[NMODL] [info] :: Running STEADYSTATE visitor
[NMODL] [warning] :: SYMTAB :: var [Argument] in var_init shadows <range assigned_definition> definition in NMODL_GLOBAL
[NMODL] [info] :: Parsing Units
[NMODL] [info] :: Running local variable rename visitor
[NMODL] [info] :: Running cnexp visitor
[NMODL] [info] :: Running C backend code generator
/gpfs/bbp.cscs.ch/home/olupton/nmodl/ext/fmt/include/fmt/format-inl.h:699: assertion failed: terminate called without an active exception
0% tests passed, 1 tests failed out of 1
Total Test time (real) = 0.12 sec
The following tests FAILED:
85 - cabpump.mod (Subprocess aborted)
Errors while running CTest
if I run it inside GDB, I see
Program received signal SIGABRT, Aborted.
0x00007fffeb5b7387 in raise () from /lib64/libc.so.6
(gdb) bt
#0 0x00007fffeb5b7387 in raise () from /lib64/libc.so.6
#1 0x00007fffeb5b8a78 in abort () from /lib64/libc.so.6
#2 0x00007fffecfb488a in ?? () from /gpfs/bbp.cscs.ch/ssd/apps/bsd/2022-01-10/stage_compilers/install_gcc-4.8.5-haswell/gcc-11.2.0-ehzq5x/lib/gcc/x86_64-pc-linux-gnu/11.2.0/../../../../lib64/libstdc++.so.6
#3 0x00007fffecfc02fa in ?? () from /gpfs/bbp.cscs.ch/ssd/apps/bsd/2022-01-10/stage_compilers/install_gcc-4.8.5-haswell/gcc-11.2.0-ehzq5x/lib/gcc/x86_64-pc-linux-gnu/11.2.0/../../../../lib64/libstdc++.so.6
#4 0x00007fffecfc0365 in std::terminate() () from /gpfs/bbp.cscs.ch/ssd/apps/bsd/2022-01-10/stage_compilers/install_gcc-4.8.5-haswell/gcc-11.2.0-ehzq5x/lib/gcc/x86_64-pc-linux-gnu/11.2.0/../../../../lib64/libstdc++.so.6
#5 0x0000000001c7d319 in fmt::v8::detail::assert_fail (file=0x1cd3ec2 <.S35568> "/gpfs/bbp.cscs.ch/home/olupton/nmodl/ext/fmt/include/fmt/format-inl.h", line=699, message=0x1cd3ec1 <.S35571> "") at /gpfs/bbp.cscs.ch/home/olupton/nmodl/ext/fmt/include/fmt/format-inl.h:40
#6 0x0000000001c7e0aa in fmt::v8::detail::grisu_gen_digits (value=..., error=1, exp=@0x7fffffff12a4: 0, handler=...) at /gpfs/bbp.cscs.ch/home/olupton/nmodl/ext/fmt/include/fmt/format-inl.h:699
#7 0x0000000001c7be91 in fmt::v8::detail::format_float (value=0.10000000000000001, precision=6, specs=..., buf=...) at /gpfs/bbp.cscs.ch/home/olupton/nmodl/ext/fmt/include/fmt/format-inl.h:2384
#8 0x0000000000501acb in fmt::v8::detail::write (out=..., value=0.10000000000000001, specs=..., loc=...) at /gpfs/bbp.cscs.ch/home/olupton/nmodl/ext/fmt/include/fmt/format.h:2026
#9 0x00000000004db3e7 in fmt::v8::detail::arg_formatter<char> (value=0.10000000000000001) at /gpfs/bbp.cscs.ch/home/olupton/nmodl/ext/fmt/include/fmt/format.h:2217
#10 0x000000000050dc74 in fmt::v8::visit_format_arg (vis=0x7fffffff18e8, arg=0x7fffffff1980) at /gpfs/bbp.cscs.ch/home/olupton/nmodl/ext/fmt/include/fmt/core.h:1611
#11 0x0000000000510292 in fmt::v8::detail::vformat_to<char>(fmt::v8::detail::buffer<char>&, fmt::v8::basic_string_view<char>, fmt::v8::basic_format_args<fmt::v8::basic_format_context<std::conditional<std::is_same<fmt::v8::type_identity<char>::type, char>::value, fmt::v8::appender, std::back_insert_iterator<fmt::v8::detail::buffer<fmt::v8::type_identity<char>::type> > >::type, fmt::v8::type_identity<char>::type> >, fmt::v8::detail::locale_ref)::format_handler (id=1, begin=0x1ca9d4e <.S419459+8> "};", end=0x1ca9d50 <.S419459+10> "") at /gpfs/bbp.cscs.ch/home/olupton/nmodl/ext/fmt/include/fmt/format.h:2984
#12 0x000000000050c83c in fmt::v8::detail::parse_replacement_field (begin=0x1ca9d4c <.S419459+6> ":g};", end=0x1ca9d50 <.S419459+10> "", handler=0x7fffffff1b90) at /gpfs/bbp.cscs.ch/home/olupton/nmodl/ext/fmt/include/fmt/core.h:2601
#13 0x000000000050c4b3 in fmt::v8::detail::parse_format_string (format_str=..., handler=0x7fffffff1b90) at /gpfs/bbp.cscs.ch/home/olupton/nmodl/ext/fmt/include/fmt/core.h:2626
#14 0x00000000004f5628 in fmt::v8::detail::vformat_to (buf=0x7fffffff1cd8, fmt=..., args=..., loc=...) at /gpfs/bbp.cscs.ch/home/olupton/nmodl/ext/fmt/include/fmt/format.h:2988
#15 0x0000000001c98047 in fmt::v8::vformat (fmt=..., args=...) at /gpfs/bbp.cscs.ch/home/olupton/nmodl/ext/fmt/include/fmt/format-inl.h:2588
#16 0x00000000008733a7 in fmt::v8::format (fmt=..., args=0x7fffffff23b0, args=0x7fffffff23b0) at /gpfs/bbp.cscs.ch/home/olupton/nmodl/ext/fmt/include/fmt/core.h:3119
#17 0x00000000007dbfb6 in nmodl::codegen::CodegenCVisitor::print_global_variable_setup () at /gpfs/bbp.cscs.ch/home/olupton/nmodl/src/codegen/codegen_c_visitor.cpp:3129
#18 0x00000000007eec65 in nmodl::codegen::CodegenCVisitor::print_codegen_routines () at /gpfs/bbp.cscs.ch/home/olupton/nmodl/src/codegen/codegen_c_visitor.cpp:4619
#19 0x00000000007fcdad in nmodl::codegen::CodegenCVisitor::visit_program (node=0x28cc600) at /gpfs/bbp.cscs.ch/home/olupton/nmodl/src/codegen/codegen_c_visitor.cpp:4664
#20 0x000000000051ba03 in main (argc=2, argv=0x7fffffff8138) at /gpfs/bbp.cscs.ch/home/olupton/nmodl/src/main.cpp:555
note that when NMODL is built as a submodule of CoreNEURON, and CoreNEURON GPU support is enabled, then NMODL is built using the NVIDIA compilers...
If NMODL is built with the NVIDIA HPC compilers (nvc/nvc++, I tested 22.3) and assertions enabled, e.g.
cmake -G Ninja .. -DCMAKE_BUILD_TYPE=Debugthen compilation succeeds but tests fail, e.g.
if I run it inside GDB, I see
note that when NMODL is built as a submodule of CoreNEURON, and CoreNEURON GPU support is enabled, then NMODL is built using the NVIDIA compilers...