COMSOL 4.0a : how to set maximum Java heap size??

Topics: Solving, 4.2, 4.3a

Thread index  |  Previous thread  |  Next thread  |  Start a new discussion

RSS FeedRSS feed   |   Email notificationsTurn on email notifications   |   5 Replies   Last post: April 9, 2014 5:47am UTC
Hsiang-An Chan

Hsiang-An Chan

September 10, 2010 6:34am UTC

COMSOL 4.0a : how to set maximum Java heap size??

Hi,
I have problem to set comsol java heap.
In v3.5a, I know I can modify java heap in comsol.opts.
But in v4.0a, I can't find the comsol.opts, and I have no idea about setting the java heap.
Please give me help~~~
THX~

Reply  |  Reply with Quote  |  Send private message  |  Report Abuse

Carlo Peretti

Carlo Peretti

July 27, 2011 1:26pm UTC in response to Hsiang-An Chan

Re: COMSOL 4.0a : how to set maximum Java heap size??

Hi
After obtaining for 3 days the error "compile equations; error in multiphysics compilation" I understood I had to increase the heap space
In 4.2 I did this

C:\COMSOL42\bin\win64
in comsol.ini and comsolserver.ini I set the following

-Xss30m
-Xms200m
-Xmx4024m
-XX:MaxPermSize=900m

the real issue is the 3rd one, that makes the difference

Reply  |  Reply with Quote  |  Send private message  |  Report Abuse

Parikshit  Verma

Parikshit Verma

October 18, 2011 1:58am UTC in response to Carlo Peretti

Re: COMSOL 4.0a : how to set maximum Java heap size??

i believe java heap space size can be set depending upon the ram on the computer. I have set it xmx750m (i.e. 750 mb) as I have 3 gb of ram. i calculated this size by diving the ram amount by 4. However i still have the error. if
i try to increase the size, the execution of the model itself fails and further increasing it makes the matlab-comsol interface to shut down. I think presently the only way is to either increase the ram or decreese the no of nodes or timestep!

Reply  |  Reply with Quote  |  Send private message  |  Report Abuse

Carlo Peretti

Carlo Peretti

October 19, 2011 7:26am UTC in response to Parikshit Verma

Re: COMSOL 4.0a : how to set maximum Java heap size??

At present I have 8 gb of ram, 4 gb heap space (otherwise it wouldn't work, even with 3 gb!!!). I noticed though that the server needs less ram than the gui (2gb vs 4 gb).
In my opinion you should switch to a pc with more ram, if you can. 3 gb today are not enough. I feel also that a very fine mesh makes more problems than short time stepping.
Tha "fail" you talk about may also be that comsol solved the heap space problem and now somehing else came up. or it's the same error with a different name (like "compile equations error").
the shut down may be that the ram is almost full, but I never experienced this.

Reply  |  Reply with Quote  |  Send private message  |  Report Abuse

Stuart Earl

Stuart Earl

February 3, 2013 11:05pm UTC in response to Carlo Peretti

Re: COMSOL 4.0a : how to set maximum Java heap size??

I'm playing around with these settings now that I've installed 4.3a on my desktop, sounds like you're on top of this:

I've got an i7 with 16Gb ram, and want to increase the allocated number of processors.

I've increased the Xmx to 4096 (4Gb) but for some reason I can't increase the allocated number of cores past 4, which is the default allocation. (I have seven, plus the root 8th).

I've tried in Comsol under preferences, I've tried the -np <number of processors> tag when running under windows (64bit, both windows AND comsol, although windowds doesn't like it; if someone knows how to make this work I'd be appreciative).

Anyone had success with increasing their cores past 4 like this? I'm working with a 3-d rf-thermal model coupling with massively fine meshes (can't use symmetry either) so I need all the power I can get!

Cheers

Reply  |  Reply with Quote  |  Send private message  |  Report Abuse

Harinadha Reddy Digavinti

Harinadha Reddy Digavinti

April 9, 2014 5:47am UTC in response to Carlo Peretti

Re: COMSOL 4.0a : how to set maximum Java heap size??

When I am trying to do changes in comsol.ini and comsolsolver.ini, its saying "access denied " while saving.
please help

Reply  |  Reply with Quote  |  Send private message  |  Report Abuse


Rules and guidelines