Segmentation Violation

Anything that doesn't fit elsewhere.
Post Reply
afinci
Posts: 5
Joined: Fri Jul 10, 2015 2:59 pm

Segmentation Violation

Post by afinci » Sun Jul 12, 2015 4:41 pm

Hello everyone,

I am trying to run this model https://senselab.med.yale.edu/ModelDB/S ... del=182134 in NEURON but I am getting an error when I try to run real2.hoc. One of my colleagues in the lab uses Windows and he doesn't get an error. I am using MacOS, so it would be perfect if someone can check it in MacOS. BTW I am open to any other suggestions. Can anyone help me about it, please?

thank you all in advance,
Ahmet

Code: Select all

loading membrane mechanisms from x86_64/.libs/libnrnmech.so
Additional mechanisms from files
 ca1ih.mod ca1ika.mod ca1ikdr.mod ca1ina.mod caolmw.mod capr.mod edrive.mod exp2synampa.mod exp2synampapre.mod exp2synnmda.mod exp2synnmdaperm.mod exp2synnmdapre.mod fvpre.mod gap.mod halfgap.mod icaolmw.mod icapr.mod iholmkop.mod iholmw.mod ihpyrkop.mod kahppr.mod kaolmkop.mod kapyrkop.mod kcaolmw.mod kcpr.mod kdrbwb.mod kdrca1.mod kdrolmkop.mod kdrpr.mod kdrpyrkop.mod na3n.mod nafbwb.mod nafolmkop.mod nafpr.mod nafpyrkop.mod noisesyn.mod par_ggap.mod vecevent.mod xtra.mod
/Applications/NEURON-7.3/nrn/x86_64/bin/nrniv: Segmentation violation
 in real2.hoc near line 82
 pc.subworlds(1)
                ^
        ParallelContext[0].subworlds(1)


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

Re: Segmentation Violation

Post by ted » Mon Jul 13, 2015 11:14 am

The mod directory contains a bunch of useless .c and .o files. Delete those,
and also delete the .noisysynapses.par.swp file in the parameters directory.
Then recompile the mod files and see if you can now run the simulation.

If that didn't work, I was going to suggest that you create a file called test0.hoc that has the following contents

Code: Select all

objref pc
pc = new ParallelContext()
{printf("I am %d of %d\n", pc.id, pc.nhost)}
{pc.runworker()}
{pc.done()}
quit()
Then execute it with the following command line:
mpiexec -n 4 nrniv -mpi test0.hoc
and tell me what output this generates.

However the model entry's readme.txt file contains this little gem
Should be run in the normal (serial) installation of NEURON 7.3.
Most of the code is actually written for parallel
implementation, but several functions were added that are not able to
run in parallel.
which means your own NEURON installation's ability for parallel execution of simulations is irrelevant. Indeed, don't even try parallel execution of real2.hoc--who knows what will happen . . .

afinci
Posts: 5
Joined: Fri Jul 10, 2015 2:59 pm

Re: Segmentation Violation

Post by afinci » Mon Jul 13, 2015 11:44 am

Hey,

I deleted files that you mentioned and I am still getting the same error. Also, I created test0.hoc file and output is shown below.

Code: Select all

mpiexec was unable to launch the specified application as it could not find an executable:

Executable: nrniv
Node: Ahmets-MacBook-Pro.local

while attempting to start process rank 0.
--------------------------------------------------------------------------
4 total processes failed to start
So, what's your suggestion about parallel computing?

thanks

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

Re: Segmentation Violation

Post by ted » Mon Jul 13, 2015 1:12 pm

afinci wrote:I deleted files that you mentioned and I am still getting the same error
but did you recompile the mod files?
mpiexec was unable to launch the specified application as it could not find an executable
because you didn't tell it where nrniv is located. Either you make sure the path to nrniv is in your PATH, or you have to include the full path to nrniv on the command line that you use to launch nrniv under mpiexec. I'm not a Mac user, so offhand I don't know the path to nrniv. However, I'm sure there are many posts on the Forum that contain useful hints.
what's your suggestion about parallel computing?
It's irrelevant to the model entry you're interested in, given what the model authors wrote in their readme.txt file. And it's irrelevant to any problem you might be having with serial execution of a model. BTW, under CentOS 6.x (RHEL without the branding or support) I don't have any trouble using NEURON to execute the model.

