Discussion Closed This discussion was created more than 6 months ago and has been closed. To start a new discussion with a link back to this one, click here.

Error:-18, COMSOL with MATLAB

Please login with a confirmed email address before reporting spam

Dear COMSOL Experts,

When I run my own created model using COMSOL LIVELINK with MATLAB, COMSOL with MATLAB window shows an error:-18. After all the commands in the function scripts are executed, it shows error such as
Error using com.comsol.model.impl.SolverSequenceImpl/runAll
Java exception occurred:
Exception:
com.comsol.util.exceptions.FlException: Failed to find a solution for all parameters
............................................................................
Out of memory LU factorization

Returned solution is not converged
- Feature: Stationary Solver 1 (sol1/s1)
- Error: Failed to find a solution for all parameters,
................................................................................

My model file .mph does not have any bug since I got results from graphic user interface.

However, when I run the busbar.mph and busbar.m obtained from the model library of COMSOL, using COMSOL with MATLAB, it works fine. I also performed geometry parameterization of busbar.mph model it provides accurate results.

Why am I getting this error for my created model even though my GUI model does not provide any error?

I appreciate your response.

Regards
Mazhar

2 Replies Last Post 08.11.2012, 04:51 GMT-5

Please login with a confirmed email address before reporting spam

Posted: 1 decade ago 07.11.2012, 05:03 GMT-5
Hi Mazhar,

it did happen to me that the model launched from LiveLink crashed while the one from the Comsol GUI ran perfectly.

I suggest you to import and run in Comsol GUI the model from the LiveLink server (of course the one which fails to run in Matlab). If it works as it is, save your model as m-file and compare it with the one imported just before.
If I remember correctly, it happened to me that Comsol GUI added some lines to the model object of mine which wasn't running via LiveLink.

Hope it helps,
Mattia
Hi Mazhar, it did happen to me that the model launched from LiveLink crashed while the one from the Comsol GUI ran perfectly. I suggest you to import and run in Comsol GUI the model from the LiveLink server (of course the one which fails to run in Matlab). If it works as it is, save your model as m-file and compare it with the one imported just before. If I remember correctly, it happened to me that Comsol GUI added some lines to the model object of mine which wasn't running via LiveLink. Hope it helps, Mattia

Winfried COMSOL Employee

Please login with a confirmed email address before reporting spam

Posted: 1 decade ago 08.11.2012, 04:51 GMT-5
Dear Mazhar,

the computation stopped since you ran out of memory:

............................................................................
Out of memory LU factorization

If you start the LiveLink mit Matlab, Matlab itself will also consume resources of your machine. Did you already check the memory consumption of the comsol and the matlab process? It may help to try another (iterative) solver or to use the out-of-core functionality of Pardiso.

If it is a parametric sweep it may also help to keep only the last parametric step in memory and e.g. safe the rest to a model file (Study1>Parametric Sweep>Study Setting>Memory settings for job ... help for further details).

Did you already check knowledge base article 1030?
www.comsol.com/support/knowledgebase/1030/

Hope that helps.
Regards,
Winfried
Dear Mazhar, the computation stopped since you ran out of memory: ............................................................................ Out of memory LU factorization If you start the LiveLink mit Matlab, Matlab itself will also consume resources of your machine. Did you already check the memory consumption of the comsol and the matlab process? It may help to try another (iterative) solver or to use the out-of-core functionality of Pardiso. If it is a parametric sweep it may also help to keep only the last parametric step in memory and e.g. safe the rest to a model file (Study1>Parametric Sweep>Study Setting>Memory settings for job ... help for further details). Did you already check knowledge base article 1030? http://www.comsol.com/support/knowledgebase/1030/ Hope that helps. Regards, Winfried

Note that while COMSOL employees may participate in the discussion forum, COMSOL® software users who are on-subscription should submit their questions via the Support Center for a more comprehensive response from the Technical Support team.