Re: Will TCL release the variables automatically when the procedure is finished?
- From: claird@xxxxxxxxx (Cameron Laird)
- Date: Fri, 12 Sep 2008 19:08:40 +0000
In article <f33b8421-3dbd-4c05-b3ae-1024efd7f5ac@xxxxxxxxxxxxxxxxxxxxxxxxxxxx>,
bingo <zhngbn@xxxxxxxxx> wrote:
.
.
.
Thanks a lot for your response..
Actually, I'm really not that clear about the relationship between C
code and TCL script. I'm guess (3) because the way how it works is:
(1) I can write some input files using TCL.
(2) NAMD will parse the input file and do the simulation.
(3) Another interesting thing is you can define a "proc" using TCL,
and ask NAMD to call that proc each step and get information.
Now the problem is that I got "OUT OF MEMORY" error while running
the proc I defined in TCL(and I can see the memory increasing each
step). At first I thought it could be that the variables in the proc I
defined are not freed. But I tried to unset them explicitly, and still
the same problem. Then I start to google and being a little desperate,
that's where I find the function "TCL_Finalize", which I don't
understand at all.
Any suggestion about the error will be greatly appreciated.
.
.
"Working too hard" is my label for this situation.
I understand the sense of what you've done. It's quite far
from the simplest possible, though.
Put away the source code at the level of TCL_Finalize().
You have done well to note that "memory increas[es] each
step". Is the [proc] you defined small enough that you
can reasonably write it here? If not, make it small!--
that is, simplify the system down to something minimal
that exhibits the bad memory behavior, but is small
enough to be understandable.
It's hard for a simple, small proc to run out of memory
without something obvious to correct.
We can get through this.
.
- References:
- Will TCL release the variables automatically when the procedure is finished?
- From: bingo
- Re: Will TCL release the variables automatically when the procedure is finished?
- From: bingo
- Re: Will TCL release the variables automatically when the procedure is finished?
- From: Alexandre Ferrieux
- Re: Will TCL release the variables automatically when the procedure is finished?
- From: bingo
- Will TCL release the variables automatically when the procedure is finished?
- Prev by Date: Re: Will TCL release the variables automatically when the procedure is finished?
- Next by Date: Re: Will TCL release the variables automatically when the procedure is finished?
- Previous by thread: Re: Will TCL release the variables automatically when the procedure is finished?
- Next by thread: Re: Will TCL release the variables automatically when the procedure is finished?
- Index(es):
Relevant Pages
|