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

Replace hand-written modelsmodule by a code generation framework #2835

Merged
merged 28 commits into from
Jul 14, 2023

Conversation

jougs
Copy link
Contributor

@jougs jougs commented Jun 21, 2023

This replaces the hand-written modelsmodule.cpp by a mechanism to generate it dynamically from CMake arguments.

I think the documentation I wrote best explains the rationale for this change:

By default, NEST will compile and register all neuron and synapse models that are shipped in the source distribution. This is very convenient for an explorative development of simulation scripts, but leads to quite long compilation times and is often not necessary.
Now, there are two ways to restrict the set of built-in models to tailor NEST to your needs:

  • -Dwith-modelset=<modelset> allows you to pecify the modelset to include. Sample configurations are in the modelsets directory in the top-level of the source tree. This flag is mutually exclusive with -Dwith-models. [default=full].
  • -Dwith.models=<model_list> allows you to specify the models to include as a semicolon-separated list. This option is mutually exclusive with -Dwith-modelset [default=OFF].

This is the better solution I have promised in #2663.

@jougs jougs added T: Enhancement New functionality, model or documentation S: Normal Handle this with default priority I: Internal API Changes were introduced in basic internal workings of the simulator that developers need to know labels Jun 21, 2023
@jougs jougs self-assigned this Jun 21, 2023
@jougs
Copy link
Contributor Author

jougs commented Jun 21, 2023

@JanVogelsang: Voilà! Only nine weeks after I said "this is really easy!" 😇 😅

models/CMakeLists.txt Show resolved Hide resolved
modelsets/binary Outdated Show resolved Hide resolved
@jougs
Copy link
Contributor Author

jougs commented Jul 10, 2023

@jessica-mitchell: It seems that all links to the Potjans model of the form :doc:`microcircuit model <../auto_examples/Potjans_2014/index>` are broken. Is this related to this change?

@jessica-mitchell
Copy link
Contributor

@jougs, hm they seem to work for me both in this PR and master: I checked the link from models-main pageand the link in the examples index page and both correctly displayed the Microcircuit model docs.

@jougs
Copy link
Contributor Author

jougs commented Jul 10, 2023

@jougs, hm they seem to work for me both in this PR and master: I checked the link from models-main page and the link in the examples index page and both correctly displayed the Microcircuit model docs.

Are you using a build directory separate from the source directory or are you running cmake right in the Git clone?

@jessica-mitchell
Copy link
Contributor

Are you using a build directory separate from the source directory or are you running cmake right in the Git clone?

I was checking the build on Read the docs, but the local build (current master) with a separate build directory also works for me.

Copy link
Contributor

@pnbabu pnbabu 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!

@jougs jougs merged commit 4908939 into nest:master Jul 14, 2023
heplesser added a commit to heplesser/nest-simulator that referenced this pull request Aug 10, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
I: Internal API Changes were introduced in basic internal workings of the simulator that developers need to know S: Normal Handle this with default priority T: Enhancement New functionality, model or documentation
Projects
Status: Done
Development

Successfully merging this pull request may close these issues.

4 participants