Which libnrnmech.so file to load on linux/mac

NMODL and the Channel Builder.
Post Reply
MBeining

Which libnrnmech.so file to load on linux/mac

Post by MBeining »

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: 6289
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 »

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

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

Post by MBeining »

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: 6289
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 »

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