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 ability to run mod files from multiple directories #118

Open
JCGoran opened this issue Mar 8, 2024 · 0 comments
Open

Add ability to run mod files from multiple directories #118

JCGoran opened this issue Mar 8, 2024 · 0 comments
Labels
enhancement New feature or request

Comments

@JCGoran
Copy link
Collaborator

JCGoran commented Mar 8, 2024

Currently the behavior of runmodels [MODEL] (and runmodels in general) is that the script searches for any directory with mod files (or, if the model_dir variable is specified in the YAML file, that list of directories), and runs nrnivmodl on it.

The problem is that some of the models have multiple mod directories, and when a new model is added to the DB, it causes a failure in the CI because multiple directories are not supported by default. Unfortunately, one cannot blindly just list all of the directories, because some of them have the exact same file names/variables/content, which results in the linker throwing an error of the form ld: ... duplicate symbols.

The proposal

It should be possible to run nrnivmodl for every directory which contains mod files in isolation (i.e. without being aware of any of the other directories with mod files). This would also automatically fix any new models which come with multiple directories, and would probably fix all of the existing models (i.e. we wouldn't need to specify the directories by hand).

Edge cases

multiple directories specified in model_dir

Some of the existing models do have multiple directories specified; for instance:

232023:
    # README suggests all should be included
    model_dir: "mechanisms/Event_stream;mechanisms/Golgi_CL;mechanisms/Granule_CL;mechanisms/Presynaptic_spike_generator;mechanisms/Synapses;mechanisms/gap"

To resolve this, I propose we simply make model_dir a list, in which each entry we can list groups of directories which should be compiled together. This does not conflict with the behavior described above, and only requires minimal changes to the YAML configuration file, so the above would instead be written as:

232023:
    # README suggests all should be included
    model_dir:
        - "mechanisms/Event_stream;mechanisms/Golgi_CL;mechanisms/Granule_CL;mechanisms/Presynaptic_spike_generator;mechanisms/Synapses;mechanisms/gap"

some models may have mod files that do not compile

Not really an issue since those models have either a skip: true or model_dir explicitly specified.

@JCGoran JCGoran added the enhancement New feature or request label Mar 8, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant