zsq-w 发表于 2009-8-29 21:37:58

cmd提交inp文件小结

本帖最后由 zsq-w 于 2011-6-14 11:12 编辑

有时候需要用command提交inp文件(比如少数keywords不为CAE识别),以下是对aba版中提交inp中出现问题的一个小结,还有其他需要注意的问题,望大家回帖补上。根据2-12楼的各位高人的回复,现已增补到一楼。

(假设将运行的inp是jobname1.inpjobname2.inp等等,也假设这些inp是可以运行的。如果inp有错误,可参考精华帖《keywords翻译初级阶段》及manual修改)



1提交方式:

在WINDOWS中点击 [开始] → [程序] → → ,然后在DOS窗口中输入:
                  1)提交任务:abaqusjob=jobname1int                      (int就是interactive)
                  2)双精度提交abq6101 j=jobname1 double int
                  3)任务暂停:abaqus suspend job=jobname1 int          (可恢复)
                  4)恢复运算:abaqus resume job=jobname1 int            (从上次分析结束的地方重新开始分析)
                  5)杀死任务:abaqus terminate job=jobname1 int         (杀死任务不可恢复,但是如果有restart文件的话,可以restart继续计算):
                  6)restart重启计算: abaqus job=xnewx oldjob=xoldxint
                  7)打开CAE界面:abaqus cae                                       (aba后处理界面即出现)
                8)打开viewer后处理界面:abaqus viewer                     (aba后处理界面即出现)
                  9)查看aba帮助文件:abaqus doc                                 (aba帮助文件即在默认浏览器中出现)
                  10)查看cmd命令帮助:abaqus help                           (这个太有用了,通过这个可以找到以上所有命令。)
                  11)顺次运行几个inp后自动关机:
                            call abaqus job=job_1interactive
                            call abaqus job=job_2 interactive
                            shutdown -s
                  12)运算之前datacheck: abaqus job=xxx datcheck
                  13)定义所需的最大内存:abaqus job=xxx memory=memory-size

整合下,提交一个子程序、双精度、多cpu运算的范例:
                  abq6101 j=jobname user=u.f cpus=8 double int




2几点说明:

1)Old job files exist. Overwrite?<y/n>问是否可以覆盖。如果是文件重名,应该键入n;把现有inp改名,重新提交,以免覆盖以前的文件。如果可以覆盖,键入y。
2)经常被问的问题:

------------------------------- ---------------------------------


abaqus不是内部命令,也不算可以运行的程序或者批处理文件。
   解决方案(1)可见《常见问题2.0》:假如你的 abaqus.bat 是在 d:\ABAQUS\Commands 下面,在dos下输入一下命令:
                            path=%path%;d:\ABAQUS\Commands
   参考链接:http://forum.simwe.com/thread-918442-1-1.html(abaqus command打不开)
                     http://forum.simwe.com/viewthread.php?tid=727164&highlight=%C4%DA%B2%BF%C3%FC%C1%EE(abaqus不是内部命令的问题)
解决方案(2)把abaqus.bat复制到你的inp文件所在文件夹(比如工作文件夹)下再试试看
   
3)想多cpu运算(比如4cpus):
         提交任务:abaqusjob=jobname1 int    改为提交任务:abaqusjob=jobname1   cpus=4 int
4)有些显式运算,incretment太多的话(比如多余30w),建议用双精度:
         提交任务:abaqusjob=jobname1 int    改为提交任务:abaqusjob=jobname1 double int
但是谁都知道双精度比单精度费时,所以没有如果必要的话,就不需要加这个了。
5) 如果不加int会怎么样呢?
      提交任务:abaqusjob=jobname1 int    改为提交任务:abaqusjob=jobname1
后面加了int,dos窗口会显示任务进行到哪个阶段,比如是pre.exe还是standard explicit.exe------还是conpleted,都会给你提示。不加int就没有这些提示了。
6) 如何看任务进程:
      我一般就是看.sta文件。老手推荐UltraEditor,能自动更新文件内容,可以试试。http://forum.simwe.com/viewthread.php?tid=861789&highlight=%CC%E1%BD%BBinp
7) Abaqus warning: The .inp extension has been removed from the job identifirer
       出这个一般是因为有的新手提交job的时候添加了inp后缀,如
       abaqusjob=jobname.inp. 去掉inp后缀即可。即使不去掉,软件也自动忽略这个后缀,这个只是告示说明,不影响计算。

3 批处理
1)如果有大批的inp文件需要提交,如何节省时间让它们自动连续运算? 一定要看garethz斑竹的精华帖:[原创总结]Windows 系统下实现input文件批处理http://forum.simwe.com/viewthread.php?tid=775346&highlight=%C5%FA%B4%A6%C0%ED这里还介绍了算完自动关机的命令,我个人非常喜欢,向大家推荐。

