How to disable openMP with Matlab Coder?

26 vues (au cours des 30 derniers jours)
Matthias Frühwirth
Matthias Frühwirth le 7 Juin 2016
Commenté : Jingyang Yan le 18 Fév 2022
I want to use Matlab Coder to compile a function that will not profit much from multithreading. Although I use
codegen -O disable:openmp
the resulting C source includes omp.h and tries to find vcompXXX.dll when run.
How can I switch off OpenMP use completely?
System: Matlab Coder 2016a/Windows 10/Visual C++ 2013
  1 commentaire
Thomas Langerwerf
Thomas Langerwerf le 23 Fév 2017
I would also like to know this!

Connectez-vous pour commenter.

Réponses (1)

Ryan Livingston
Ryan Livingston le 1 Mar 2017
Try:
cfg = coder.config('dll');
cfg.EnableOpenMP = false;
codegen -config cfg ...
  2 commentaires
Jingyang Yan
Jingyang Yan le 18 Fév 2022
In MATLABT R2021b version, even I disable the OpenMP libarart if possible, the omp.h file is still included in the header files.

Connectez-vous pour commenter.

Catégories

En savoir plus sur MATLAB Coder 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