Help on pointprocess initialization with multirun fitter

Using the Multiple Run Fitter, praxis, etc..
Post Reply
eacheon
Posts: 97
Joined: Wed Jan 18, 2006 2:20 pm

Help on pointprocess initialization with multirun fitter

Post by eacheon »

Hi,

I have problem with using pointprocess with multirun fitter.
Here is what I did:

1. load the model.
2. load the saved multirun fitter session.
3. press "Error Value" button in window "MulRunFitter[0] Generator"
it worked fine and gave me an error value of 1.0341e-07.
4. (optional) change a parameter value.
5. click the "Error Value" buttion mentioned in (3) again. I got error message:

Code: Select all

oc>/myhome/nrn59/nrn/i686/bin/nrniv: Pointer points to freed address: seclampList.o(0).i
 near line 5
 {efun()}
         ^
        FitnessGenerator[0].efun()
initcode failed with 2 left

6. but after this in command line I can still get:

Code: Select all

oc>seclampList.o(0)
        SEClamp[1] 
oc>seclampList.o(0).i
        0.26797352 
seclampList is a list used to keep a reference to the SEClamp object created. When init() is called, the old SEClamp object is dereferenced and a new SEClamp is attached, so seclampList contains always one object, SEClamp[0], SEClamp[1], etc...

Is distroying old pointprocess and create new ones a bad approach to do work with MulRunFitter? How can I arrange my pointprocess so they can be changed during every iteration? Sometime I find recreate the pointprocess is simpler than finding the pointprocess and modify its parameters
ted
Site Admin
Posts: 6286
Joined: Wed May 18, 2005 4:50 pm
Location: Yale University School of Medicine
Contact:

Post by ted »

From your description, it is hard for me to know exactly what you did. However, when an
error message complains that something was "freed," it means that there has been an
attempt to refer to an object that has been destroyed.
eacheon
Posts: 97
Joined: Wed Jan 18, 2006 2:20 pm

Post by eacheon »

ted wrote:From your description, it is hard for me to know exactly what you did. However, when an
error message complains that something was "freed," it means that there has been an
attempt to refer to an object that has been destroyed.
My confusing is exactly here: in my undserstanding according to the error message, seclampList.o(0).i appears a "freed address" to MulRunFitter, but for oc interpreter seclampList.o(0).i was just fine, it refers to i of the first element in seclampList, though this element was previously distroyed (SEClamp[0]) and created (SEClamp[1]) again.

Later on today I'll try to reduce this to a minimal ses file and post it here, let's see if I can find out something I would have known but ignored.
ted
Site Admin
Posts: 6286
Joined: Wed May 18, 2005 4:50 pm
Location: Yale University School of Medicine
Contact:

Post by ted »

seclampList.o(0).i appears a "freed address" to MulRunFitter, but for oc interpreter seclampList.o(0).i was just fine, it refers to i of the first element in seclampList, though this element was previously distroyed (SEClamp[0]) and created (SEClamp[1]) again.
That's exactly what caused the problem. SEClamp[0] and SEClamp[1] are different objects.
Somewhere in your hoc code, or in a ses file, there may be a direct reference to
SEClamp[0]. Or maybe something references seclampList.o(0).i, then seclampList.o(0) is
destroyed. Either way, you'll get a "freed" error message.
eacheon
Posts: 97
Joined: Wed Jan 18, 2006 2:20 pm

Post by eacheon »

ted wrote:That's exactly what caused the problem. SEClamp[0] and SEClamp[1] are different objects.
...
Or maybe something references seclampList.o(0).i, then seclampList.o(0) is
destroyed. Either way, you'll get a "freed" error message.
Oh, thanks for the prompt answer, the quoted part are what happened in my case. It saved me a lot of time.
Post Reply