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 4.1 and Matlab LiveLink: Error when solving

Please login with a confirmed email address before reporting spam

Hello,

after having upgraded to Comsol 4.1 the LiveLink to Matlab doesn´t work anymore when I try to start the solve command. As an easy example, I have created a m-File out of the example given in the User Guide. In comsol4.0a this File works perfect, but having started Comsol4.1 with Matlab 2010a the following error occurs after starting the m-File:


??? Java exception occurred:
Exception:
com.comsol.util.exceptions.FlException: The following feature has encountered a problem
Messages:
The following feature has encountered a problem

Stack trace:

at com.comsol.solver.SolverOperation.addError(Unknown Source)

at com.comsol.solver.SolverOperation.execute(Unknown Source)

at com.comsol.model.impl.SolverSequenceImpl.a(Unknown Source)

at com.comsol.model.impl.SolverSequenceImpl.j(Unknown Source)

at com.comsol.model.impl.SolverSequenceImpl.runAll(Unknown Source)

at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)

at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)

at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)

at java.lang.reflect.Method.invoke(Unknown Source)

at com.comsol.clientserver.impl.JobImpl.run(Unknown Source)

at com.comsol.server.internal.b.a(Unknown Source)

at com.comsol.server.internal.b.a(Unknown Source)

at com.comsol.server.internal.b$h.a(Unknown Source)

at com.comsol.server.internal.b$h.a(Unknown Source)

at com.comsol.server.internal.b$h$a.run(Unknown Source)

at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(Unknown Source)

at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)

at java.lang.Thread.run(Unknown Source)



at com.comsol.model.clientserver.ClientManagerImpl.a(Unknown Source)

at com.comsol.model.clientserver.ClientManagerImpl.runServerJob(Unknown Source)

at com.comsol.model.impl.SolverSequenceImpl.runAll(Unknown Source)

at com.comsol.model.impl.StudyImpl.f(Unknown Source)

at com.comsol.model.impl.StudyImpl.b(Unknown Source)

at com.comsol.model.impl.StudyImpl.a(Unknown Source)

at com.comsol.model.impl.StudyImpl$a.a(Unknown Source)

at com.comsol.model.impl.StudyImpl$a.execute(Unknown Source)

at com.comsol.model.clientserver.ClientManagerImpl$d.call(Unknown Source)

at java.util.concurrent.FutureTask$Sync.innerRun(Unknown Source)

at java.util.concurrent.FutureTask.run(Unknown Source)

at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(Unknown Source)

at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)

at java.lang.Thread.run(Unknown Source)

Caused by: Exception:
com.comsol.util.exceptions.FlException: The following feature has encountered a problem
Messages:
The following feature has encountered a problem


at com.comsol.solver.SolverOperation.addError(Unknown Source)

at com.comsol.solver.SolverOperation.execute(Unknown Source)

at com.comsol.model.impl.SolverSequenceImpl.a(Unknown Source)

at com.comsol.model.impl.SolverSequenceImpl.j(Unknown Source)

at com.comsol.model.impl.SolverSequenceImpl.runAll(Unknown Source)

at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)

at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)

at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)

at java.lang.reflect.Method.invoke(Unknown Source)

at com.comsol.clientserver.impl.JobImpl.run(Unknown Source)

at com.comsol.server.internal.b.a(Unknown Source)

at com.comsol.server.internal.b.a(Unknown Source)

at com.comsol.server.internal.b$h.a(Unknown Source)

at com.comsol.server.internal.b$h.a(Unknown Source)

at com.comsol.server.internal.b$h$a.run(Unknown Source)

... 3 more


Error in ==> example at 29
model.study('std1').run;


Does anyone have an idea how to solve this problem? I upgraded to 4.1 to get rid of an error leakage in the Matlabserver-process, but now I have more problems then before.

Thanks,
Daniel


6 Replies Last Post Mar 8, 2011, 2:45 PM EST

