1GB Kernel Memory Limit

Mathematica

    Next

  • 1. geodesic
    How can I draw geodesic on some surface, open or closed surfaces. For example ellipsoid. Thanx -- Matija Herceg
  • 2. Problem creating image file via J/Link
    Hi. For some reason, the very simple J/Link code segment: <get kernel link stuff here> .... byte[] gifData = ml.evaluateToImage("Plot[Sin[x],{x,0,2 Pi}]",0,0,0, false); try { FileOutputStream s = new FileOutputStream(new File("foo.gif")); s.write(gifData); s.close(); } catch (IOException e) {System.out.println("Failed to open file.");} creates a graphics file "foo.gif" with nothing in it except the text "In[1]:=" I attached a packet listener to see what was happening and it produced this little nugget: Packet type was ReturnPacket. Contents follows. "In[1]:= " Packet type was ReturnPacket. Contents follows. "Null" I tried another route. Created a little stub routine Test.m which had the function: disFig[] := [<stuff> Display["foo.gif", Plot[Sin[x], {x, 0, 2 Pi}], "GIF"] ] Then I called Test.m in a J/Link program via the lines: ml.evaluate("<<Test.m"); ml.discardAnswer(); ml.evaluate("disFig[]"); Same result: A file foo.gif with only the line "In[1]:=". Any ideas on what's going wrong? Thanks.

1GB Kernel Memory Limit

Postby Pillsy » Sun, 07 Jun 2009 05:12:04 GMT

Hi, all,

I'm currently working on a problem that requires a whole lot of memory
to complete. Sometimes, depending on the specific parameters being
used, I will receive the dreaded, "No more memory available," message.
Doing  my best to track memory usage with MemoryInUse[], MaxMemoryUsed
[] and the Windows Task Manager, I find that the kernel quits when it
hits a limit of around one gigabyte.

I'm using Version 7.0 on 32-bit Windows XP without the /3GB switch
active; neither switching to a 64 bit OS nor activating the /3GB
switch are possibilities. However, I was under the distinct impression
that even without the /3GB switch active I should have a per-process
memory limit of 2GB, not 1GB. Is there some other reason the kernel
might quit, due to either Mathematica settings or OS settings?

As for modifying my program I've done obvious things like setting
$HistoryLength = 0, Clear[]ing things that are no longer needed, and
none of them have done the trick in all cases I've needed to deal
with. I've also done an array of not-so-obvious things that haven't
worked either.

Any suggestions would be greatly appreciated.

Thanks
Pillsy


Re: 1GB Kernel Memory Limit

Postby Jens-Peer Kuska » Sun, 07 Jun 2009 16:48:14 GMT

Hi,

MacOS X Snow Leopard
Windows XP 64 Bit,
Windows Vista 64 Bit,
Linux 64 Bit

are 4 possible options ...

Regards
   Jens





Re: 1GB Kernel Memory Limit

Postby David Bailey » Sun, 07 Jun 2009 16:48:46 GMT


Well, I guess the first question, is if there is reason to expect to be 
able to run your code in the space available. You do not give enough 
information to decide that. Assuming most of the memory is consumed in 
large arrays, have you tested these to ensure they are packed using 
Developer`PackedArrayQ. A common reason for arrays to fail to pack, is 
if you have the odd integer mixed with an array of Real's - all the data 
must have the same type in order to pack.

Not all software takes advantage of the 3GB switch - I don't know if 
MathKernel does or not. Under 32-bit Windows, you can't ever get a 
contiguous block of memory of even 2GB - even if you use the 3GB switch 
- so if Mathematica requests its memory as one chunk, that could explain 
what you find.

Of course, you have supplied the real answer already - install 64-bit 
Windows and sufficient memory. This is my configuration, and it works 
beautifully

David Bailey
 http://www.**--****.com/ 





Return to Mathematica

 

Who is online

Users browsing this forum: No registered users and 9 guest