Problem running PFC cell model (modelDB)

Post Reply
leonelmd
Posts: 9
Joined: Tue Aug 19, 2014 2:12 pm

Problem running PFC cell model (modelDB)

Post by leonelmd » Mon Feb 23, 2015 9:55 am

Hi,
I was trying to run this model of a Pre-Frontal Cortex cell available in ModelDB:
https://senselab.med.yale.edu/ModelDB/S ... PFCcell%5c

The auto-lunch works ok, i.e., it opens NEURON, runs the model and plots one the Figures of the paper. However, I have not been able to run it using the unzipped package. I followed the instructions in the readme file, except that the readme didn't specify that the .mod files are in a particular folder. So I compiled the files in the "mechanism" folder, and then doubled click on the mosinit.hoc file and I got this:

Code: Select all

NEURON -- Release 7.3 (849:5be3d097b917) 2013-04-11
Duke, Yale, and the BlueBrain Project -- Copyright 1984-2013
See http://www.neuron.yale.edu/neuron/credits

        1
        1
        1
        1
        0
        1
        1
        1
        0
object ExperimentControl created.

        1
        0
        0
        1
        0
morphology file opened  22
C:\nrn73w64\bin64\nrniv.exe: syntax error
 in ../../experiment/IBcell.hoc near line 82
        insert h
               ^
        xopen("../../experiment/IBcell.hoc")
      ExperimentControl[0].execute1("xopen("../../experiment/IBcell.hoc")")
    ExperimentControl[0].xopen_generic("IBcell")
  xopen("persistentIB.hoc")
and others
        0
C:\nrn73w64\bin64\nrniv.exe: syntax error
 in ../../experiment/IBcell.hoc near line 83
        gbar_h(x) = gh_soma + (gh_end - gh_soma)/(1.0 + exp((H_dhalf-xdist)/H_st
eep))
                  ^
        xopen("persistentIB.hoc")
      execute1("{xopen("persistentIB.hoc")}")
    load_file("persistentIB.hoc")
  xopen("init.hoc")
and others
        0
C:\nrn73w64\bin64\nrniv.exe: syntax error
 in ../../experiment/IBcell.hoc near line 84
        }
  ^
        xopen("init.hoc")
      execute1("{xopen("init.hoc")}")
    load_file("init.hoc")
        0
C:\nrn73w64\bin64\nrniv.exe: syntax error
 in ../../experiment/IBcell.hoc near line 95
        insert kad
                 ^
oc>

I've tried moving the compiled .dll from here to there, but it seems it always gets trouble trying to insert the kad mechanism.

Also, two other people in different Windows computers have independently tried to run the model without success.

Any help is greatly appreciated. Thanks a lot in advance!

ted
Site Admin
Posts: 5053
Joined: Wed May 18, 2005 3:50 pm
Location: Yale University School of Medicine
Contact:

Re: Problem running PFC cell model (modelDB)

Post by ted » Mon Feb 23, 2015 11:27 am

This is an example of why we advise users to put the mod files used by their models in the same directory as their "main" hoc file.

If you are comfortable with the cygwin shell, I'd suggest running "mintty bash" (it's one of the programs in the NEURON program group), then cd your way to the directory that contains mosinit.hoc. At that point enter the command
mknrndll mechanism
and the mod files should be compiled, generating a nrnmech.dll in the same directory as mosinit.hoc. Then you will be able to execute the model's files either
nrngui mosinit.hoc
or by double clicking on mosinit.hoc in the MSWin file explorer.

Alternatively, you could just copy all the mod files from the mechanism subdirectory to the directory that contains mosinit.hoc, then double click on the mknrndll icon, navigate to the directory that contains mosinit.hoc and all those mod files, and let mknrndll do its thing. After that, double click on mosinit.hoc and you're up & running.

leonelmd
Posts: 9
Joined: Tue Aug 19, 2014 2:12 pm

Re: Problem running PFC cell model (modelDB)

