Discussion Forum

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

Topics: Solving, 4.2

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

RSS FeedRSS feed   |   Email notificationsTurn on email notifications   |   3 Replies   Last post: October 19, 2011 7:26am 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


Rules and guidelines