garethz斑竹刚刚针对新版本推出新的批处理工具:http://forum.simwe.com/thread-894456-1-1.html,太赞了。

2)cmd运行批处理inp文件:

                   abaqus job=jobname1 int && abaqus job=jobname2 int && abaqus job=jobname3 int
3)批处理也可以这么处理:建立一个记事本文件a.txt,打开键入以下几行:

               call abaqusjob=jobname1int               
               call abaqusjob=jobname2int               
               call abaqusjob=jobname3int               
               call abaqusjob=jobname4int   

保存并关闭,右键属性将后缀改为.bat,双击即可运行。


4 garenthz斑竹的inp文件一键提交插件
http://forum.simwe.com/thread-878407-1-1.html有了这个,只要在inp文件上点单击右键可出现方便的快捷菜单进行任务提交,特别适合文件名太长的inp文件提交。



5 康版的演示文稿:

      康版图文演示both CAE and cmd提交任务的流程:http://forum.simwe.com/viewthread.php?tid=877666&highlight=   。强力推荐!


6 子程序 子材料等方面期待高手继续总结

子程序提交:
            abaqus j=inpfile user=subroutinefile cpus=n
(注意subroutinefile的后缀必须是.f,不能是.for)


7 其他应用
    1)获取Manual里面的inp文件:abaqus fetch job=job-name

billowriver 发表于 2009-8-29 22:00:50

版主真是热心,我也补充两个
abaqus job=xxxuser=xxx   %提交子程序
abaqus job=xxx datcheck %用于模型运算之前的datacheck
abaqus job=xxx memory=memory-size %定义计算所需的最大内存
abaqus job=xxx oldjob=xxx%用于restart重启计算
abaqus job=xxx convert=xxx %定义ALE方法里面的tracer particle时需要用到,其他的用途还没研究过

cdstudio 发表于 2009-8-29 22:34:31

要实现批处理文件一个接一个提交, 应该这样写
call abaqusjob=jobname1int
call abaqusjob=jobname2int               
......

bling95 发表于 2009-8-30 09:58:11

也可以通过编写cmd文件来实现顺次运行几个inp后自动关机。
call abaqus job=job_1interactive
call abaqus job=job_2 interactive
shutdown -s

在这里,我想请问在doc界面下想把目录改到 G:\Temp68下,为什么在提示符前还是显示D:\Temp68,操作过程是:
cd G:
cd G:\Temp68

zsq-w 发表于 2009-8-30 10:16:27

要实现批处理文件一个接一个提交, 应该这样写
call abaqusjob=jobname1int
call abaqusjob=jobname2int               
......
cdstudio 发表于 2009-8-29 22:34 http://forum.simwe.com/images/common/back.gif
cdstudio兄,我用abaqusjob=jobname1int格式编写的bat文件,也能运行呢。
上传看看。

blueshell 发表于 2009-8-30 13:16:54

既然是总结,再多一个也无妨。来自于本论坛,略加修改的python多任务提交文件。可以考虑子程序,cpu数量。已在vista (32bit)和win7(64bit)中测试通过。

zsq-w 发表于 2009-8-30 13:25:31

既然是总结,再多一个也无妨。来自于本论坛,略加修改的python多任务提交文件。可以考虑子程序,cpu数量。已在vista (32bit)和win7(64bit)中测试通过。
blueshell 发表于 2009-8-30 13:16 http://forum.simwe.com/images/common/back.gif

这个是不是一楼第四部分所说的garethz斑竹的提交器? 或者是同样的东西?

blueshell 发表于 2009-8-30 13:35:19

没有garethz的先进,是个python文件,文内注释比较详细,容易上手。用户只需略加修改就可以在CAE像一般的python文件使用了。

jacobi 发表于 2009-8-30 14:32:24

在cmd下输入abq654 help
可得以下相关命令:

Microsoft Windows XP
(C) Copyright 1985-2001 Microsoft Corp.

C:\Documents and Settings\linux>abq654 help
In the following execution procedures, "abaqus" refers to the command
used to run ABAQUS.

Execution procedure for obtaining information

abaqus{help | information={environment | local | memory | release |
         status | support | system | all} | whereami}


Execution procedure for ABAQUS/Standard and ABAQUS/Explicit