Post by leonelmd » Mon Feb 23, 2015 12:02 pm

Thank you for your quick reply, Ted.

I tried both suggestions, using bash and copying mod files, and in both cases after either double clicking or doing nrngui to mosinit.hoc I get this error:

Code: Select all

NEURON -- Release 7.3 (849:5be3d097b917) 2013-04-11
Duke, Yale, and the BlueBrain Project -- Copyright 1984-2013
See http://www.neuron.yale.edu/neuron/credits

loading membrane mechanisms from nrnmech.dll
LoadLibrary("nrnmech.dll") failed with error 193
dlopen failed -

        1
        1
        1
        1
        0
        1
        1
        1
        0
object ExperimentControl created.

        1
        0
        0
        1
        0
morphology file opened  22
C:\nrn73w64\bin64\nrniv.exe: syntax error
 in ../../experiment/IBcell.hoc near line 82
        insert h
               ^
        xopen("../../experiment/IBcell.hoc")
      ExperimentControl[0].execute1("xopen("../../experiment/IBcell.hoc")")
    ExperimentControl[0].xopen_generic("IBcell")
  xopen("persistentIB.hoc")
and others
        0
C:\nrn73w64\bin64\nrniv.exe: syntax error
 in ../../experiment/IBcell.hoc near line 83
        gbar_h(x) = gh_soma + (gh_end - gh_soma)/(1.0 + exp((H_dhalf-xdist)/H_st
eep))
                  ^
        xopen("persistentIB.hoc")
      execute1("{xopen("persistentIB.hoc")}")
    load_file("persistentIB.hoc")
  xopen("init.hoc")
and others
        0
C:\nrn73w64\bin64\nrniv.exe: syntax error
 in ../../experiment/IBcell.hoc near line 84
        }
  ^
        xopen("init.hoc")
      execute1("{xopen("init.hoc")}")
    load_file("init.hoc")
        0
C:\nrn73w64\bin64\nrniv.exe: syntax error
 in ../../experiment/IBcell.hoc near line 95
        insert kad
                 ^
C:\nrn73w64\bin64\nrniv.exe: Segmentation violation
 near line 95
 ^
oc>C:\nrn73w64\bin64\nrniv.exe:
Unhandled Exception. This usually means a bad memory
address. It is not possible to make a judgment as to whether it is safe
to continue. If this happened while compiling a template, you will have to
quit.
 near line 95
 ^
oc>

I'd have thought this has to do with NEURON version (I couldn't find what version the model was tested though), but the auto_lunch works well with NEURON 7.3. Is it possible there is something different in the auto_lunch version?

Thank you

leonelmd
Posts: 9
Joined: Tue Aug 19, 2014 2:12 pm

Re: Problem running PFC cell model (modelDB)

Post by leonelmd » Mon Feb 23, 2015 1:35 pm

Well, I feel embarrassed to admit that it seems the problem was having 2 NEURON versions in my computer. I uninstalled v7.3 and now it works well in v7.2 after compiling with bash, as suggested.

Thanks a lot.

ted
Site Admin
Posts: 5053
Joined: Wed May 18, 2005 3:50 pm
Location: Yale University School of Medicine
Contact:

Re: Problem running PFC cell model (modelDB)

Post by ted » Tue Feb 24, 2015 12:48 pm

Nice to know you figured it out. I would never have guessed the cause.

Two suggestions:

1. An even simpler approach is to use mknrndll to descend into the directory where the model authors put their mod files and compile them there, then drag the nrnmech.dll file from that directory to the one that contains the mosinit.hoc file. No need to use bash, no need to copy the mod files from their original locus to anywhere else.

2. If I were you, I'd uninstall 7.2 (use the uninstaller in the NEURON program group), then get the latest alpha version installer
http://www.neuron.yale.edu/ftp/neuron/v ... -setup.exe
and install that. There have been many many bug fixes and performance enhancements since 7.2.

Post Reply