Pointer Vector warning - python NEURON running on clusters

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

Moderator: hines

Post Reply
catubc
Posts: 21
Joined: Mon Apr 07, 2014 6:46 pm

Pointer Vector warning - python NEURON running on clusters

Post by catubc » Wed May 27, 2015 11:31 am

Dear All

I'm running some code parallel context on a cluster and getting an odd warning. The code runs fine on my laptop and home workstation.

The warning is this:

***************************************************************************

5 nrniv: PtrVector has no ptr_update callback
5 near line 0
5 ^
6 nrniv: PtrVector has no ptr_update callback
6 near line 0
6 ^
0 nrniv: PtrVector has no ptr_update callback
0 near line 0
0 ^
3 nrniv: PtrVector has no ptr_update callback
3 near line 0
3 ^
1 nrniv: PtrVector has no ptr_update callback
1 near line 0
1 ^
4 nrniv: PtrVector has no ptr_update callback
4 near line 0
4 ^
2 nrniv: PtrVector has no ptr_update callback
2 near line 0
2 ^

***************************************************************************

These are the sections of my code where pointer vectors are used to gather nseg currents.

Any suggestions what these errors/warning could be are much appreciated.

Thanks,
catubc

Code: Select all


...
        self.ptr2im = h.PtrVector(self.nseg)  # pointer vector

...

    def setPtr2im(self): 
        
        jseg = 0
        for sec in self.hoc.all:  
            for seg in sec:    
                self.ptr2im.pset(jseg,seg._ref_i_membrane)
                jseg +=1

....

    def getIm(self): # get membrane currents from PtrVector into iMemVec (no loop)

 
        self.ptr2im.gather(self.imVec)       
 
        return self.imVec.as_numpy()*1E-5 # 1E-5 is used to covert (mA/cm^2)->(uA/um^2)
     


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

Re: Pointer Vector warning - python NEURON running on cluste

Post by hines » Wed May 27, 2015 3:21 pm

If you have requested that the memory be reorganized to be more cache efficient (e.g cvode.cache_efficient(1)) then at an appropriate time before starting
a run (e.g. during finitialize) the system may reallocate all the variables for mechanisms into more contiguous arrays). Of course this means that all pointers to that
memory have to be updated to point to the new locations and for PtrVector this is not conveniently done automatically. Hence the possibility of registering a
callback such as, in your case, setPtr2im. This is a warning and not an error because one often does this within an FInitializeHandler instead. Or perhaps the
pointer vector is known to point to stable memory locations. (i_membrane and the new i_membrane_ can get reallocated)
See:
http://www.neuron.yale.edu/neuron/stati ... e_callback

Post Reply