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.

Matlab - COMSOL show progress window fails to load

Please login with a confirmed email address before reporting spam

Hi,

Anyone else using matlabs live link with comsol and finding it slightly less robust then they would hope :).

For some reason calling ModelUtil.showProgress(true); will 40% of the time actually work and cause it to come up while the rest it fails to do anything.

Anyone know of any other commands that might be useful in bringing up the main Comsol window?

I need it up sadly because the solver can hang, generally at meshing, and therefore i need to cancel it.

Is this not a really silly way to go about it, I would have thought there might have been some way to cause it to time out and return null or something, kind of makes automated linking redundent.

Regards MF

15 Replies Last Post 2012年9月23日 GMT-4 04:21

Please login with a confirmed email address before reporting spam

Posted: 1 decade ago 2011年8月3日 GMT-4 11:06
Hi Michael,

I have the same issue. Could you find a solution? I already contacted Comsol support, but I am not able to create a reproducable example. If you have an example file where the progress window always does not show up, this could help to solve the issue. I use Comsol 4.2.0.187 together with Matlab R2010a on a WinXP platform.

Sunny regards,

Stefan
Hi Michael, I have the same issue. Could you find a solution? I already contacted Comsol support, but I am not able to create a reproducable example. If you have an example file where the progress window always does not show up, this could help to solve the issue. I use Comsol 4.2.0.187 together with Matlab R2010a on a WinXP platform. Sunny regards, Stefan

Please login with a confirmed email address before reporting spam

Posted: 1 decade ago 2011年8月12日 GMT-4 07:27
HI everyone,

Yes, I do have the same problem. I am using exacty the same matlab and comsol version as you Stefan. I would also be interseted if you can find a solution

Best Regards
Vincent
HI everyone, Yes, I do have the same problem. I am using exacty the same matlab and comsol version as you Stefan. I would also be interseted if you can find a solution Best Regards Vincent

Please login with a confirmed email address before reporting spam

Posted: 1 decade ago 2011年8月12日 GMT-4 09:44
Hi,
I might have find a way to make the progress bar appear more often. Even if Matlab was started using the 'COMSOL with Matlab' application, I start with the comand line mphstart before creating my model with 'model = ModelUtil.create('Model');' It should not be required since a server connection already exist but in my case the progress bar appeared all the time so far. But I haven't tested it for a long time so I cannot tell if it totally solve the problem. Let me know if it has helped you, so I will know if I only had chance or if I have to keep looking for a solution.
Best regards
Vincent
Hi, I might have find a way to make the progress bar appear more often. Even if Matlab was started using the 'COMSOL with Matlab' application, I start with the comand line mphstart before creating my model with 'model = ModelUtil.create('Model');' It should not be required since a server connection already exist but in my case the progress bar appeared all the time so far. But I haven't tested it for a long time so I cannot tell if it totally solve the problem. Let me know if it has helped you, so I will know if I only had chance or if I have to keep looking for a solution. Best regards Vincent

Please login with a confirmed email address before reporting spam

Posted: 1 decade ago 2011年9月12日 GMT-4 06:46
Hi guys,

has anyone in the meantime solved the issue or able to report it to Comsol? I probably got a reproducible case, so before contacting Comsol I'd like to know how's going with you.

BTW: I tried Vincent workaround but, at least in my case, does not work.

Best,

J
Hi guys, has anyone in the meantime solved the issue or able to report it to Comsol? I probably got a reproducible case, so before contacting Comsol I'd like to know how's going with you. BTW: I tried Vincent workaround but, at least in my case, does not work. Best, J

Please login with a confirmed email address before reporting spam

Posted: 1 decade ago 2011年9月12日 GMT-4 07:00
Hi Jacopo,

I can now confirm that my workaround does not work all the time. In my case it actually works better but nevertheless the progress bar does not appear in every situation. However I was not able to find out when it works and when not.

Let me know if the comsol support can help you on that one.

Regards

Vincent
Hi Jacopo, I can now confirm that my workaround does not work all the time. In my case it actually works better but nevertheless the progress bar does not appear in every situation. However I was not able to find out when it works and when not. Let me know if the comsol support can help you on that one. Regards Vincent

Please login with a confirmed email address before reporting spam

Posted: 1 decade ago 2011年9月12日 GMT-4 07:02
Ok, perfect. I'm actually waiting for another support reply, still on Comsol w/ Matlab, and as soon as it is solved I'll submit this one.

I'll keep you updated...

J
Ok, perfect. I'm actually waiting for another support reply, still on Comsol w/ Matlab, and as soon as it is solved I'll submit this one. I'll keep you updated... J

Please login with a confirmed email address before reporting spam

Posted: 1 decade ago 2011年9月12日 GMT-4 07:02
Ok, perfect. I'm actually waiting for another support reply, still on Comsol w/ Matlab, and as soon as it is solved I'll submit this one.

