找回密码
 注册
Simdroid-非首页
查看: 678|回复: 21

[14.错误警告信息] comsol v4 with matlab 无法启动的knowledge

[复制链接]
发表于 2010-5-14 19:48:40 | 显示全部楼层 |阅读模式 来自 黑龙江哈尔滨
悬赏100仿真币已解决
本帖最后由 TBE_Legend 于 2010-5-15 12:55 编辑

Solution Number:1071
Title:Cannot start COMSOL 4.0 with MATLAB
Platform:Windows
Versions:4.0
Created:April 27, 2010
Last Modified:May 11, 2010
Categories:
Keywords:MATLAB


http://www.ch.comsol.com/support/knowledgebase/1071/

最佳答案

查看完整内容

17# TBE_Legend 是的,我的系统也是这样,comsol界面始终处于启动状态 在matlab中运行m文件也可以调用comsol(好像是后台调用) 不知道其他用户用的时候是不是也是这样,如果也是,可能就是comsol4开始matlab调用comsol不像以前那样会两者都显式打开 而且按照你引用的文档上说的,在matlab下确实实现了“save the model on file (.mph)",而且这个.mph我们可以用comsol单独打开然后继续建模,这也实现了文档所说的 另外我的系 ...
发表于 2010-5-14 19:48:41 | 显示全部楼层 来自 浙江杭州
Simdroid开发平台
本帖最后由 flyingmind 于 2010-5-17 08:13 编辑

17# TBE_Legend

是的,我的系统也是这样,comsol界面始终处于启动状态
在matlab中运行m文件也可以调用comsol(好像是后台调用)

不知道其他用户用的时候是不是也是这样,如果也是,可能就是comsol4开始matlab调用comsol不像以前那样会两者都显式打开

而且按照你引用的文档上说的,在matlab下确实实现了“save the model on file (.mph)",而且这个.mph我们可以用comsol单独打开然后继续建模,这也实现了文档所说的

另外我的系统还有comsol3.5a,所以我安装4后,还有一个comsol with matlab(3.5a兼容模式的菜单),运行这个菜单,可以将3.5a版本的m文件转化为4.0版本的m文件

评分

1

查看全部评分

回复

使用道具 举报

发表于 2010-5-14 21:39:42 | 显示全部楼层 来自 浙江杭州
本帖最后由 flyingmind 于 2010-5-14 21:52 编辑

是安装完后没有出现comsol with matlab的快捷方式吧?
在bin目录下页找不到,安装过程中也没有找到设置matlab路径的地方
查看comsolsetup.log
........
Starting installer with args: install, I:\, D:\Temp\Temp\comsol7884472755571806678install
Reading registry HKLM\SOFTWARE\MathWorks\MATLAB\7.9\MATLABROOT
- value: null
Reading registry HKLM\SOFTWARE\MathWorks\MATLAB\7.8\MATLABROOT
- value: null
Reading registry HKLM\SOFTWARE\MathWorks\MATLAB\7.7\MATLABROOT
- value: E:\Program Files (x86)\MATLAB\R2008b\
Reading registry HKLM\SOFTWARE\MathWorks\MATLAB\7.6\MATLABROOT
- value: null
......
似乎它自动读取注册表,只找到我装的08b的32位版本的,我还装了个64位的10a版本,并没有检测到
不清楚是什么原因



Optional LiveLink for MATLAB Requirements
The LiveLink for MATLAB is compatible with MATLAB 2009b and MATLAB 2010a.

Changing the Path to the MATLAB Installation
Edit the file [/url]comsolserver.ini and comsol.ini in the bin/<platform> directory under the COMSOL installation directory (typically /Applications/COMSOL40). In the file, change the line
Dcs.mlroot=/Applications/MATLAB_R2010a.app
to point to the root directory of your MATLAB installation

上面两段帮助看了,在comsolserver.ini中也没找到对应行


回复

使用道具 举报

发表于 2010-5-14 21:47:16 | 显示全部楼层 来自 北京
When I use the "COMSOL with MATLAB" shortcut from the Windows start menu, nothing happens. The target path in the start menu needs to be replaced
回复

使用道具 举报

 楼主| 发表于 2010-5-14 21:50:04 | 显示全部楼层 来自 黑龙江哈尔滨
本帖最后由 TBE_Legend 于 2010-5-14 21:54 编辑
是安装完后没有出现comsol with matlab的快捷方式吧?
在bin目录下页找不到,安装过程中也没有找到设置matlab路径的地方
查看comsolsetup.log
........
Starting installer with args: install, I:\, D:\Temp\Te ...
flyingmind 发表于 2010-5-14 21:39


