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

[子程序/二次开发] 单机并行计算的批处理程序问题

[复制链接]
发表于 2011-4-20 16:21:53 | 显示全部楼层 |阅读模式 来自 江苏南京
请教各位前辈:
对于单核计算,调用生成的单个.dat文件即可。而假设采用单机双核并行计算,模型生成的.dat文件有3个,分别为**_job1.dat,1**_job1.dat,2**_job1.dat,本人试过调用**_job1.dat文件,不过批处理程序无法运行。那么如何编写批处理程序,使机器能实现并行运算。请高手不吝赐教,谢谢!
发表于 2011-4-27 10:26:43 | 显示全部楼层 来自 江苏南京
Simdroid开发平台
没人会?请斑竹帮忙解决下,谢谢
回复 不支持

使用道具 举报

发表于 2012-4-24 22:08:17 | 显示全部楼层 来自 湖北武汉
MULTIPLE / SINGLE POST FILE
MULTIPLE POST FILES
One post file is generated for each domain. There is also one base post file containing
information about which domain post files that are to be used.
Mentat automatically combines the post files during post processing.
SINGLE POST FILE
A single post file is generated for the whole model.
回复 不支持

使用道具 举报

发表于 2012-4-24 22:09:10 | 显示全部楼层 来自 湖北武汉
MULTIPLE INPUT FILES
One input file is generated for each domain.
SINGLE INPUT FILE
A single input file is generated, containing the information about the decomposition.
回复 不支持

使用道具 举报

发表于 2012-4-24 23:11:35 | 显示全部楼层 来自 陕西西安
控制台下执行marc.exe或runmarc.bat,查看各种参数是否设置完整
回复 不支持

使用道具 举报

发表于 2012-4-26 21:16:27 | 显示全部楼层 来自 湖北武汉
puma21 发表于 2012-4-24 23:11
控制台下执行marc.exe或runmarc.bat,查看各种参数是否设置完整

楼主,marc2010里可以只生成一个并行处理的dat文件,而不是生成多个的。我想问一下puma21大侠:
(1)为什么生成的dat文件在linux架构的服务器上的marc软件里面不能调用多个处理器呢?我的dat文件里面是设置了16核计算的,但是服务器只调用了一个核心。是因为这个dat文件里面对并行的设置是基于Windows MPI,因此不能在linux下调用多个处理器吗?
(2)还有一个问题就是,我在自己的电脑(Windows)里面直接用marc读入这个dat文件,程序竟然不会计算,而是直接3004退出。查看结果文件,里面也是空白。不知道是不是我直接读入dat文件在marc的方式有误,这个问题困扰我很久了,请大侠帮忙解答啊!
回复 不支持

使用道具 举报

发表于 2012-4-26 22:03:24 | 显示全部楼层 来自 陕西西安
marc是可以读入单个dat文件并行运算的,设置多少个节点运算不是在dat文件中设置的,而是运行runmarc.bat时设置的,具体如何提交运算可以打开runmarc.bat文件仔细阅读下面部分

