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.
Currently the behavior of
runmodels [MODEL]
(andrunmodels
in general) is that the script searches for any directory with mod files (or, if themodel_dir
variable is specified in the YAML file, that list of directories), and runsnrnivmodl
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:
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:some models may have mod files that do not compile
Not really an issue since those models have either a
skip: true
ormodel_dir
explicitly specified.