I'll keep you updated...

J
Ok, perfect. I'm actually waiting for another support reply, still on Comsol w/ Matlab, and as soon as it is solved I'll submit this one. I'll keep you updated... J

Please login with a confirmed email address before reporting spam

Posted: 1 decade ago 2011年9月12日 GMT-4 08:09
Here is what the support says:

Dear Stefan,

Thank you for your detailed answer. I have used your M-file in order to reproduce this behavior. But I can see the progress bar each time I solve a problem, even if I do certain changes and/or restart MATLAB. I use MATLAB 2011a and Windows Vista.

Note that this kind of unexpected behavior can in several cases depend on the version you are using. In order to fully support this case, we ask you to upgrade your MATLAB version to one of the supported ones. Version 2010a is not officially supported by COMSOL 4.2. I would recommend you to try version 2011a instead (or 2010b).

Check with your colleague the MATLAB version he is using. If this problem appears in the supported versions of MATLAB, please let us know.

Best regards,
Pablo Vallejos
COMSOL AB, Sweden

----- Original Message -----

> Hi Pablo,
>
> thank you for your answer. I already attached an example file to my
> last eMail. Today I tried this file again and the progress window has
> been shown correctly. Later I used the same file and the window was
> missing again.
>
> I thought the issue might have to do something with the way I start
Matlab
> or with the java classes I use for GUI programming, but this does not
> seem to be the origin of the issue.
>
> I tried to build a reproducible example, but I could not.
> Sometimes the progress window is shown and sometimes not.
> I attach the example file of my last email again.
>
> I fully understand that it is hard to correct an error that is not
> reproducible...
>
> I use Comsol 4.2.0.187 together with Matlab R2010a on a WinXP platform.
>
> - Do you have any other issues with the LiveLink for MATLAB?
> No.
>
> Please run the attached file in Matlab several times and see If the
> progress windows always pops up. If it works well, please start Matlab
> again and try it again a few times.
> I guess this is all you can do for me to understand the issue.
>
> If I can find out more about it, I will give you an update.
>
> At least I am not the only person having this issue, because there is
> already a forum entry:
> www.comsol.com/community/forums/general/thread/20922/
>
> I am going to answer it and ask him for more details, too.
>
> Sunny regards,
>
> Stefan
Here is what the support says: Dear Stefan, Thank you for your detailed answer. I have used your M-file in order to reproduce this behavior. But I can see the progress bar each time I solve a problem, even if I do certain changes and/or restart MATLAB. I use MATLAB 2011a and Windows Vista. Note that this kind of unexpected behavior can in several cases depend on the version you are using. In order to fully support this case, we ask you to upgrade your MATLAB version to one of the supported ones. Version 2010a is not officially supported by COMSOL 4.2. I would recommend you to try version 2011a instead (or 2010b). Check with your colleague the MATLAB version he is using. If this problem appears in the supported versions of MATLAB, please let us know. Best regards, Pablo Vallejos COMSOL AB, Sweden ----- Original Message ----- > Hi Pablo, > > thank you for your answer. I already attached an example file to my > last eMail. Today I tried this file again and the progress window has > been shown correctly. Later I used the same file and the window was > missing again. > > I thought the issue might have to do something with the way I start Matlab > or with the java classes I use for GUI programming, but this does not > seem to be the origin of the issue. > > I tried to build a reproducible example, but I could not. > Sometimes the progress window is shown and sometimes not. > I attach the example file of my last email again. > > I fully understand that it is hard to correct an error that is not > reproducible... > > I use Comsol 4.2.0.187 together with Matlab R2010a on a WinXP platform. > > - Do you have any other issues with the LiveLink for MATLAB? > No. > > Please run the attached file in Matlab several times and see If the > progress windows always pops up. If it works well, please start Matlab > again and try it again a few times. > I guess this is all you can do for me to understand the issue. > > If I can find out more about it, I will give you an update. > > At least I am not the only person having this issue, because there is > already a forum entry: > http://www.comsol.com/community/forums/general/thread/20922/ > > I am going to answer it and ask him for more details, too. > > Sunny regards, > > Stefan

Please login with a confirmed email address before reporting spam

Posted: 1 decade ago 2011年9月12日 GMT-4 08:11
Ok, I'm gonna write them since I'm using both Matlab R2010b and R2011a and I can't see the progress bar...

J
Ok, I'm gonna write them since I'm using both Matlab R2010b and R2011a and I can't see the progress bar... J

Please login with a confirmed email address before reporting spam

