Page 1 of 1

Suppress "First Instance Of"

Posted: Wed Aug 29, 2012 5:58 pm
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

Re: Suppress "First Instance Of"

Posted: Thu Aug 30, 2012 12:46 pm
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?

Re: Suppress "First Instance Of"

Posted: Thu Aug 30, 2012 2:16 pm
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

Re: Suppress "First Instance Of"

Posted: Fri Aug 31, 2012 7:38 am
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.

Re: Suppress "First Instance Of"

Posted: Mon Dec 04, 2017 5:11 am
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).

Re: Suppress "First Instance Of"

Posted: Mon Dec 04, 2017 7:19 am
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