nrn_load_dll file

Anything that doesn't fit elsewhere.
Post Reply
JimH
Posts: 54
Joined: Tue Apr 10, 2007 3:36 pm
Location: Duke University

nrn_load_dll file

Post by JimH » Wed Apr 04, 2012 3:44 pm

It seems that invalid file references in nrn_load_dll don't throw an error. Is this known/desired? It seems that if the user specifies a file that doesn't exist an error should be thrown ... Thoughts?

Thanks,
Jim

hines
Site Admin
Posts: 1575
Joined: Wed May 18, 2005 3:32 pm

Re: nrn_load_dll file

Post by hines » Wed Apr 04, 2012 8:36 pm

The function returns 0 on failure, 1 on success.

Code: Select all

oc>nrn_load_dll("foo")
	0 
oc>nrn_load_dll("/home/hines/neuron/nrnmpi/share/nrn/demo/release/x86_64/.libs/
libnrnmech.so")
loading membrane mechanisms from /home/hines/neuron/nrnmpi/share/nrn/demo/release/x86_64/.libs/libnrnmech.so
Additional mechanisms from files
 cabpump.mod cachan1.mod camchan.mod capump.mod invlfire.mod khhchan.mod mcna.mod nacaex.mod nachan.mod release.mod
	1 
oc>


JimH
Posts: 54
Joined: Tue Apr 10, 2007 3:36 pm
Location: Duke University

Re: nrn_load_dll file

Post by JimH » Thu Apr 05, 2012 11:43 am

Ah, good to know. I had never thought about it but I guess that's why a lot of the function calls I make are constantly printing out ones. Perhaps I should be paying more attention to those occasional zeros and removing some of those curly brackets around my function calls! Although on a related note, I just looked at some of my code and the one zero I was currently receiving was from a chdir() call in which 0 is good and -1 is bad :/

I tend to prefer throwing errors as opposed to status codes but I realize that the code isn't going to change. Thanks for giving me something to think about!

Post Reply