Please login with a confirmed email address before reporting spam

Posted: 1 decade ago Dec 2, 2010, 8:06 AM EST
interrested to know what support have to say about that.
Did you submit the example directly..?

If yes please keep us posted...
JF
interrested to know what support have to say about that. Did you submit the example directly..? If yes please keep us posted... JF

Please login with a confirmed email address before reporting spam

Posted: 1 decade ago Dec 2, 2010, 8:25 AM EST
Yes I´ve submitted the example to the support, but I´m waiting for an answer.
Could you reproduce the same error, Jean Francois?

Daniel
Yes I´ve submitted the example to the support, but I´m waiting for an answer. Could you reproduce the same error, Jean Francois? Daniel

Please login with a confirmed email address before reporting spam

Posted: 1 decade ago Dec 5, 2010, 9:29 AM EST
Daniel
I tried to run your example.m both on 4.05 and 4.1 from matlab and I dont reproduce your error. Instead I get the following in the matlab window:

"Warning: Direct access of structure fields returned by a function call (e.g.,
call to example) is not allowed. See MATLAB 7.10 Release Notes, "Subscripting Into Function Return Values" for details.
??? Attempt to reference field of non-structure array."

in both cases..

hope this help
JF
Daniel I tried to run your example.m both on 4.05 and 4.1 from matlab and I dont reproduce your error. Instead I get the following in the matlab window: "Warning: Direct access of structure fields returned by a function call (e.g., call to example) is not allowed. See MATLAB 7.10 Release Notes, "Subscripting Into Function Return Values" for details. ??? Attempt to reference field of non-structure array." in both cases.. hope this help JF

Please login with a confirmed email address before reporting spam

Posted: 1 decade ago Dec 6, 2010, 4:23 AM EST
I think I´ve found the reason for my problem:
The name of the folder of my User-Account has a "ß" (sharp S). In this case Comsol seems to have problems with saving some recovery data while solving (this feature ist new in Comsol 4.1). If I run the file example.m out of another user account on my PC it produces no errors in Matlab.

To be able to run any computations with Comsol 4.1 I had to deactivate the option "save recovery file" in the preferences.
Regarding this problem also look at this hint in the knowledge base:

www.comsol.de/support/knowledgebase/1095/

It seems as if the comsolserver uses the same recovery feature, so to add another recovery direction into the shortcut that launches the comsolserver could solve my problem.

Daniel
I think I´ve found the reason for my problem: The name of the folder of my User-Account has a "ß" (sharp S). In this case Comsol seems to have problems with saving some recovery data while solving (this feature ist new in Comsol 4.1). If I run the file example.m out of another user account on my PC it produces no errors in Matlab. To be able to run any computations with Comsol 4.1 I had to deactivate the option "save recovery file" in the preferences. Regarding this problem also look at this hint in the knowledge base: http://www.comsol.de/support/knowledgebase/1095/ It seems as if the comsolserver uses the same recovery feature, so to add another recovery direction into the shortcut that launches the comsolserver could solve my problem. Daniel

Ivar Kjelberg CSEM SA (CH)

Please login with a confirmed email address before reporting spam

Posted: 1 decade ago Dec 6, 2010, 8:17 AM EST
Hi

always safe to restrain yourself to 7 bit ASCII characters for file names, bienvenu en 2010 :)

--
Good luck
Ivar
Hi always safe to restrain yourself to 7 bit ASCII characters for file names, bienvenu en 2010 :) -- Good luck Ivar

Please login with a confirmed email address before reporting spam

Posted: 10 years ago Mar 8, 2011, 2:45 PM EST
Don't put the ".m" when calling the m-file:

Ex.:

>> shell_diffusion

and NOT:

>> shell_diffusion.m
Don't put the ".m" when calling the m-file: Ex.: >> shell_diffusion and NOT: >> shell_diffusion.m

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.