CoreNeuron icon indicating copy to clipboard operation
CoreNeuron copied to clipboard

Should we create list of most commonly used mod files with POINTER and Random123?

Open pramodk opened this issue 5 years ago • 1 comments

While making models compatible to CoreNEURON, one of the first thing that needs to be fixed is POINTER variables and use of random number streams.

I wonder if there are most commonly used mod files that we can upload as a reference. We can then refer these examples in documentation so that it would be bit easier for people to understand.

@nrnhines : do you think this would be useful? If so, is there any such list? Doesn't need to be exhaustive though. What I can think of is BBP's mod files for ProbAMPANMDA_EMS.mod, ProbGABAAB_EMS.mod GFluct.mod.

pramodk avatar Jul 15 '20 23:07 pramodk

Well, not all POINTER variables, just the ones used for random streams and Vector need to be updated to BBCOREPOINTER. An alternative for future mod files would be to design an API to give NMODL language support for those usages that avoid VERBATIM altogether. At any rate, since you have directory with all distinct mod files from modeldb, a multi grep or python script can easily find all the mod files having POINTER and then use one of the Vector api functions listed at the end of ivocvect.h or, for Random123, the word "repick" or "nrnran123". The Vector functions to search for are

vector_arg
vector_capacity
vector_vec

nrnhines avatar Jul 16 '20 14:07 nrnhines