abaqus job=job-name[analysis | datacheck | parametercheck | continue |
                        convert={select | odb | state | all} | recover |
                        syntaxcheck | information={environment | local |
                        memory | release | status | support | system | all}]
                     
                     
                     
                     
                      [globalmodel={results file-name |
                        output database file-name}]
                     
                     
                     
                     
                     
                     
                      interactive | background | queue=
                        
                     
                     
                     


Execution procedure for ABAQUS/CAE

abaqus cae
            
            
            


Execution procedure for ABAQUS/Viewer

abaqus viewer
               
               


Execution procedure for Python

abaqus python


Execution procedure for parametric studies

abaqus script[=script-file]
               


Execution procedure for online documentation

abaqus doc


Execution procedure for licensing utilities

abaqus licensing


Execution procedure for ASCII translation of results (.fil) files

abaqus ascfil job=job-name


Execution procedure fo joining results (.fil) files

abaqus append job=job-name oldjob=oldjob-name input=input-file


Execution procedure for querying the keyword/problem database

abaqus findkeyword


Execution procedure for ABAQUS/Fetch

abaqus fetch job=job-name


Execution procedure for ABAQUS/Make

abaqus make {job=job-name | library=source-file}
            
            


Execution procedure for input file and output database upgrade utility

abaqus upgrade job=job name
               
               


Execution procedure for remote output database connector

abaqus networkDBConnector port={serverPortNumber | auto_assigned}
                           
                           
                           
                           


Execution procedure for fixed format conversion utility

abaqus free job=job-name input=input-file


Execution procedure for translating NASTRAN bulk data files to ABAQUS
input files

abaqus fromnastran job=job-name
                                 
                                 
                                 
                                 
                                 

Execution procedure for translating PAM-CRASH input file to partial
ABAQUS input files

abaqus frompamcrashjob=job-name

Execution procedure for translating ABAQUS output database files to
NASTRAN Output2 results files

abaqus toOutput2 job=job-name
                              
                              
                              

Execution procedure for exchanging ABAQUS data with ZAERO

abaqus tozaero   job=job-name
                              
                              
                              
                              

Execution procedure for job execution control

abaqus {suspend | resume | terminate} job=job-name


Execution procedure for the ABAQUS Interface for MOLDFLOW

abaqus moldflow job=job-name
                              
                              
                              

Execution procedures for the ABAQUS Interface for MSC.ADAMS

Executing the adams command to create a modal neutral file without
stress or strain

abaqus adams job=job-name
                           
                           
                           
                           
                           

Executing the adams command to create a modal neutral file with
stress or strain

Creating the second input file

abaqus adams job=job-name
                           
                           
                           
                           

Creating the modal neutral file from two results files

abaqus adams job=job-name
                           
                           
                           
                           
                           
                           

C:\Documents and Settings\linux>

zsq-w 发表于 2009-8-30 14:44:31

9# jacobi

我一楼所述本是抛砖引玉,现在看了各位大牛的回复,颇有班门弄斧之感。
各位回复让我受益匪浅。jacobi斑竹的这个help命令一敲进去,出来的东东涵盖所有cmd提交inp的内容。感谢感谢!

zsq-w 发表于 2009-8-30 15:56:34

也可以通过编写cmd文件来实现顺次运行几个inp后自动关机。


在这里,我想请问在doc界面下想把目录改到 G:\Temp68下,为什 ...
bling95 发表于 2009-8-30 09:58 http://forum.simwe.com/images/common/back.gif

在“cd G:”这一行去掉:即可。

cdstudio 发表于 2009-8-30 17:08:03

命令行可以直接这样写:
abaqus j=1 int && abaqus j=2 int &&....................

hfutbxq 发表于 2009-9-13 17:36:57

学习一下,谢谢

puyingchao 发表于 2009-12-7 10:32:14

牛人一大堆啊。。。。。。。。。。。。。赶快像各位版主靠近学习。。:)

3dmaxhy 发表于 2009-12-22 13:07:56

好贴,解决了实际问题,谢谢分享!

lxllxjlxy 发表于 2009-12-28 15:37:47

太感谢了,这个帖子,楼主辛苦了

lxllxjlxy 发表于 2009-12-28 17:12:23

本帖最后由 lxllxjlxy 于 2009-12-28 17:15 编辑

第3大点第3小点,之前应该都加上call,要不然执行完一个之后就停止了。。。或者是在中间加上&&也行

fish1602020 发表于 2009-12-28 19:51:16

版主大人好强大,菜鸟就需要这样的营养,thanks

fshcooler 发表于 2009-12-30 10:47:13

学习了,受益匪浅。谢谢各位大牛!

fighting-jely 发表于 2010-3-9 15:48:28

学习了,谢
页: [1] 2 3 4
查看完整版本: cmd提交inp文件小结