Page 2 of 2

Re: "My mechanisms don't load!"

Posted: Tue Dec 05, 2017 2:52 pm
by santana_loren9
Thank you for that explanation.
Yes, I do have many mod files. I was trying to start with two to see if I could identify the problem.
Thanks Ted.

Re: "My mechanisms don't load!"

Posted: Tue Dec 05, 2017 5:10 pm
by santana_loren9
I'm sorry, I do have one more question. If you add new things to the folder where you have hoc and mod files or if you make a change to a hoc file in the folder, do you have to drag the whole folder again to mknrndll?

Re: "My mechanisms don't load!"

Posted: Wed Dec 06, 2017 1:00 am
by hines
No. Only drag folder to mknrndll if you change a mod file

Re: "My mechanisms don't load!"

Posted: Wed Dec 06, 2017 1:07 am
by santana_loren9
Thank you.

Re: "My mechanisms don't load!"

Posted: Tue Jun 19, 2018 6:21 pm
by mildan
Hello everyone.

I'm trying to use a model of neuronal network - so called 'Traub
model' downloaded from the ModelDB (82894).

I used the nrnivmodl command in the .mod files directory which
supposedly succeeded and returned:
Successfully created x86_64/special
along with .lo and .c files corresponding to my .mod files

When I run the notorious 'hello world' .hoc inside the .mod directory
it works as expected I suppose with the
'loading membrane mechanisms from ... ' and 'Additional mechanisms
from files ... ' and 'hello' response.


However, after going with 'nrniv mosinit.hoc' / 'nrngui -nogui
mosinit.hoc' in the main directory i get syntax errors:

Code: Select all

nrniv: syntax error
 in ./cells/deepaxax_template.hoc near line 410
        insert naf2
                  ^
        xopen("./cells/deepaxax_template.hoc")
      localloadfile("cells/deepaxax_template.hoc")
    xopen("cell_templates.hoc")
  execute1("{xopen("cell_templates.hoc")}")
and others
        0
nrniv: syntax error
 in ./cells/deepaxax_template.hoc near line 412
        insert kdr_fs
                    ^
        xopen("onecell.hoc")
      execute1("{xopen("onecell.hoc")}")
    load_file("onecell.hoc")
nrniv: syntax error
 in ./cells/deepaxax_template.hoc near line 414
        insert ka
                ^
Does this mean that the mechanisms in .mod files didn't compile correctly?
Is using the nrnivmodl command not completely equivalent to the
drag'n'drop .mod folder into mknrndll method?

It's entirely possible that the solution to my problem has already
been presented earlier in this thread, but I might be newb enough not
to realize it.

Thanks a lot!

Re: "My mechanisms don't load!"

Posted: Tue Jun 19, 2018 6:31 pm
by hines
NEURON only loads mod files by default if you start in the folder where you executed nrnivmodl. SInce you executed the latter in the mod
folder, if you wanted to load from the parent of the mod folder you would need
nrniv -dll mod/x86_64/.libs/libnrnmech.so mosinit.hoc
However, much better is to remove the mod/x86_64 folder created by nrnivmodl and instead in the parent folder (that contains mosinit.hoc)
execute
nrnivmodl mod

Re: "My mechanisms don't load!"

Posted: Wed Jun 20, 2018 4:38 am
by mildan
Correct. Thank you for quick respone.