不是。有图标。我用2010a。 出错(见图)

安装crack都没有问题,好像的确是comsol自己的问题,它不认识我的系统。


!SESSION 2010-05-14 22:02:44.031 -----------------------------------------------
eclipse.buildId=unknown
java.version=1.6.0_13
java.vendor=Sun Microsystems Inc.
BootLoader constants: OS=win32, ARCH=x86, WS=win32, NL=zh_CN
Framework arguments:  -install ../.. server matlab
Command-line arguments:  -os win32 -ws win32 -arch x86 -install ../.. server matlab
!ENTRY org.eclipse.osgi 4 0 2010-05-14 22:02:47.828
!MESSAGE Application error
!STACK 1
Exception:
com.comsol.util.exceptions.FlException: Unable to get the user manager
Messages:
Unable to get the user manager
Stack trace:
at java.io.FileInputStream.readBytes(Native Method)
at java.io.FileInputStream.read(Unknown Source)
at java.io.BufferedInputStream.read1(Unknown Source)
at java.io.BufferedInputStream.read(Unknown Source)
at sun.nio.cs.StreamDecoder.readBytes(Unknown Source)
at sun.nio.cs.StreamDecoder.implRead(Unknown Source)
at sun.nio.cs.StreamDecoder.read(Unknown Source)
at java.io.InputStreamReader.read(Unknown Source)
at java.io.BufferedReader.fill(Unknown Source)
at java.io.BufferedReader.readLine(Unknown Source)
at java.io.BufferedReader.readLine(Unknown Source)
at com.comsol.server.ServerApplication.readLine(Unknown Source)
at com.comsol.server.internal.b.getUserManager(Unknown Source)
at com.comsol.server.internal.b.<init>(Unknown Source)
at com.comsol.server.ServerApplication.doStart(Unknown Source)
at com.comsol.util.application.ComsolApplication.doStart(Unknown Source)
at com.comsol.util.application.CsBaseApplication.start(Unknown Source)
at org.eclipse.equinox.internal.app.EclipseAppHandle.run(EclipseAppHandle.java:194)
at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication(EclipseAppLauncher.java:110)
at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(EclipseAppLauncher.java:79)
at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:368)
at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:179)
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 org.eclipse.equinox.launcher.Main.invokeFramework(Main.java:559)
at org.eclipse.equinox.launcher.Main.basicRun(Main.java:514)
at org.eclipse.equinox.launcher.Main.run(Main.java:1311)
!ENTRY org.eclipse.osgi 2 0 2010-05-14 22:02:47.875
!MESSAGE One or more bundles are not resolved because the following root constraints are not resolved:
!SUBENTRY 1 org.eclipse.osgi 2 0 2010-05-14 22:02:47.875
!MESSAGE Bundle [email=update@plugins/org.eclipse.ui.win32_3.2.100.v20090429-1800.jar]update@plugins/org.eclipse.ui.win32_3.2.100.v20090429-1800.jar[/email] was not resolved.
!SUBENTRY 2 org.eclipse.ui.win32 2 0 2010-05-14 22:02:47.875
!MESSAGE Missing host org.eclipse.ui.ide_[3.2.0,4.0.0).
!ENTRY org.eclipse.osgi 2 0 2010-05-14 22:02:47.890
!MESSAGE The following is a complete list of bundles which are not resolved, see the prior log entry for the root cause if it exists:
!SUBENTRY 1 org.eclipse.osgi 2 0 2010-05-14 22:02:47.890
!MESSAGE Bundle org.eclipse.equinox.launcher.cocoa.macosx.x86_64_1.0.1.R35x_v20090707 [122] was not resolved.
!SUBENTRY 2 org.eclipse.equinox.launcher.cocoa.macosx.x86_64 2 0 2010-05-14 22:02:47.890
!MESSAGE Platform filter did not match: (& (osgi.ws=cocoa) (osgi.os=macosx) (osgi.arch=x86_64) )
!SUBENTRY 1 org.eclipse.osgi 2 0 2010-05-14 22:02:47.890
!MESSAGE Bundle org.eclipse.equinox.launcher.cocoa.macosx_1.0.1.R35x_v20090707 [123] was not resolved.
!SUBENTRY 2 org.eclipse.equinox.launcher.cocoa.macosx 2 0 2010-05-14 22:02:47.890
!MESSAGE Platform filter did not match: (& (osgi.ws=cocoa) (osgi.os=macosx) (|(osgi.arch=x86)(osgi.arch=ppc)) )
!SUBENTRY 1 org.eclipse.osgi 2 0 2010-05-14 22:02:47.890
!MESSAGE Bundle org.eclipse.equinox.launcher.gtk.linux.x86_1.0.200.v20090520 [124] was not resolved.
!SUBENTRY 2 org.eclipse.equinox.launcher.gtk.linux.x86 2 0 2010-05-14 22:02:47.890
!MESSAGE Platform filter did not match: (& (osgi.ws=gtk) (osgi.os=linux) (osgi.arch=x86))
!SUBENTRY 1 org.eclipse.osgi 2 0 2010-05-14 22:02:47.890
!MESSAGE Bundle org.eclipse.equinox.launcher.gtk.linux.x86_64_1.0.200.v20090519 [125] was not resolved.
!SUBENTRY 2 org.eclipse.equinox.launcher.gtk.linux.x86_64 2 0 2010-05-14 22:02:47.890
!MESSAGE Platform filter did not match: (& (osgi.ws=gtk) (osgi.os=linux) (osgi.arch=x86_64))
!SUBENTRY 1 org.eclipse.osgi 2 0 2010-05-14 22:02:47.890
!MESSAGE Bundle org.eclipse.equinox.launcher.win32.win32.x86_64_1.0.200.v20090519 [127] was not resolved.
!SUBENTRY 2 org.eclipse.equinox.launcher.win32.win32.x86_64 2 0 2010-05-14 22:02:47.890
!MESSAGE Platform filter did not match: (& (osgi.ws=win32) (osgi.os=win32) (osgi.arch=x86_64))
!SUBENTRY 1 org.eclipse.osgi 2 0 2010-05-14 22:02:47.890
!MESSAGE Bundle org.eclipse.swt.cocoa.macosx.x86_64_3.5.2.v3557f [149] was not resolved.
!SUBENTRY 2 org.eclipse.swt.cocoa.macosx.x86_64 2 0 2010-05-14 22:02:47.890
!MESSAGE Platform filter did not match: (& (osgi.ws=cocoa) (osgi.os=macosx) (osgi.arch=x86_64) )
!SUBENTRY 1 org.eclipse.osgi 2 0 2010-05-14 22:02:47.890
!MESSAGE Bundle org.eclipse.swt.cocoa.macosx_3.5.2.v3557f [150] was not resolved.
!SUBENTRY 2 org.eclipse.swt.cocoa.macosx 2 0 2010-05-14 22:02:47.890
!MESSAGE Platform filter did not match: (& (osgi.ws=cocoa) (osgi.os=macosx) (|(osgi.arch=x86)(osgi.arch=ppc)) )
!SUBENTRY 1 org.eclipse.osgi 2 0 2010-05-14 22:02:47.890
!MESSAGE Bundle org.eclipse.swt.gtk.linux.x86_3.5.2.v3557f [151] was not resolved.
!SUBENTRY 2 org.eclipse.swt.gtk.linux.x86 2 0 2010-05-14 22:02:47.890
!MESSAGE Platform filter did not match: (& (osgi.ws=gtk) (osgi.os=linux) (osgi.arch=x86))
!SUBENTRY 1 org.eclipse.osgi 2 0 2010-05-14 22:02:47.890
!MESSAGE Bundle org.eclipse.swt.gtk.linux.x86_64_3.5.2.v3557f [152] was not resolved.
!SUBENTRY 2 org.eclipse.swt.gtk.linux.x86_64 2 0 2010-05-14 22:02:47.890
!MESSAGE Platform filter did not match: (& (osgi.ws=gtk) (osgi.os=linux) (osgi.arch=x86_64))
!SUBENTRY 1 org.eclipse.osgi 2 0 2010-05-14 22:02:47.890
!MESSAGE Bundle org.eclipse.swt.win32.win32.x86_64_3.5.2.v3557f [154] was not resolved.
!SUBENTRY 2 org.eclipse.swt.win32.win32.x86_64 2 0 2010-05-14 22:02:47.890
!MESSAGE Platform filter did not match: (& (osgi.ws=win32) (osgi.os=win32) (osgi.arch=x86_64))
!SUBENTRY 1 org.eclipse.osgi 2 0 2010-05-14 22:02:47.890
!MESSAGE Bundle org.eclipse.ui.carbon_4.0.0.I20090525-2000 [156] was not resolved.
!SUBENTRY 2 org.eclipse.ui.carbon 2 0 2010-05-14 22:02:47.890
!MESSAGE Platform filter did not match: (osgi.ws=carbon)
!SUBENTRY 1 org.eclipse.osgi 2 0 2010-05-14 22:02:47.890
!MESSAGE Bundle org.eclipse.ui.cocoa_1.0.0.I20090525-2000 [157] was not resolved.
!SUBENTRY 2 org.eclipse.ui.cocoa 2 0 2010-05-14 22:02:47.890
!MESSAGE Platform filter did not match: (osgi.ws=cocoa)
!SUBENTRY 1 org.eclipse.osgi 2 0 2010-05-14 22:02:47.890
!MESSAGE Bundle org.eclipse.ui.win32_3.2.100.v20090429-1800 [160] was not resolved.
!SUBENTRY 2 org.eclipse.ui.win32 2 0 2010-05-14 22:02:47.890
!MESSAGE Missing host org.eclipse.ui.ide_[3.2.0,4.0.0).

本帖子中包含更多资源

您需要 登录 才可以下载或查看,没有账号?注册

×
回复

使用道具 举报

发表于 2010-5-14 23:02:52 | 显示全部楼层 来自 北京交通大学
本帖最后由 haotebaobao 于 2010-5-14 23:04 编辑

你什么系统?像是win7。你从命令行试试,-用管理员试试!
呵呵,钱我先预定下!
回复

使用道具 举报

发表于 2010-5-14 23:08:52 | 显示全部楼层 来自 北京交通大学
是安装完后没有出现comsol with matlab的快捷方式吧?
在bin目录下页找不到,安装过程中也没有找到设置matlab路径的地方
查看comsolsetup.log
........
Starting installer with args: install, I:\, D:\Temp\Te ...
flyingmind 发表于 2010-5-14 21:39

呵呵,换一个吧~
回复

使用道具 举报

 楼主| 发表于 2010-5-15 08:35:08 | 显示全部楼层 来自 黑龙江哈尔滨
你什么系统?像是win7。你从命令行试试,-用管理员试试!
呵呵,钱我先预定下!
haotebaobao 发表于 2010-5-14 23:02


xp sp3
回复

使用道具 举报

发表于 2010-5-15 08:52:59 | 显示全部楼层 来自 北京交通大学
xp sp3
TBE_Legend 发表于 2010-5-15 08:35

那我在xp下试试,我的xp就装了个驱动,方便测试。我先试试看。
回复

使用道具 举报

发表于 2010-5-15 10:04:56 | 显示全部楼层 来自 北京交通大学
xp-sp3安装了一变。从菜单启动和您一样的错误!
从command line正常。
原因可能是系统缺少组件,如NET Framework (xp下我没装这些)。其他系统没有这个现象。
回复

使用道具 举报

发表于 2010-5-15 13:12:19 | 显示全部楼层 来自 浙江杭州
9# haotebaobao
你是说xp-sp3,命令起动comsol with matlab可以起动?
回复

使用道具 举报

发表于 2010-5-15 21:57:21 | 显示全部楼层 来自 浙江杭州
本帖最后由 flyingmind 于 2010-5-16 07:59 编辑

1. 先运行起动菜单下comsol 4.0->client server->comsol multiphysics 4.0 server

2. 等到出来让输入用户名时:随便输入个你喜欢的
密码输入好后回车,然后重新输入一次(两次要一致,也是随你喜欢输)
然后等到出来成功的消息后就可以关闭这个命令行窗口了
3. 然后起动comsol with matlab菜单就可以了(电脑重启后依然可以)
4. 运行完matlab里程序后,退出matlab后还会出现那个....log的提示框,不过应该不影响使用
5. 不过先打开comsol,然后运行里面的connect to server是不行的,大概是因为没有指定对象吧(比如matlab或者java吧,comsol with matlab的命令是comsol server matlab)

PS:我的系统是win7 x64,matlab2010a x64


不过现在在找通过matlab运行comsol4保存的m文件,还在学习中

评分

1

查看全部评分

回复

使用道具 举报

发表于 2010-5-15 22:54:59 | 显示全部楼层 来自 上海
我从命令行可以的。不过从菜单更方便些!
回复

使用道具 举报

发表于 2010-5-16 08:41:14 | 显示全部楼层 来自 浙江杭州
12# haotebaobao

你把命令做成一个批处理文件,放个快捷方式在桌面
点击运行和菜单一样的效果
回复

使用道具 举报

发表于 2010-5-16 13:39:27 | 显示全部楼层 来自 浙江杭州
11# flyingmind

有时候如果这样设置还是无法启动的话
可能是你还安装了comsol 3.5a
这时,需要重装comsol 4,然后将C盘对应用户目录下的有关comsol的设置删除
在安装上面的方法尝试,应该就可以连上了

尤其注意的是,选择matlab目录时,一定要选到matlabxxxx的根目录下(该目录下有bin等目录),而不是选择到.../bin目录下,这个和以前版本的comsol与matlab连接选择matlab目录是一样的

评分

1

查看全部评分

回复

使用道具 举报

 楼主| 发表于 2010-5-16 18:39:04 | 显示全部楼层 来自 黑龙江哈尔滨
本帖最后由 TBE_Legend 于 2010-5-16 18:44 编辑
11# flyingmind  

有时候如果这样设置还是无法启动的话
可能是你还安装了comsol 3.5a
这时,需要重装comsol 4,然后将C盘对应用户目录下的有关comsol的设置删除
在安装上面的方法尝试,应该就可以连上了

尤 ...
flyingmind 发表于 2010-5-16 13:39


试了你的方法,但在我这里似乎不行?

1) comsol multiphysics 4.0 server ,输入用户名密码。
2) 点击comsol with matlab菜单。matlab倒是启动了,但没有comsol界面。
3) 在matlab中运行“comsolserver matlab”,matlab不认识这个命令。

系统为 xp sp3,没有comsol 3.5a等旧版本。
回复

使用道具 举报

发表于 2010-5-16 21:56:36 | 显示全部楼层 来自 浙江杭州
15# TBE_Legend

运行comsol with matlab后,只有一个comsol的启动界面(并没有进去)
然后matlab被启动了,这样就可以了
你可以试着在comsol中将一个例子保存为m文件,然后在matlab中运行了(comsol with matlab),具体使用方法要看livelink to matlab文档了
TBE,你这样已经连接成功了

评分

1

查看全部评分

回复

使用道具 举报

 楼主| 发表于 2010-5-16 22:08:29 | 显示全部楼层 来自 黑龙江哈尔滨
本帖最后由 TBE_Legend 于 2010-5-17 09:42 编辑
15# TBE_Legend  

运行comsol with matlab后,只有一个comsol的启动界面(并没有进去)
然后matlab被启动了,这样就可以了
你可以试着在comsol中将一个例子保存为m文件,然后在matlab中运行了(comsol with ma ...
flyingmind 发表于 2010-5-16 21:56


多谢fly,你说得很对,两者的确是连上了,但desktop of comsol 不出现也的确不正常。

比如 那个guide中的例子:

  1. clear; clc
  2. model = ModelUtil.create('Model');
  3. % Create the geometry
  4. model.geom.create('geom1', 2);
  5. model.geom('geom1').feature.create('sq1', 'Square');
  6. model.geom('geom1').run;
  7. % Create the mesh
  8. model.mesh.create('mesh1', 'geom1');
  9. model.mesh('mesh1').feature.create('fre1', 'FreeTri');
  10. model.mesh('mesh1').run;
  11. model.mesh('mesh1')
  12. % Setup physics
  13. es=model.physics.create('es', 'Electrostatics', 'geom1');
  14. es.feature('ccn1').set('epsilonr_mat', 1, 'userdef');
  15. es.feature.create('gnd1', 'Ground', 1);
  16. es.feature('gnd1').selection.set([2]);
  17. es.feature.create('sfcd1', 'SurfaceChargeDensity', 1);
  18. es.feature('sfcd1').selection.set([4]);
  19. es.feature('sfcd1').set('rhoqs', 1, '1e-10');
  20. % Create the study
  21. model.study.create('std1');
  22. model.study('std1').feature.create('stat1', 'Stationary');
  23. model.study('std1').run;
  24. % Create a plot group
  25. model.result.create('pg1', 2);
  26. model.result('pg1').set('data', 'dset1');
  27. model.result('pg1').feature.create('surf1', 'Surface');
  28. mphplot(model,'pg1');
  29. model.save('model1');
复制代码
的确可以正常运行,并在当期工作目录下生成mph文件。但是文档中所说的“You can save the model on file and continue modeling in the COMSOL Desktop.” 不能进行,因为comsol界面始终处于启动状态。

你的系统也是这样的?
回复

使用道具 举报

发表于 2010-5-16 23:21:35 | 显示全部楼层 来自 北京
最好有人能贴出1071
回复

使用道具 举报

 楼主| 发表于 2010-5-17 09:42:03 | 显示全部楼层 来自 黑龙江哈尔滨
18# feasky

我找找朋友吧,找到后一定与大家分享。
回复

使用道具 举报

您需要登录后才可以回帖 登录 | 注册

本版积分规则

Archiver|小黑屋|联系我们|仿真互动网 ( 京ICP备15048925号-7 )

GMT+8, 2024-4-27 12:00 , Processed in 0.071506 second(s), 19 queries , Gzip On, MemCache On.

Powered by Discuz! X3.5 Licensed

© 2001-2024 Discuz! Team.

快速回复 返回顶部 返回列表