No. of variables allowed? [message #21076] |
Wed, 09 August 2000 00:00  |
Med Bennett
Messages: 109 Registered: April 1997
|
Senior Member |
|
|
Greetings,
I am having a rather severe problem with IDL 5.0.2. I have a IDL data
file with a lot of variables, currently about 250. When I ran a program
that created som new variables, I found to my horror that IDL was
replacing variable contents with the contents of other variables, i.e. a
variable called 'AREAID', intead of being a string array of size 16, was
now a float[193], etc. This was occuring without any warnings or error
messages being given; only when some of my routines begin failing due
to data having been overwitten did I realize what was going on. It
appears that when I attempted to create variables in excess of 255 (a
guess) , IDL began to randomly reassign existing variables with new
contents. This is very disturbing, as the integrity of a lot of my data
is now in question. Some questions: Is there an absolute limit on the
number of variables in a .sav file? Do later versions of IDL have this
limit? Why is there no warning of a limit being reached? I realize now
that I need to compartmentalize my data and reduce the number of
variables in a single session, but I'm curious if others have had this
problem or have any suggestions. Thanks in advance-
A slightly panicked
Med Bennett
|
|
|
Re: No. of variables allowed? [message #21150 is a reply to message #21076] |
Thu, 10 August 2000 00:00  |
Kristian Kjaer
Messages: 58 Registered: June 1998
|
Member |
|
|
Med Bennett wrote:
> Greetings,
>
> I am having a rather severe problem with IDL 5.0.2. I have a IDL data
> file with a lot of variables, currently about 250. When I ran a program
> that created som new variables, I found to my horror that IDL was
> replacing variable contents with the contents of other variables, i.e. a
> variable called 'AREAID', intead of being a string array of size 16, was
> now a float[193], etc. This was occuring without any warnings or error
> messages being given; only when some of my routines begin failing due
> to data having been overwitten did I realize what was going on. It
> appears that when I attempted to create variables in excess of 255 (a
> guess) , IDL began to randomly reassign existing variables with new
> contents. This is very disturbing, as the integrity of a lot of my data
> is now in question. Some questions: Is there an absolute limit on the
> number of variables in a .sav file? Do later versions of IDL have this
> limit? Why is there no warning of a limit being reached? I realize now
> that I need to compartmentalize my data and reduce the number of
> variables in a single session, but I'm curious if others have had this
> problem or have any suggestions. Thanks in advance-
>
> A slightly panicked Med Bennett
I think we once saw something similar in IDL 5.0.
Using a batch file we created lots of variables at main level. 257
variables, say, even thousands of variables. Everything was fine. Then
we got into a house-keeping mood and decided to DELVAR those variables
that we did not need any more. (The reason being, I think, that in IDL4,
which we were also using, there were more stringent limits on the number
of variables you could have.) After that the IDL symbol table was
completely screwed up, just as Med describes. It seemed that if you had
more than 256 variables at main level and if you DELVAR'd one of them,
then chaos would result.
Note: We did not, as I recall, try to save and restore anything.
- Kristian
PS: I just tried something similar in IDL5.2. That seems to work OK.
--------
Kristian Kjær, Risø Nat'l. Laboratory, Denmark
|
|
|