Posted: 1 decade ago 2011年9月12日 GMT-4 08:18
In some cases the progress bar window is kind of "hidden". You have to minimize all other windows on the desktop to see the progress bar. (The progress bar does not have an extra item in the task bar.)
However, even when minimizing all other windows I can not always see a progress bar with R2010a.
In some cases the progress bar window is kind of "hidden". You have to minimize all other windows on the desktop to see the progress bar. (The progress bar does not have an extra item in the task bar.) However, even when minimizing all other windows I can not always see a progress bar with R2010a.

Please login with a confirmed email address before reporting spam

Posted: 1 decade ago 2011年9月15日 GMT-4 12:44
Hi,

Sadly I have had no luck in solving this issue.

I can somewhat get arround it by having task manager up, this allows me in some way to tell whether the server has stalled, in which case I can close it and my program automatically restarts the process. At that point I cross my fingers and hope I get the progress bar :).

There almost needs to be a Bool on whether the progress bar is visibile, that way checking it and the ability to call it up seperately would be nice.

Regards Mike F
Hi, Sadly I have had no luck in solving this issue. I can somewhat get arround it by having task manager up, this allows me in some way to tell whether the server has stalled, in which case I can close it and my program automatically restarts the process. At that point I cross my fingers and hope I get the progress bar :). There almost needs to be a Bool on whether the progress bar is visibile, that way checking it and the ability to call it up seperately would be nice. Regards Mike F

Please login with a confirmed email address before reporting spam

Posted: 1 decade ago 2011年10月13日 GMT-4 14:26
Hello,

Since I have the same problem I would be interested if there has been a solution to this problem.

Thanks,

Robert
Hello, Since I have the same problem I would be interested if there has been a solution to this problem. Thanks, Robert

Please login with a confirmed email address before reporting spam

Posted: 1 decade ago 2011年10月15日 GMT-4 18:59
Hi Robert,

in my case (running on Windows 7 and Mac) the task bar appears almost any time I call it. The only issue is that is covered by all the other windows; is there, but is hidden. Try to, if not already done, to have just the m-file window on the desktop and also have it really small, run the code and probably you would be able to see the task bar. Perhaps you have already tried so this post will not be of much help.

There is the new version now, v4.2a, perhaps in this version the task bar works smoothly.

J
Hi Robert, in my case (running on Windows 7 and Mac) the task bar appears almost any time I call it. The only issue is that is covered by all the other windows; is there, but is hidden. Try to, if not already done, to have just the m-file window on the desktop and also have it really small, run the code and probably you would be able to see the task bar. Perhaps you have already tried so this post will not be of much help. There is the new version now, v4.2a, perhaps in this version the task bar works smoothly. J

Please login with a confirmed email address before reporting spam

Posted: 1 decade ago 2011年11月27日 GMT-5 05:14

I am having the same issue of the progress window not showing up most of the time.
In my case I am using comsol 4.2a with matlab 2011a on a 64 bit Linux machine.

Even when I set
ModelUtil.showProgress(true);

The progress bar does not show up most of the time.

It looks from the previous posts that there is no solution to this problem yet.

I am having the same issue of the progress window not showing up most of the time. In my case I am using comsol 4.2a with matlab 2011a on a 64 bit Linux machine. Even when I set ModelUtil.showProgress(true); The progress bar does not show up most of the time. It looks from the previous posts that there is no solution to this problem yet.

Please login with a confirmed email address before reporting spam

Posted: 1 decade ago 2012年9月23日 GMT-4 04:21
Well, we're seeing this as well with COMSOL43.

In the bowels of the .comsol directory, in a file called '.log', the following error is being thrown by COMSOL:

org.eclipse.swt.SWTException: Invalid thread access
at org.eclipse.swt.SWT.error(SWT.java:4282)
at org.eclipse.swt.SWT.error(SWT.java:4197)
at org.eclipse.swt.SWT.error(SWT.java:4168)
at org.eclipse.swt.widgets.Display.error(Display.java:1258)
at org.eclipse.swt.widgets.Display.checkDevice(Display.java:764)
at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3743)
at com.comsol.guimph.progress.ServerProgressHandler$a.run(Unknown Source)

It looks like COMSOL is having a threadng issue with the progress window accessing the screen.
Well, we're seeing this as well with COMSOL43. In the bowels of the .comsol directory, in a file called '.log', the following error is being thrown by COMSOL: org.eclipse.swt.SWTException: Invalid thread access at org.eclipse.swt.SWT.error(SWT.java:4282) at org.eclipse.swt.SWT.error(SWT.java:4197) at org.eclipse.swt.SWT.error(SWT.java:4168) at org.eclipse.swt.widgets.Display.error(Display.java:1258) at org.eclipse.swt.widgets.Display.checkDevice(Display.java:764) at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3743) at com.comsol.guimph.progress.ServerProgressHandler$a.run(Unknown Source) It looks like COMSOL is having a threadng issue with the progress window accessing the screen.

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.