Calling external program using dos incompatibility in 2015?

1 view (last 30 days)
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 Comments
Mehdi Eskandari-Ghadi
Mehdi Eskandari-Ghadi on 24 Sep 2017
Edited: Walter Roberson on 24 Sep 2017
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
Walter Roberson on 24 Sep 2017
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

Sign in to comment.

Answers (1)

Kai
Kai on 28 Jun 2016
Any solutions? I encountered the same problem

Categories

Find more on Desktop in Help Center and File Exchange

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!