Which libnrnmech.so file to load on linux/mac

NMODL and the Channel Builder.
Post Reply
MBeining
Posts: 33
Joined: Thu Apr 03, 2014 8:18 am

Which libnrnmech.so file to load on linux/mac

Post by MBeining » Fri Nov 17, 2017 8:42 am

I am testing a NEURON interface on different OS and I am a bit confused concerning the libnrnmech file which has to be loaded on linux/mac with the nrn_load_dll function in order to implement the compiled mechanisms.
The reason is that these files have slightly different names on different machines that my testers are using.

There is libnrnmech.so
but also libnrnmech.0.so
and libnrnmech.so.0

What is the reason behind that (I am a Windows user so no idea about linux/mac specific stuff)? How might a program know which file will be in the .libs/ folder that should be loaded?

Thank you in advance!

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

Re: Which libnrnmech.so file to load on linux/mac

Post by ted » Fri Nov 17, 2017 2:34 pm

Why bother with that level of detail? Just put the necessary mod files in the same directory as the main program (the hoc or Python file that starts everything), let prospective users compile them in that location, and let NEURON automatically find and load the binaries for itself when it starts up. It is generally a mistake to use OS-specific code, even when you think you're doing it to avoid OS-specific problems. If you don't deliberately create those problems in the first place, you won't have to fix them.

MBeining
Posts: 33
Joined: Thu Apr 03, 2014 8:18 am

Re: Which libnrnmech.so file to load on linux/mac

Post by MBeining » Sat Nov 18, 2017 8:38 am

The problem is that, as the interface can start NEURON simulations in parallel, there are several folders each containing the hoc files for each run (e.g. several current steps for calculating an F-I relationship). Hence I would have to copy that x86_64 folder (or what ever it is called on that system) into each of these subfolders, which is not really ideal.

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

Re: Which libnrnmech.so file to load on linux/mac

Post by ted » Mon Nov 27, 2017 12:02 pm

The problem is that, as the interface can start NEURON simulations in parallel, there are several folders each containing the hoc files for each run (e.g. several current steps for calculating an F-I relationship). Hence I would have to copy that x86_64 folder (or what ever it is called on that system) into each of these subfolders, which is not really ideal.
I don't know anything about this "interface" that you are working with, but if it used MPI to take advantage of NEURON's bulletin-board-style parallelization, there would be no need to deal with multiple folders containing almost-duplicate hoc files and subdirectories with OS-specific binaries. Here's a tutorial written for hoc
https://www.neuron.yale.edu/ftp/ted/neu ... zation.zip
Use a browser to open bulletin_board_parallelization.html

It wouldn't take much to revise this for Python if that's your preferred language.

Post Reply