Skip to content
This repository has been archived by the owner on Mar 20, 2023. It is now read-only.

Add *NRN_VERSION_* macros and variables. #796

Merged
merged 3 commits into from
Apr 11, 2022
Merged

Conversation

olupton
Copy link
Contributor

@olupton olupton commented Apr 7, 2022

Description

This is the CoreNEURON counterpart of neuronsimulator/nrn#1762, which addresses neuronsimulator/nrn#1696.

  • Generate a new header and define NRN_VERSION* macros that can be used in VERBATIM blocks. Include this from coreneuron/nrnconf.h so that these macros are implicitly available in all translated mechanisms. Tests are based on the NEURON version, distinguishing between different CoreNEURON versions within the same NEURON version is not foreseen.
  • These resolve to the CoreNEURON PROJECT_VERSION_{MAJOR,MINOR,PATCH} when CoreNEURON is built standalone. This is now supposed to be kept in sync with the NEURON version.
  • Checks are added at the CMake level on the NEURON side to make sure these values do not drift out of sync

How to test this?

neuronsimulator/nrn#1762 adds a test mechanism and script that is run both in NEURON and CoreNEURON modes.

Test System

  • OS: macOS
  • Compiler: AppleClang
  • Backend: CPU

Use certain branches in CI pipelines.

CI_BRANCHES:NEURON_BRANCH=olupton/version-macros

- CORENRN_COMPATIBLE_NRN_VERSION_{MAJOR,MINOR,PATCH} are used when
  CoreNEURON is built standalone, these give the NEURON version that
  this CoreNEURON "corresponds to".
- Checks are added at the CMake level to make sure these values do not
  drift out of sync.
- Generate a new header and define NRN_VERSION* macros that can be used
  in VERBATIM blocks. Include this from coreneuron/nrnconf.h so that
  these macros are implicitly available in all translated mechanisms.
@olupton olupton force-pushed the olupton/version-macros branch from 70cc1b6 to 8f659b0 Compare April 7, 2022 12:41
@olupton olupton requested a review from pramodk April 7, 2022 12:42
@olupton olupton requested a review from alexsavulescu April 8, 2022 15:07
Copy link
Collaborator

@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.

LGTM. I added some comments for clarification.

Copy link
Contributor

@alexsavulescu alexsavulescu left a comment

Choose a reason for hiding this comment

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

LGTM also

@olupton olupton closed this Apr 11, 2022
@olupton olupton reopened this Apr 11, 2022
@olupton
Copy link
Contributor Author

olupton commented Apr 11, 2022

New pipeline is https://bbpgitlab.epfl.ch/hpc/coreneuron/-/pipelines/47911, the old one failed because I rebased the NEURON PR at a bad time. Hopefully once it succeeds the status will go green here 🤷

@olupton olupton merged commit 0b3b9e9 into master Apr 11, 2022
@olupton olupton deleted the olupton/version-macros branch April 11, 2022 15:13
pramodk pushed a commit to neuronsimulator/nrn that referenced this pull request Nov 2, 2022
* CoreNEURON version bumped to 8.2.0 to match NEURON; from
  now on CoreNEURON versions will track NEURON ones.
- Checks are added at the CMake level to make sure these do not
  drift out of sync.

* Add *NRN_VERSION_* macros and variables.
- Based on CoreNEURON version when standalone, NEURON version
  when built as a submodule.
- These are implicitly available in all translated mechanisms.

CoreNEURON Repo SHA: BlueBrain/CoreNeuron@0b3b9e9
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants