net_move with C-N fixed step and NetCon between two pps

General issues of interest both for network and
individual cell parallelization.

Moderator: hines

Post Reply
vgoudar
Posts: 19
Joined: Fri Dec 03, 2010 3:41 am

net_move with C-N fixed step and NetCon between two pps

Post by vgoudar »

Hi,

1. Im seeing a difference in behavior when I run the following code, based on thether I use implicit fixed step or C-N fixed step in the numerical method selection:

Code: Select all

NET_RECEIVE(weight, release, dead) { LOCAL q
    INITIAL { release = 0 dead = 0 }
    if (flag == 0)
    {
	net_send(Delay,1)
    } else {
    q = (t - lastrelease -Cdur)
    : release indicates internal binary release state when event is received
    : dead indicates internal binary dead state when event is received
    : flag indicates the event type received - 
    :            0 (external release event), 
    :            1 (internal event signalling end of release and start of dead time), 
    :            2 (internal event signalling end of dead time)
    if (dead == 0) { : external release event after dead time
        if (flag == 1) {
	    lastrelease = t 
	    ...

	    if (!release) { : not currently releasing
	       release = 1
	       : come again in Cdur with flag = 2 
      	       	       printf("send 2\n") 
		       net_send(Cdur, 2) 
	    }
	    else {
	        : already releasing, so move start of dead time 
      	        printf("move 2\n") 
                VERBATIM
                fflush(stdout);
               ENDVERBATIM
               net_move(t + Cdur)
	    }
	}
	else if (flag == 2) { : internal event to turn release off
	    release = 0
	    dead = 1                       : turn dead time on
            ...
            VERBATIM
            fflush(stdout);
            ENDVERBATIM
	    printf("send 3\n") 

	    net_send(Deadtime, 3)	
	}
    }
    else { : dead == 1
          printf("dead")
          VERBATIM
          fflush(stdout); 
          ENDVERBATIM
        if (flag == 3) { : internal event to turn dead time off
            dead = 0
	}
	...
    }
    }
}
With implicit fixed time, I see no errors and the order of prints are "send 2"'s followed by "send 3"'s followed by "dead"'s. However, with C-N fixed step, I see "send 2"'s followed by a single "move 2" followed by this error message.

/Applications/NEURON-7.1/nrn/umac/bin/nrniv.app/Contents/MacOS/nrniv: No event with flag=1 for net_move in IPlasSyn[358]

Can you please help me figure out what the difference is?

2. My second question is regarding a NetCon connecting two point processes on different neurons. The sender point process generates events with a net_event() call. Therefore, my NetCon instantiation looks like new NetCon(source_point_process, destination_point_process). Only when I run with multiple threads, I get this error:

/Applications/NEURON-7.1/nrn/umac/bin/nrniv.app/Contents/MacOS/nrniv: usable mindelay is 0 (or less than dt for fixed step method)

I checked all my other NetCons and they have delays greater than 0.1 (my dt set in the run controls). I then proceeded to change the NetCon in question to NetCon(source_point_process, destination_point_process, 0, 0.1,0.1) to no avail. What gives? Ive double checked all my NetCons and all my net_sends net_moves and net_events and they all have at least a 0.1 delay.
hines
Site Admin
Posts: 1691
Joined: Wed May 18, 2005 3:32 pm

Re: net_move with C-N fixed step and NetCon between two pps

Post by hines »

please send a zip file with the mod.hoc,py files needed to exhibit the error
along with instructions to
michael dot hines at yale dot edu.

With regard to question 2, the notice is not quite correct for threads. Threads require a minimum NetCon delay which is greater than dt.
Try again with dt = 0.05.
vgoudar
Posts: 19
Joined: Fri Dec 03, 2010 3:41 am

Re: net_move with C-N fixed step and NetCon between two pps

Post by vgoudar »

Great! Your solution to my second issue also fixed the problem seen with the first one. Thanks!
Post Reply