If you get an error message like this:
Error in sweep: Java heap space
try to increase the Java heap. Open the
comsol.ini
file located in the subdirectory bin/$arch
in the COMSOL installation directory, where $arch
corresponds to the platform you are using. Modify the number in the row that starts with -Xmx
, its value is the Java heap size. If you have enough RAM, try doubling the size. This will give the line -Xmx2048m
for a 64-bit platform. Repeat this for all *.ini
files in the same directory.If you do not have write permission to the
bin/$arch
directory, you can instead try the following:- Copy the
comsol.ini
file to a folder where you have write permission. - Open the file and modify it according to the instructions above.
- When you launch COMSOL, add the option
-comsolinifile [path]
to the COMSOL command, where [path] is the path to your newcomsol.ini
file.
Also here we can find some recommendations on how to deal with java.lang.OutOfMemoryError in Java, http://javarevisited.blogspot.co.il/2011/09/javalangoutofmemoryerror-permgen-space.html