How can I run a mex function using Matlab R2018b, which worked fine with R2015a?

5 vues (au cours des 30 derniers jours)
ma os
ma os le 25 Nov 2019
Commenté : Walter Roberson le 25 Nov 2019
Hi, I am using Matlab R2018b since a few months.
For certain problems I use https://de.mathworks.com/matlabcentral/fileexchange/30819-fast-inpolygon-in-mex because the standard matlab routine inpolygon is very slow.
I added a simple openmp parallelisation in the c-code to speed up the routine with
#pragma omp parallel for private(nIntersect, ax, ay, bx, by, tmp, intersecty, ind, iC) num_threads(nT)
The compiled mex function works perfectly if I use MATLAB R2015a. But if I use R2018b, I get the following error:
Invalid MEX-file 'PATH/mex_function.mexa64': dlopen: cannot load any more object with static TLS.
The mex function which does not include openmp works fine with R2018b and R2015a.
It is very annoying to run an old MATLAB just for using this function.
Thanks in advance for your help!
  1 commentaire
Walter Roberson
Walter Roberson le 25 Nov 2019
https://stackoverflow.com/questions/19268293/matlab-error-cannot-open-with-static-tls has further information about the situation

Connectez-vous pour commenter.

Réponses (0)

Catégories

En savoir plus sur Startup and Shutdown dans Help Center et File Exchange

Produits


Version

R2018b

Community Treasure Hunt

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

Start Hunting!

Translated by