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 v 4.1 and Matlab R2010b in Linux

Please login with a confirmed email address before reporting spam

Dear all,

I searched this forum and the internet and did not find any solution.
On a linux machine (64bit) I try to run comsol with matlab, which fails.

Both, Matlab R2010b and Comsol v4.1 run well in stand alone, but when I try to connect them, it fails.
When I enter "comsol matlab" at the command line, only matlab opens and I can not start comsol from within matlab.

Anyone had a similar error and knows a solution to it?

Thanks a lot and best regards from Switzerland,
Juergen

5 Replies Last Post Jan 19, 2011, 7:04 a.m. EST
Ivar KJELBERG COMSOL Multiphysics(r) fan, retired, former "Senior Expert" at CSEM SA (CH)

Please login with a confirmed email address before reporting spam

Posted: 1 decade ago Jan 17, 2011, 10:19 a.m. EST
Hi

have you checked on the KB on the main site, there are a few explanations there too. I'm on CentOS-5 it works, but now I'm not sure if I have 2010a or b.
Normally, you need to install maltab first and if you upgrade matlab (and changes directories), you should ideally re-install COMSOL whcih is rather quickly done. I also clear my local .comsol user account, when I reinstall COMSOL, not sure what it all hides in there, as there are not that many settings saved anyhow. But check the KB (Support Knowledge Base above)

--
Good luck (also from CH)
Ivar
Hi have you checked on the KB on the main site, there are a few explanations there too. I'm on CentOS-5 it works, but now I'm not sure if I have 2010a or b. Normally, you need to install maltab first and if you upgrade matlab (and changes directories), you should ideally re-install COMSOL whcih is rather quickly done. I also clear my local .comsol user account, when I reinstall COMSOL, not sure what it all hides in there, as there are not that many settings saved anyhow. But check the KB (Support Knowledge Base above) -- Good luck (also from CH) Ivar

Please login with a confirmed email address before reporting spam

Posted: 1 decade ago Jan 17, 2011, 11:05 a.m. EST
Hi Ivar,

thanks for your mail.
That's what I did. I installed Matlab first and then re-installed Comsol.
But it still does not work.

I checked the KB, but did not find anything for Comsol v4.1
With old versions I had trouble, too. But I managed to make Comsol and Matlab run in comsol 3.5a

The strange thing is, that at first when I tried, not even Matlab would have started and in the .log file the Matlab root path was something like [...]/matlab/bin/bin/ something.
Although I never gave Comsol this strange path with /bin twice in it.

However, I will try to make it work and when it does, I'll post it here, in case anyone else should be interested.

Thanks and have a nice evening,
Juergen
Hi Ivar, thanks for your mail. That's what I did. I installed Matlab first and then re-installed Comsol. But it still does not work. I checked the KB, but did not find anything for Comsol v4.1 With old versions I had trouble, too. But I managed to make Comsol and Matlab run in comsol 3.5a The strange thing is, that at first when I tried, not even Matlab would have started and in the .log file the Matlab root path was something like [...]/matlab/bin/bin/ something. Although I never gave Comsol this strange path with /bin twice in it. However, I will try to make it work and when it does, I'll post it here, in case anyone else should be interested. Thanks and have a nice evening, Juergen

Please login with a confirmed email address before reporting spam

Posted: 1 decade ago Jan 17, 2011, 11:20 a.m. EST
HI
In my experience automatic link between comsol and matlab have ALWAYS been a source of trouble NEVER r working "out of the box" and I gave up trying to fix it a while ago becasue there is an easy way around:

What I do now and I think it is documented somewhere in the comsol doc is

1] launch comsol server with whatever options you want....

2 ] launch matlab and BE SURE that the proper comsol paths are defined in the active matlab tree . which directory to defines is found in the comsol mtlab install doc]
3 use, from within matlab, the command mphstart, if necessary with the port number where comsol server is listening..

This approach has always worked for me
JF
HI In my experience automatic link between comsol and matlab have ALWAYS been a source of trouble NEVER r working "out of the box" and I gave up trying to fix it a while ago becasue there is an easy way around: What I do now and I think it is documented somewhere in the comsol doc is 1] launch comsol server with whatever options you want.... 2 ] launch matlab and BE SURE that the proper comsol paths are defined in the active matlab tree . which directory to defines is found in the comsol mtlab install doc] 3 use, from within matlab, the command mphstart, if necessary with the port number where comsol server is listening.. This approach has always worked for me JF

Please login with a confirmed email address before reporting spam

Posted: 1 decade ago Jan 17, 2011, 2:14 p.m. EST
Hi Jean Francois,

thanks, I will try that tomorrow back on my own computer (at the moment I have to work with a windows computer and have other troubles..)

Have a nice evening,
Juergen
Hi Jean Francois, thanks, I will try that tomorrow back on my own computer (at the moment I have to work with a windows computer and have other troubles..) Have a nice evening, Juergen

Please login with a confirmed email address before reporting spam

Posted: 1 decade ago Jan 19, 2011, 7:04 a.m. EST
Hi Jean Francois,

thanks, I tried it now and this works great!
Perfect!

Many thanks,
Juergen
Hi Jean Francois, thanks, I tried it now and this works great! Perfect! Many thanks, Juergen

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.