Out of Java Heap Space?

1,897 views
Skip to first unread message

BNoonan

unread,
Jul 25, 2007, 5:14:16 PM7/25/07
to Maxent
Apart from the extremely frustrating issue of random ")" and "!"
replacing 9's and 1's respectively in my .asc files (advice on this?)
MaxEnt is crashing and indicating that it is out of memory. Exact
message and system info below. Thanks in advance.

Error: "Please refer to help button: java.lang.OutOfMemoryError: Java
heap space"

I am running this on a single processor G5 Mac with 1.25 GB RAM.

Thanks,

Brice

Dan.L....@gmail.com

unread,
Jul 26, 2007, 2:34:28 PM7/26/07
to Maxent
Are you clicking maxent.bat or maxent.jar? The .bat file basically
contains a couple of command line arguments with, in addition to other
things, tell your system how much memory to allocate for Maxent to
run. If you aren't clicking the .bat file, try that. If you are, you
can edit the .bat file to allocate more memory. It should say
something like this:

java -mx512m -jar maxent.jar

Which allocates 512 megs of memory to maxent. If you have more than
that available to you, you can just change that number and it should
fix your problem.

Dan.L....@gmail.com

unread,
Jul 26, 2007, 2:35:37 PM7/26/07
to Maxent

That was supposed to say "which", not "with".

Steven

unread,
Jul 27, 2007, 10:01:42 AM7/27/07
to Maxent
Brice,

If you're running on a Mac, the .bat file probably won't work for you
-- it's for MS Windows users. Instead, start Maxent from a command
window using, for example:

java -mx1000m -jar maxent.jar

-- Steven

Tim

unread,
Aug 6, 2007, 10:24:37 PM8/6/07
to Maxent
The best thing to do is create swd files. They are a bit of a hassle
to set up, you need to select random points from all your
environmental layers. But they make future runs so much faster. Also
you control the randomisation procedure. I use 20,000 random points as
I get slightly better AUCs that way.
Tim

> > Brice- Hide quoted text -
>
> - Show quoted text -

bwsmith1

unread,
Aug 23, 2007, 1:33:15 PM8/23/07
to Maxent
The computer that I have been running MaxEnt on has 3.50GB of RAM
available on it. However, when I replace 512 with any number larger
than 1000 then the program will not run; the command line box will pop
up when maxent.bat is clicked on, but the rest of the interface will
not (the command line box will also disappear in less than a second).
Is there any reason that MaxEnt would be doing this?

Steven Phillips

unread,
Aug 24, 2007, 11:01:44 AM8/24/07
to Max...@googlegroups.com
Brice,

From the readme.txt file that comes with the Maxent code:

Maxent.bat assumes that your computer has at least 512 megabytes of
memory. If this is not the case, you should edit the file (for
example, using Notepad) to reduce the amount of memory it requests.
Just replace the number "512" with a little less than the amount of
memory your computer has. You also can increase the amount of
memory available to the program in this fashion. If your computer
has more than 512 megabytes of memory, you should increase the
amount described in the file. For example, if your computer has a
gigabyte of memory, replace the number "512" with "900" (leaving a
little for other programs). However, if your computer is running
Microsoft Windows, there is unfortunately an upper limit of about
1.3 gigabytes that Windows can give to Java.

If you run under Linux, there should be no problem using all the
available RAM. I would guess the same is true for Macs, but I don't
know. For Windows, you're pretty much limited to about 1.3 GB, with
the exact number varying from PC to PC.

If you want to see what Java's complaint is, open a command window
manually and paste in the command line from maxent.bat.

-- Steven

Reply all
Reply to author
Forward
0 new messages