Multithreading does not work for external programs called by the 'system' command

2 次查看(过去 30 天)
I am using Matlab R2010a on a Windows Server 2003 computer in combination with an external program. The external program is called by the 'system' command. The external program does not use multithreading. If you run the external program outside Matlab (by running it from the DOS-prompt) it uses multithreading. Is there a possibility to use multithreading for programs called by the 'system' command?

采纳的回答

Sarah Wait Zaranek
Sarah Wait Zaranek 2011-4-13
I have seen this before. I think this is how we resolved it.
Basically, MATLAB and Windows may use different environment variables.
If your application is using the OMP_NUM_THREADS environment variable, you can set this directly in MATLAB.
setenv('OMP_NUM_THREADS',numOfThreads);

更多回答(0 个)

类别

Help CenterFile Exchange 中查找有关 Application Deployment 的更多信息

产品

Community Treasure Hunt

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

Start Hunting!

Translated by