Page 1 of 1

No more memory available

Posted: Wed Nov 27, 2013 10:43 am
by DaveTheWalker
I'm trying a relatively simple WeatherData request on my Model B (256MB) - I've set the memory split to only give 16MB to the graphics, but I get this error.

Any ideas?
In[1]:= WeatherData["Harwell"]
Installing data from Wolfram Research data server ....
Initializing WeatherData indices ....
Initializing WeatherData indices ....
Initializing WeatherData indices ....
Installing data from Wolfram Research data server ....
Initializing CityData indices ....
Initializing CityData indices ....
Initializing CityData indices ....
Initializing CityData indices ....

No more memory available.
Mathematica kernel has shut down.
Try quitting other applications and then retry.
edit: I'm using the command-line version of wolfram, and NOT running "x"

Re: No more memory available

Posted: Fri Nov 29, 2013 12:08 pm
by duberry

Re: No more memory available

Posted: Fri Nov 29, 2013 3:25 pm
by alexatwri
I understand why this particular function is using a lot of memory, but in this case I can't say for certain that it's ever going to work well on a Raspberry Pi Model A. For the moment, if you find yourself running out of resources, you can always have us do the calculation:

Code: Select all

weather = WolframAlpha["weather in Oxfordshire"]
That should give you a set of "subpods" that you can iterate over. You can find more information about WolframAlpha[] here:

http://reference.wolfram.com/language/r ... Alpha.html

I will look into this and see if we can make this operation less gluttonous.

For reference, this is what I got when running the operation on a much more resource rich ARM system:

Code: Select all

In[4]:= WeatherData["Harwell"]                                                     
Installing data from Wolfram Research data server ....
Initializing WeatherData indices ....
Initializing WeatherData indices ....
Initializing WeatherData indices ....
Installing data from Wolfram Research data server ....
Initializing CityData indices ....
Initializing CityData indices ....
Initializing CityData indices ....
Initializing CityData indices ....

WeatherData::notent: 
   "Harwell" is not a known entity, class, or tag for WeatherData. Use WeatherData
    [] for a list of entities.

Out[4]= WeatherData[Harwell]

In[5]:=     
I used "Oxfordshire" (I don't know if this is correct) because Wolfram Alpha doesn't seem to know what Harwell is, either.

Re: No more memory available

Posted: Sat Nov 30, 2013 12:45 am
by madler
Same thing happened to me on a 512 MB RPi when trying to use

Code: Select all

AstronomicalData[]
. The kernel up and died after several minutes of trying to initialize indices.

Re: No more memory available

Posted: Mon Dec 02, 2013 10:57 pm
by Arnoud
AstronomicalData[] (with no semi-colon) will download and try to print out about 156,770 names of astronomical objects.

AstronomicalData[]; (with a semi-colon) will download and cache the data (off-line) locally on your Raspberry Pi.

I would not expect "AstronomicalData[]" to work (I did not try it), but "AstronomicalData[];" works for me (to create a local cache of the data).

Re: No more memory available

Posted: Tue Dec 17, 2013 5:08 pm
by sandheaver
If you want weather for a specific city, use:

Code: Select all

WeatherData[{"City", "State or Country"}, "Temperature"]
for example, for me, I would use:

Code: Select all

WeatherData[{"Moline", "IL"}, "Temperature"]
Any city will work; (edit: Except, apparently, Harwell) if there's no weather available for the location you provide, the nearest location with known data will be chosen. Part of why this takes so long the first time you run it is because it downloads a list of cities, and the locations of each city, then the list of weather stations and then finds the nearest one to you. It's very robust, but resource-intensive.

edit: Harwell doesn't work for some reason. It is not a known city, I guess. Your best bet would be to try Abingdon, instead.

Code: Select all

WeatherData[{"Abingdon", "Oxfordshire", "UK"}, "Temperature"]
You may be able to omit the Oxfordshire bit.

Re: No more memory available

Posted: Wed Dec 18, 2013 9:13 am
by DaveTheWalker
Thanks for your help... I still get this, though:
  • In[1]:= WeatherData[{"Abingdon","Oxfordshire","UK"},"Temperature"]
    Initializing WeatherData indices ....
    Initializing WeatherData indices ....
    Initializing CityData indices ....
    Initializing CityData indices ....
    Initializing CityData indices ....
    Initializing CityData indices ....

    No more memory available.
    Mathematica kernel has shut down.
    Try quitting other applications and then retry.

Re: No more memory available

Posted: Wed Dec 25, 2013 8:13 am
by madler
I was referring to the function

Code: Select all

AstronomicalData[]
, not what I typed. I typed

Code: Select all

AstronomicalData["Properties"]
, which should produce a relatively short list. Instead it resulted in the indices message followed by the Mathematica kernel running out of memory and quitting.