Calling external program using dos incompatibility in 2015?
이전 댓글 표시
Hi everyone, I've successfully used dos command to run external program in Matlab 2012b. The command read like this:
dos('"C:\LSDYNA\program\ls-dyna_smp_s_R610_winx64_ifort101.exe" i=Change_VH_2.k &');
Now I met a problem when using the same code in 2015 version. I've checked up and Matlab website said "On Windows platforms, the MATLAB system, dos, and ! commands add the /D flag to the startup of the Windows Command Processor (cmd.exe) program......To preserve the behavior of previous releases, prepend cmd /C to your operating system command. For example, !cmd /C "cd"."
So I changed my code into:
dos('cmd /C "C:\LSDYNA\program\ls-dyna_smp_s_R610_winx64_ifort101.exe" i=Change_VH_2.k &');
But it gives me the same error. Pls anyone could help?
Thanks in advance!
댓글 수: 5
Walter Roberson
2015년 10월 1일
You did not indicate what the error is that you encounter.
Alex Shao
2015년 10월 9일
Walter Roberson
2015년 10월 9일
And what is it about the external program's execution that allows you to figure out that there was an error?
What is the behaviour you expect? What behaviour do you observe instead.
Saying that it gives you "the same error" does not tell me anything about whether it is breaking down complaining about a missing DLL or if it is executing but clearly has the wrong input parameters.
Mehdi Eskandari-Ghadi
2017년 9월 24일
편집: Walter Roberson
2017년 9월 24일
I get the following error on this issue. I tried googling solutions but didn't find anything. Does anyone have a solution??
forrtl: severe (64): input conversion error, unit -5, file Internal Formatted Read
Image PC Routine Line Source
ls-dyna_smp_s_R70 0000000144D57940 Unknown Unknown Unknown
ls-dyna_smp_s_R70 0000000144D53311 Unknown Unknown Unknown
ls-dyna_smp_s_R70 00000001442A66D2 Unknown Unknown Unknown
ls-dyna_smp_s_R70 000000014428D05F Unknown Unknown Unknown
ls-dyna_smp_s_R70 000000014428CA63 Unknown Unknown Unknown
ls-dyna_smp_s_R70 000000014426CBF5 Unknown Unknown Unknown
ls-dyna_smp_s_R70 000000014426B125 Unknown Unknown Unknown
ls-dyna_smp_s_R70 0000000140095279 CHKCPU 7751 atemp.F
ls-dyna_smp_s_R70 00000001400E9B74 D92IN 24659 dyn12.F
ls-dyna_smp_s_R70 00000001400DE3C9 DYNAI 1981 dyn12.F
ls-dyna_smp_s_R70 0000000140150604 OVERLY 185 dyn0.F
ls-dyna_smp_s_R70 0000000140010E29 LSINPUT 1771 dynm.F
ls-dyna_smp_s_R70 0000000140010105 LSDYNA1 1076 dynm.F
ls-dyna_smp_s_R70 00000001400113D1 MAIN__ 1908 dynm.F
ls-dyna_smp_s_R70 0000000144D6B240 Unknown Unknown Unknown
ls-dyna_smp_s_R70 0000000144D3020B Unknown Unknown Unknown
KERNEL32.DLL 00007FFAC8CD2774 Unknown Unknown Unknown
ntdll.dll 00007FFAC9A40D51 Unknown Unknown Unknown
Walter Roberson
2017년 9월 24일
LSDYNA appears to be a commercial software product; http://www.lstc.com/products/ls-dyna . As such the source is not readily available so we do not know what code is at any of the listed lines, so we do not know what it was attempting to do at the time -- something to do with reading input.
I see that the executable appears to have been compiled with iFort, but it is still possible that it is encountering the same kind of problem as gfortran encountered: see https://www.mathworks.com/matlabcentral/answers/91919-why-does-the-output-of-my-fortran-script-not-show-up-in-the-matlab-command-window-when-i-execute-it#answer_101270
답변 (1개)
Kai
2016년 6월 28일
0 개 추천
Any solutions? I encountered the same problem
카테고리
도움말 센터 및 File Exchange에서 Matrix Indexing에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!