Note: This discussion is about an older version of the COMSOL Multiphysics® software. The information provided may be out of date.
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.
COMSOL with MATLAB Error
Posted 27.05.2010, 15:17 GMT-4 Interfacing Version 4.0a 22 Replies
Please login with a confirmed email address before reporting spam
Bit of a boring generic question I'm afraid but if anyone has come across this error any help would be appreciated.
I've been trying to get the COMSOL with MATLAB livelink working and after some trials managed to get the shortcut to finally appear :). however I can't seem to get it to work as i keep getting an error:
com.comsol.util.exceptions.FlException: Unable to get the user manager
Messages:
Unable to get the user manager
I think it could be a path problem as it was a problem before hand with having MATLAB installed on the D:\.
However when i run D;\COMSOL40\Bin\win32\comsol matlab
I can get it to load up both however fail to actually get it to run any of my models as I get an error:
Exception:
com.comsol.util.exceptions.FlException: Launching COMSOL Server automatically is currently not supported
Messages:
Launching COMSOL Server automatically is currently not supported
Stack trace:
at com.comsol.model.clientserver.ClientManagerImpl.launchServer(Unknown Source)
at com.comsol.model.util.ModelManager.create(Unknown Source)
at com.comsol.model.util.ModelUtil.create(Unknown Source)
another possible path problem?
any help is appreciated.
Kind Regards MF
Please login with a confirmed email address before reporting spam
but have you checked/studied the installation guide of comsol, ensured that your comsol.ini files have the correct matlab path, and there are a few ways to launch matlab an comsol, try them out.
Finally there is also the version compatibility between matlab and COMSOL. Pls check also the forum (do a search) and the knowledge base
Hope this helps
Ivar
Please login with a confirmed email address before reporting spam
Just in case you haven't solved this yet, maybe this will help:
I just installed v4 with Matlab R2010a and was getting the same error. After fiddling with a bunch of stuff, I ended up running comsolserver (no space) which prompted me for a username/password which I made up and entered. After I exited this program (typed 'close'), I then tried the 'COMSOL with MATLAB' star menu shortcut again and everything worked fine. Not sure what I accomplished, but hey, solved my problem.
FYI, I installed on a Linux Machine (Ubuntu 10.4) and Windows (Vista SP2) and had the same problem on each. The above fixed both instances.
Please login with a confirmed email address before reporting spam
www.comsol.com/support/knowledgebase/1071/
Please login with a confirmed email address before reporting spam
I'm also trying to livelink comsol and matlab, and got the same errors.
however, after I changed the path in the shortcut and entered a username and password, it started matlab alone, without comsol.
I closed matlab and used the shortcut, and again it opened only matlab, without asking for a username.
does anybody know what I'm supposed to do?
thank you,
yael.
Please login with a confirmed email address before reporting spam
as it is stated in the doc, you should ONCE first launch the server alone and provide your username password, then you can launch comsol server and matlab. hey link via a localhost tcpip link and the server needs to log in, via its console. It must be done "by hand", at least once, then normally matlab starts OK, provided that the matlab path is correclty entered in the ini files. This operation might be required after a new patch update too I believe
have fun Comsoling
Ivar
Please login with a confirmed email address before reporting spam
but as I said, when I launch "comsol 4.0 with matlab" only matlab starts, and comsol does not.
have you encountered this problem before?
yael.
Please login with a confirmed email address before reporting spam
The "Comsol 4.0 with Matlab" function is meant to only start Matlab with Comsol functionality. All the functions needed to create/run/analyze models and simulations are loaded into this instance of Matlab. A Comsol window will not open with this command. This is different than with Comsol <4 where a Comsol window would be opened.
-Kyle
Please login with a confirmed email address before reporting spam
I contacted a COMSOL rep about this issue today. It looks like Kyle is on the right track:
www.comsol.com/support/knowledgebase/1071/
I have tried using the KB suggestion, changing comsol.exe to comsolserver.exe. I did get a DOS prompt asking me to create a user/pw. Having done so nothing happened. Subsequent attempts to launch Comsol with Matlab yields a DOS window saying "COMSOL 4.0 started listening on port 2036", however nothing else happens.
Comsol.ini inside the Comsol install dir reads the correct location of the Matlab folder. I am using Matlab R2008b, Comsol 4.0 version 935 (patched), Windows XP 64 bit.
/Samuel
Please login with a confirmed email address before reporting spam
I am using Matlab R2008b, Comsol 4.0 version 935 (patched), Windows XP 64 bit.
/Samuel
Samuel,
Your problem may be that R2008b is not supported by Comsol 4.0, looks like only R2009b and R2010a are supported.
www.comsol.com/products/requirements/windows/
Please login with a confirmed email address before reporting spam
Thank you for the suggestion, however, having installed Matlab R2010a, the Comsol/Matlab interface still hangs at the same step as previously reported...
/Samuel
Please login with a confirmed email address before reporting spam
I also have the problem that I miss the COMSOL and MATLAB shortcut.
How did you get it to appear?
Regards, Sabine
Please login with a confirmed email address before reporting spam
I've got following information from support.:
"COMSOL with MATLAB in version 4.0 does no longer start a COMSOL GUI by typing "comsol" in the MATLAB prompt. "
See documentation: LiveLink™ for
MATLAB User's Guide. --> Getting started. (llmatlab_ug.pdf).
Roland Martin
Please login with a confirmed email address before reporting spam
kyle, you're saying that comsol is not supposed to start at all?
I'm solving (or trying to solve) a heat transfer problem, with one of the material's properties calculated from a matlab function.
when I worked with COMSOL 3.5a, it started the two softwares simultaneously, and all I had to do is to insert the matlab function name to the property field and it worked, with no need to work with matlab myself during the run.
can't I do the same with COMSOL 4.0?
I saw that I can insert a matlab function to comsol, but it just doesn't recognize it when I start COMSOL normally, obviously.
thanks,
yael.
Please login with a confirmed email address before reporting spam
I'm fine with COMSOL not starting, however, I would like Matlab to do so - staring at a DOS window seems an unprofitable waste of time:)
/Samuel
Please login with a confirmed email address before reporting spam
Thanks so much for your advice.
Please login with a confirmed email address before reporting spam
have you checked the new "external function import" in V4.
You can define an external functions in the Global Definitions sub nodes.
I havent had time to test it yet but I would appreciate to hear how well it works ;)
--
Good luck
Ivar
Please login with a confirmed email address before reporting spam
I do have the same problem with finding the comsol with matlab shortcut. And I am also very interested in how Micheal did solve the problem.
I got matlab 2009b installed and I have the matlab livelink included in comsol 4.0a, but there is no shortcut in the windows startmenu.
Then I tried to create a shortcut myself which executes following command: comsolserver.exe matlab.
A window opened and I typed in a username and password. Afterwards nothing happens... normally matlab should start, right? In the comsol.ini I couldn´t find an entry, which defines the patch to matlab. Maybe Ivar knows how to set the path correctly???
best regards
Oliver
Please login with a confirmed email address before reporting spam
check also the KB (knowledge base) of COMSOL on their main site, there are several instructios regarding matlab link issues
--
Good luck
Ivar
Please login with a confirmed email address before reporting spam
I have on occassion got erros which contain the 'Unkown Source' text, though I am not 100% sure I beleive on some occassions it is simply a license issue. When this occurs I often remote desktop through to my university computer and I think Comsol supports local 'Mouse Click' operations but not remote desktop ones for certain licenses.
I could be wrong, but when do similar things directly, using a mouse Comsol has no problem, only when I remote desktop.
Regards Mike F
Please login with a confirmed email address before reporting spam
Hi Micheal,
Just in case you haven't solved this yet, maybe this will help:
I just installed v4 with Matlab R2010a and was getting the same error. After fiddling with a bunch of stuff, I ended up running comsolserver (no space) which prompted me for a username/password which I made up and entered. After I exited this program (typed 'close'), I then tried the 'COMSOL with MATLAB' star menu shortcut again and everything worked fine. Not sure what I accomplished, but hey, solved my problem.
FYI, I installed on a Linux Machine (Ubuntu 10.4) and Windows (Vista SP2) and had the same problem on each. The above fixed both instances.
Please login with a confirmed email address before reporting spam
Hi,
Bit of a boring generic question I'm afraid but if anyone has come across this error any help would be appreciated.
I've been trying to get the COMSOL with MATLAB livelink working and after some trials managed to get the shortcut to finally appear :). however I can't seem to get it to work as i keep getting an error:
com.comsol.util.exceptions.FlException: Unable to get the user manager
Messages:
Unable to get the user manager
I think it could be a path problem as it was a problem before hand with having MATLAB installed on the D:\.
However when i run D;\COMSOL40\Bin\win32\comsol matlab
I can get it to load up both however fail to actually get it to run any of my models as I get an error:
Exception:
com.comsol.util.exceptions.FlException: Launching COMSOL Server automatically is currently not supported
Messages:
Launching COMSOL Server automatically is currently not supported
Stack trace:
at com.comsol.model.clientserver.ClientManagerImpl.launchServer(Unknown Source)
at com.comsol.model.util.ModelManager.create(Unknown Source)
at com.comsol.model.util.ModelUtil.create(Unknown Source)
another possible path problem?
any help is appreciated.
Kind Regards MF
Please login with a confirmed email address before reporting spam
the first time you run the matlab link in server mode you need to give a user name and password, as the software calls loops around via the OS. You might also get a firewall warning "allow this", It's all written in the user guide I believe
--
Good luck
Ivar
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.
Suggested Content
- FORUM MATLAB COMSOL 5.5 file error
- KNOWLEDGE BASE Error: Failure Loading MATLAB Libraries. This model requires that MATLAB is available.
- BLOG Сочетание COMSOL Multiphysics® и MATLAB®
- KNOWLEDGE BASE COMSOL Does Not Start with the Latest MATLAB Version
- BLOG Optimizing Microwave Ovens with Solid-State RF Cooking