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

Add more logic for POINT_PROCESS registration function #1106

Merged
merged 56 commits into from
Feb 10, 2024
Merged

Conversation

iomaganaris
Copy link
Contributor

@iomaganaris iomaganaris commented Dec 4, 2023

  • Added call to point_register_mech() needed for POINT_PROCESSes and related function definitions
  • Added logic in nrn_alloc needed to create reasonable POINT_PROCESS tests
  • Added test for POINT_PROCESS
  • Added test for PARAMETER
  • Added small logic for IONs as well in _<mech>_reg()
  • Added small logic for diam as well in _<mech>_reg()

@iomaganaris iomaganaris requested a review from 1uc December 4, 2023 13:31
Copy link

codecov bot commented Dec 4, 2023

Codecov Report

Attention: 15 lines in your changes are missing coverage. Please review.

Comparison is base (d1290e0) 88.16% compared to head (2cf0c02) 88.18%.

Files Patch % Lines
src/codegen/codegen_neuron_cpp_visitor.cpp 86.48% 15 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##           master    #1106      +/-   ##
==========================================
+ Coverage   88.16%   88.18%   +0.02%     
==========================================
  Files         176      176              
  Lines       12684    12791     +107     
==========================================
+ Hits        11183    11280      +97     
- Misses       1501     1511      +10     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@bbpbuildbot

This comment has been minimized.

@iomaganaris iomaganaris self-assigned this Dec 4, 2023
@iomaganaris iomaganaris added the NEURON codegen Work toward NEURON code generation label Dec 4, 2023
@1uc
Copy link
Collaborator

1uc commented Dec 4, 2023

This contains a lot of unrelated changes. Could we please split it:

  1. Moving the code for CodegenCppVisitor::get_parameter_str.
  2. Anything related to point-processes and the stuff found in CodegenNeuronCppVisitor::print_function_prototypes would be best studied in isolation.
  3. The changes in print_sdlists_init superficially feel like bug fixes. If yes, separate PR.
  4. The things related to getting {}_reg to work. This includes the extern "C" { change and things like register_mech_args and print_nrn_{state,jacob,...}`.

I'd think reviewing 4. first would be best, with 1. in parallel.

@iomaganaris
Copy link
Contributor Author

iomaganaris commented Dec 4, 2023

This contains a lot of unrelated changes. Could we please split it:

  1. Moving the code for CodegenCppVisitor::get_parameter_str.
  2. Anything related to point-processes and the stuff found in CodegenNeuronCppVisitor::print_function_prototypes would be best studied in isolation.
  3. The changes in print_sdlists_init superficially feel like bug fixes. If yes, separate PR.
  4. The things related to getting {}_reg to work. This includes the extern "C" { change and things like register_mech_args and print_nrn_{state,jacob,...}`.

I'd think reviewing 4. first would be best, with 1. in parallel.

Right, I thought it would be better to get all the related parts of the code I touched together so I don't miss anything from NEURON but since it complicated things I created separated PRs.

  1. Fixing function declarations #1109
  2. In this PR
  3. Refactor slist and dlist according to NEURON #1110
  4. Fix mechanism registration function for non POINT_PROCESSes #1111

@iomaganaris iomaganaris marked this pull request as draft December 4, 2023 16:17
@iomaganaris iomaganaris requested a review from ohm314 December 14, 2023 16:30
@bbpbuildbot

This comment has been minimized.

@bbpbuildbot

This comment has been minimized.

Copy link
Contributor

@ohm314 ohm314 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

looks good to me, had just one minor question

src/codegen/codegen_neuron_cpp_visitor.cpp Show resolved Hide resolved
Copy link
Contributor

@pramodk pramodk left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Overall looks Ok. I have few comments+questions to clarify.

src/codegen/codegen_cpp_visitor.cpp Outdated Show resolved Hide resolved
src/codegen/codegen_info.hpp Outdated Show resolved Hide resolved
src/codegen/codegen_neuron_cpp_visitor.cpp Outdated Show resolved Hide resolved
src/codegen/codegen_neuron_cpp_visitor.cpp Outdated Show resolved Hide resolved
src/codegen/codegen_neuron_cpp_visitor.cpp Outdated Show resolved Hide resolved
test/unit/codegen/codegen_neuron_cpp_visitor.cpp Outdated Show resolved Hide resolved
@bbpbuildbot

This comment has been minimized.

@bbpbuildbot

This comment has been minimized.

@pramodk
Copy link
Contributor

pramodk commented Feb 9, 2024

Conflicting files
src/codegen/codegen_neuron_cpp_visitor.cpp

I am going to attempt git merge. Looking at the conflicts for the above, I guess its a punishment for not reviewing & merging on timely manner! 😄

@bbpbuildbot

This comment has been minimized.

@bbpbuildbot
Copy link
Collaborator

Logfiles from GitLab pipeline #192525 (:white_check_mark:) have been uploaded here!

Status and direct links:

Copy link
Contributor

@pramodk pramodk left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I skimmed through the changes one more time and looked on NEURON's nocmodl side. Changes look reasonable.

As all tests passes, including existing ones, I am going to merge this.

@pramodk pramodk merged commit 545b7b3 into master Feb 10, 2024
20 checks passed
@pramodk pramodk deleted the magkanar/nrn_reg branch February 10, 2024 08:29
ohm314 pushed a commit that referenced this pull request May 21, 2024
* Added hoc_register_prop_size and hoc_register_dparam_semantics
* Implemented big part of the nrn_alloc to make POINT_PROCESS work
* Added test for POINT_PROCESS location
* Added test for parameters
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
NEURON codegen Work toward NEURON code generation
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants