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

[脚本编程] matlab并行调用Ansoft Maxwell的问题

[复制链接]
发表于 2011-10-24 22:43:11 | 显示全部楼层 |阅读模式 来自 北京
matlab: 2010b
maxwell: 14.0
系统:win7 64bit
CPU: 4核*2
调用过程:通过matlab的mdce工具箱,建立多个任务(createTask),每个任务生成一个maxwell脚本并调用maxwell计算。

问题:脚本均已正确生成,但调用maxwell出错,从任务管理器看到多个maxwell启动,但很快退出。以下为各任务输出的信息(8个任务)

Ansoft Maxwell Version 14.0.0, Build: 2010-10-25 04:49:02
Location: C:\Program Files (x86)\Ansoft\Maxwell14.0\maxwell.exe
Batch Script: D:/users/project/test_1.vbs
Starting Batch Run: 10:50:48 上午  十月 22, 2011
Running as user: 307-PC\tang
Temp directory: D:\users\project\tmp
Project directory: D:\users\project\tmp


Ansoft Maxwell Version 14.0.0, Build: 2010-10-25 04:49:02
Location: C:\Program Files (x86)\Ansoft\Maxwell14.0\maxwell.exe
Batch Script: D:/users/project/test_2.vbs
Starting Batch Run: 10:50:48 上午  十月 22, 2011
Running as user: 307-PC\tang
Temp directory: D:\users\project\tmp
Project directory: D:\users\project\tmp

Ansoft Maxwell Version 14.0.0, Build: 2010-10-25 04:49:02
Location: C:\Program Files (x86)\Ansoft\Maxwell14.0\maxwell.exe
Batch Script: D:/users/project/test_3.vbs
Starting Batch Run: 10:50:48 上午  十月 22, 2011
Running as user: 307-PC\tang
Temp directory: D:\users\project\tmp
Project directory: D:\users\project\tmp

Ansoft Maxwell Version 14.0.0, Build: 2010-10-25 04:49:02
Location: C:\Program Files (x86)\Ansoft\Maxwell14.0\maxwell.exe
Batch Script: D:/users/project/test_4.vbs
Starting Batch Run: 10:50:48 上午  十月 22, 2011
Running as user: 307-PC\tang
Temp directory: D:\users\project\tmp
Project directory: D:\users\project\tmp

Ansoft Maxwell Version 14.0.0, Build: 2010-10-25 04:49:02
Location: C:\Program Files (x86)\Ansoft\Maxwell14.0\maxwell.exe
Batch Script: D:/users/project/test_5.vbs
Starting Batch Run: 10:50:48 上午  十月 22, 2011
Running as user: 307-PC\tang
Temp directory: D:\users\project\tmp
Project directory: D:\users\project\tmp

Ansoft Maxwell Version 14.0.0, Build: 2010-10-25 04:49:02
Location: C:\Program Files (x86)\Ansoft\Maxwell14.0\maxwell.exe
Batch Script: D:/users/project/test_6.vbs
Starting Batch Run: 10:50:48 上午  十月 22, 2011
Running as user: 307-PC\tang
Temp directory: D:\users\project\tmp
Project directory: D:\users\project\tmp

Ansoft Maxwell Version 14.0.0, Build: 2010-10-25 04:49:02
Location: C:\Program Files (x86)\Ansoft\Maxwell14.0\maxwell.exe
Batch Script: D:/users/project/test_7.vbs
Starting Batch Run: 10:50:48 上午  十月 22, 2011
Running as user: 307-PC\tang
Temp directory: D:\users\project\tmp
Project directory: D:\users\project\tmp

Ansoft Maxwell Version 14.0.0, Build: 2010-10-25 04:49:02
Location: C:\Program Files (x86)\Ansoft\Maxwell14.0\maxwell.exe
Batch Script: D:/users/project/test_8.vbs
Starting Batch Run: 10:50:48 上午  十月 22, 2011
Running as user: 307-PC\tang
Temp directory: D:\users\project\tmp
Project directory: D:\users\project\tmp


进一步研究发现,如果在本地通过parfor来并行发起多个maxwell进程(matlab程序),或是利用其他并行代码发起多个maxwell进程(外部程序),所有maxwell都能成功运行,但如果利用createTask分配的matlab运行以上的matlab程序或外部程序来并行发起多个maxwell进程,仍然只有一个maxwell成功运行,请问这是什么原因呢,有点抓狂了。。。。。。。。


谢谢
 楼主| 发表于 2011-10-25 15:49:01 | 显示全部楼层 来自 北京
Simdroid开发平台
再详细说下我的方案和目的,还请高手相助。


借用matlab的MDCE工具箱,控制maxwell在多个机器运行多个工程(各个工程相互独立),各机器均正确安装maxwell 14.0和matlab 2010b。
我的方法是:
利用matlab的createTask函数,将本机的某个matlab程序在其他多核机器上运行,这个程序实际上启动多个maxwell进程来仿真不同的maxwell工程。

目前尝试了3种方法来启动多个maxwell进程:
1)利用createTask在多核机器上启动多个worker,每个worker启动一个进程;
2)利用createTask在多核机器上启动一个worker,每个worker通过parfor同时启动多个进程;
3)利用createTask在多核机器上启动一个worker,每个worker调用某个外部程序同时启动多个进程。

但是运行的结果是:每个机器最终只能运行一个maxwell进程,从资源管理器看到有多个maxwell进程发起,但其他的几秒钟后就自动被杀掉。

对于方法2)和3),如果这个matlab程序在本机上运行,可以正确启动多个maxwell进程并且每个进程均能正确运行。


请问大家有什么方案或建议能实现通过某个终端来控制多台机器,使得每台机器都能发起多个maxwell进程运行不同的maxwell工程文件?



谢谢
回复 不支持

使用道具 举报

发表于 2011-11-2 10:31:39 | 显示全部楼层 来自 北京丰台
这么高深的东西,真是不懂。站在边上看看吧。
回复 不支持

使用道具 举报

发表于 2011-11-13 22:46:47 | 显示全部楼层 来自 北京
我很感兴趣。。。
回复 不支持

使用道具 举报

发表于 2011-11-17 17:57:28 | 显示全部楼层 来自 北京
我一点都不懂   很感兴趣
回复 不支持

使用道具 举报

发表于 2012-2-9 20:52:30 | 显示全部楼层 来自 湖北武汉
太高深了,利用脚本编程可以实现些啥功能哦
回复 不支持

使用道具 举报

发表于 2014-10-23 15:06:04 | 显示全部楼层 来自 上海南汇区
有点高深  
回复 不支持

使用道具 举报

发表于 2014-10-25 08:33:12 | 显示全部楼层 来自 美国
不太明白“将本机的某个matlab程序在其他多核机器上运行,这个程序实际上启动多个maxwell进程来仿真不同的maxwell工程。”,如果只是这样的话,remote desktop不就行了,反正每台电脑上软件都不少,运行的工程也不一样。

如果一个工程,算parametric analysis还值得这么搞一下,那用HPC功能,maxwell也是有这个功能
回复 不支持

使用道具 举报

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

本版积分规则

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

GMT+8, 2024-3-29 21:32 , Processed in 0.032803 second(s), 11 queries , Gzip On, MemCache On.

Powered by Discuz! X3.5 Licensed

© 2001-2024 Discuz! Team.

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