Effacer les filtres
Effacer les filtres

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

2 vues (au cours des 30 derniers jours)
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?

Réponse acceptée

Sarah Wait Zaranek
Sarah Wait Zaranek le 13 Avr 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);

Plus de réponses (0)

Catégories

En savoir plus sur Application Deployment dans Help Center et File Exchange

Produits

Community Treasure Hunt

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

Start Hunting!

Translated by