Calling fortran executable file from matlab is much slower
조회 수: 1 (최근 30일)
이전 댓글 표시
I have a fortran code compiled into a exe file. I can run it directly through the command line, or simply call the executable from matlab. This two approaches lead to massively different execution speeds and I am unsure why.
If I run the executable file from the command line, the first part of the code runs in **1,000** seconds with all cores/threads of my computer being used:
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/1542932/image.png)
If instead I call the fortran executable from matlab it does not use all cores/threads and takes approximately **1,400** seconds to run.
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/1542937/image.png)
I am calling the code using: `system('path\LoopFortranToMatlab.exe')`
댓글 수: 0
답변 (0개)
참고 항목
카테고리
Help Center 및 File Exchange에서 Fortran with MATLAB에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!