Azzera filtri
Azzera filtri

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

2 visualizzazioni (ultimi 30 giorni)
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?

Risposta accettata

Sarah Wait Zaranek
Sarah Wait Zaranek il 13 Apr 2011
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);

Più risposte (0)

Categorie

Scopri di più su Application Deployment in Help Center e File Exchange

Prodotti

Community Treasure Hunt

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

Start Hunting!

Translated by