Suppress "First Instance Of"

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

Suppress "First Instance Of"

Post by JimH »

This is a bit of a continuation of the following thread:
http://www.neuron.yale.edu/phpBB/viewto ... tput#p6592

The suggestion of suppressing the output with curly brackets did not work. Any other suggestions?

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

Re: Suppress "First Instance Of"

Post by ted »

The only time I get such messages is when using the interpreter's immediate mode to create a new scalar variable, that is, when manually typing at the oc> prompt an assignment statement of the form
newvarname = expression
where newvarname is a token that has not already been created, and expression is something that returns a scalar value. And yes, enclosing the statement in curly brackets does not suppress the message.

However, I never get such messages when executing a hoc file, e.g. when executing
nrngui somehocfilename
at the system prompt, or executing
xopen("somehocfilename")
at the oc> prompt.
This is with NEURON 7.3 (692:32dfec6adae7) 2012-06-13 under Linux.

So I must ask:
under what conditions do you see such messages, and what operating system and version of NEURON are you using?
JimH
Posts: 54
Joined: Tue Apr 10, 2007 3:36 pm
Location: Duke University

Re: Suppress "First Instance Of"

Post by JimH »

That is essentially what I am doing. I am running 7.2 but controlling/communicating with it via Matlab and the stdin/stdout pipes. For the majority of code calls I am just calling functions but when defining variables I see the output described. Perhaps this could be disabled via a startup option ???

Thanks,
Jim
hines
Site Admin
Posts: 1682
Joined: Wed May 18, 2005 3:32 pm

Re: Suppress "First Instance Of"

Post by hines »

If you are building from sources, edit nrn/src/oc/hoc_oop.c and search for
first instance of
In the most recent version it is line 177. Then comment out that line so it looks like
/*NOT_PARALLEL_SUB(printf("first instance of %s\n", sym->name);)*/
and do a 'make install' in both
src/oc and src/nrnoc

I need to consider whether it is best to turn off this message from the command line or
with a hoc statement.
wwlytton
Posts: 66
Joined: Wed May 18, 2005 10:37 pm
Contact:

Re: Suppress "First Instance Of"

Post by wwlytton »

I'm just now re-stumbling over these messages which I haven't seen in a long time. Not sure if that reflects a change in the code or more likely just a change in the way I'm running. Anyway it would still be desirable to have a non-compile toggle for this (perhaps there is one but I didn't find).
hines
Site Admin
Posts: 1682
Joined: Wed May 18, 2005 3:32 pm

Re: Suppress "First Instance Of"

Post by hines »

put
first_instance_message:off
in the .nrn.defaults file in your $HOME directory
Note: there was a bug in handling this and a fix is pushed to the GitHub repository
Post Reply