REM #########################################################################
REM                                                                        
REM       run_marc - run a marc job                                         
REM       -------------------------                                         
REM                                                                        
REM usage: run_marc -j jid { options }                                      
REM                                                                        
REM where options are:                                
REM                                                                        
REM -j   jid         job id number.                    
REM -pr  prog        program name (saved user subroutine executable)
REM -r   rid         restart file job id.
REM -si  sid         substructure file id.
REM -pi  post        post file job id.   
REM                                                                        
REM -u   user        user subroutine.         
REM -obj obj         user objects or libraries.         
REM -sa  y|n         do or do not save load module: defaults to no
REM -au  y|n         use auto restart feature: defaults to no
REM                  Auto restart control stops the analysis, runs
REM                  a mesher to remesh and restarts the analysis
REM                  Windows NT only. Used for DCOM server support.
REM -nprocd          number of tasks for domain decomposition.
REM -nprocds         number of tasks if single file input.
REM -nps             same as nprocds
REM -nsolver         number of tasks for solvers 12 and 13
REM                  these are distributed tasks operating via MPI
REM -nthread         number of threads for solvers 6, 8 and 11
REM                  these are shared memory threads, not MPI tasks
REM -itree           message passing tree for domain decomposition.         
REM -de              defaults file.
REM -vf              viewfactor file.
REM -host            host file: defaults to local.  If file jobid.defhost exists,
REM                  only -np(s) necessary.
REM -me              manual remeshing control
REM -ml              memory limit in Mbyte
REM -mo              selects i4 or i8 version
REM                  default: i4 or via defaults file run_marc_defaults
REM                  the -mo option will override
REM -mpi             selects MPI version, intel-mpi or ms-mpi
REM                  default: intel-mpi
REM -pc              remote computer name: defaults to local. Windows NT only.
REM                  Used for DCOM server support.
REM -dir             sets the current directory. this is where the job
REM                  i/o takes place. defaults to current directory
REM -sdir            sets the scratch directory. this is where scratch
REM                  files for the job are created. defaults to current
REM                  directory
REM -dcoup           contact decoupling used for Superform problem with
REM                  deformable tools
REM
REM -alloc           only perform memory allocation test, no analysis
REM
REM -list y         only list options in the input file, no analysis
REM
REM -fe num         set feature number "num" for the run. only one allowed
REM
REM -dytran          flag to switch from Dytran to Marc
REM                  dytran = 0,program will run without Marc-Dytran switch.
REM                         = 1,program will restart Marc after Dytran run.
REM                        >= 2,Not supported yet.
REM                   -dytran is not supported for Marc2003
REM -ou              force analysis to use out-of-core control
REM                         = 0, not used
REM                         = 1, element storage to be saved out-of-core
REM -dll             using marc.dll and exe_marc.exe with streaming input
REM                         = 0, not used
REM                         = 1, memory used in exe_marc will be freed
REM                         = 2, memory used in exe_marc will not be freed
REM                         = 3, run with marc input deck
REM -trk             run post point tracker
REM                         = 0, not used
REM                         = 1, used
REM
REM ########################################################################

并行运算又分单机和网络两种,如果是单机并行则只需指定cpu个数即可,如果是网络则需单独的文件指定各节点运行的cpu数目,具体可参考marc手册,说的很明白的。

关于第二个问题,首先保证你的dat文件无误,在mentat里面提交能否运行,其次是提交方法,参考上面部分

回复 不支持

使用道具 举报

发表于 2012-4-26 22:20:37 | 显示全部楼层 来自 湖北武汉
本帖最后由 Justincharming 于 2012-4-26 22:25 编辑
puma21 发表于 2012-4-26 22:03
marc是可以读入单个dat文件并行运算的,设置多少个节点运算不是在dat文件中设置的,而是运行runmarc.bat时 ...

对于第一个问题,我的dat文件是在mentat里面导出来的,对应的mud文件是可以实现并行计算的,但是我新建一个文件,导入这个dat,一点击run立马3004退出。请问puma21大侠,一般dat文件是怎么生成好呢?我把dat文件附上,希望你能帮我看看,谢谢

本帖子中包含更多资源

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

×
回复 不支持

使用道具 举报

发表于 2012-4-27 10:11:16 | 显示全部楼层 来自 湖北武汉
puma21 发表于 2012-4-26 22:03
marc是可以读入单个dat文件并行运算的,设置多少个节点运算不是在dat文件中设置的,而是运行runmarc.bat时 ...

puma21大侠:(1)我也试过把这个dat分解为多个1.dat,2.dat,3.dat,然后用批处理去调用,但是只能算1.dat,算2.dat就只算两步就2004退出,3.dat是一步都没算就结束了。查看三个t16文件,发现只有第一个里面有数据,还是部分节点和单元的数据,第二个第三个都没有。我的dat文件都是mentat自己生成的啊,会有什么问题呢?
(2)你说“marc是可以读入单个dat文件并行运算的,设置多少个节点运算不是在dat文件中设置的,而是运行runmarc.bat时设置的”,意思是说我还得修改runmarc.bat中的处理器数据吗?但是我的dat文件里面是分好domains了的啊,并且在mentat里面已经启动了DDM啊
回复 不支持

使用道具 举报

发表于 2013-9-20 12:53:56 | 显示全部楼层 来自 北京
怎么用单机并行计算呐?各位大大指导一下我吧~
没使用并行计算的情况(我在压缩一个文件,所以多用了一些cup)
3 分钟前 上传
下载附件 (35.66 KB)
这是没使用DDM时的情况



3 分钟前 上传
下载附件 (28.58 KB)



用了2DDM的并行运算,单机多核的

2 分钟前 上传
下载附件 (65.67 KB)
用了单机多核并行计算,不动了!



丫的计算机不算了?
回复 不支持

使用道具 举报

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

本版积分规则

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

GMT+8, 2024-5-11 19:49 , Processed in 0.045765 second(s), 15 queries , Gzip On, MemCache On.

Powered by Discuz! X3.5 Licensed

© 2001-2024 Discuz! Team.

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