afinci
Posts: 5
Joined: Fri Jul 10, 2015 2:59 pm

Re: Segmentation Violation

Post by afinci » Tue Jul 14, 2015 10:56 pm

hi again,

I installed Windows and I am still getting the same error. I deleted .o and .c files and noisysynapses as you said but it did not work.

Code: Select all

c:\nrn\bin\nrniv.exe: Segmentation violation
 in C:\Users\afinci\desktop\hfo_model\real2.hoc near line 82 
 pc.subworlds(1)
  ParallelContext[0].subworlds(1)
Same model works in another computer but it does not work on my computer. I need to run this model immediately. So, could you please help me?

thanks

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

Re: Segmentation Violation

Post by ted » Wed Jul 15, 2015 1:17 am

afinci wrote:Same model works in another computer but it does not work on my computer. I need to run this model immediately. So, could you please help me?
If you need to run it immediately, use a different machine. Meanwhile, to help diagnose what's going on with your own machine, and fix it so these problems go away,
1. What version of Windows are you using?
2. What version of NEURON have you installed? Just run nrngui, and tell me what is the first line that NEURON's interpreter prints to the screen. Also please tell me the name of the exe file that you used to install NEURON.
3. Are you able to run the neurondemo program? Click on the neurondemo icon, then click on the "Release" radio button, then click on the RunControl panel's Init & Run button. Do a bunch of colored plots appear in the graphs?

afinci
Posts: 5
Joined: Fri Jul 10, 2015 2:59 pm

Re: Segmentation Violation

Post by afinci » Wed Jul 15, 2015 1:43 am

I am using windows 8.1 pro 64 bit version and NEURON 7.4 x86_64.

First line of the interpreter:

NEURON -- Release 7.4 (1341:2ccabed20677) 2015-05-31
Duke, Yale, and the BlueBrain Project -- Copyright 1984-2015
See http://www.neuron.yale.edu/neuron/credits

oc>

2. name of the exe file is nrn-7.4.x86_64-w64-mingw32-setup.exe

3. Yes, I am able to run the neurondemo program. I can use GUI properly. As you said, a bunch of colored plots appeared in the graphs.

thanks

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

Re: Segmentation Violation

Post by ted » Wed Jul 15, 2015 2:04 pm

On my laptop PC running MSWin 7, I had the same problems as you did with this model. This is now fixed. The following procedure should now work for you.

1. Using the uninstaller that comes with NEURON, uninstall NEURON.

2. If you haven't already installed MPI version 5 from Microsoft,
delete any MPI version that may already be installed on your PC.
Then get MSMPISetup.exe from http://www.microsoft.com/en-us/download ... x?id=44990
and install it.

3. From NEURON's Download page get the 64 bit installer for MSWin
http://www.neuron.yale.edu/ftp/neuron/v ... -setup.exe
This is a brand new installer that, along with Microsoft's MPI version 5, will take care of the problems you have been having.
Use this installer to install NEURON on your PC.

4. Now throw out the nrnmech.dll that you made by compiling the model's mod files.
In the mod directory delete all the .o and .c files.
Use mknrndll to compile these mod files and move the nrnmech.dll file to the same directory where real2.hoc is located.

5. Bring up a bash shell by clicking on the bash icon that was installed with NEURON, cd to the directory where real2.hoc is located, and finally
mpiexec -n 4 nrniv -mpi real2.hoc
(I'm assuming your PC has 4 cores).
And the simulation should work without problems.

afinci
Posts: 5
Joined: Fri Jul 10, 2015 2:59 pm

Re: Segmentation Violation

Post by afinci » Wed Jul 15, 2015 6:18 pm

Hello Ted,

I uninstalled NEURON and re-installed it by using nrn-7.3.x86_64-pc-cygwin-setup.exe file and finally it works now. Thank you in advance. BTW, maybe you can add this problem-solution to the troubleshooting and other information part.

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

Re: Segmentation Violation

Post by ted » Thu Jul 16, 2015 12:37 am

Hmm, the very latest NEURON installer for 64 bit MSWin using mingw contains enough msmpi that a separate installation of msmpi is not necessary. So most MSWin users (any with 64 bit MSWin) should just get the 7.4.x86_64-w64-mingw32 installer for NEURON.

Post Reply