Effacer les filtres
Effacer les filtres

Error using loadlibraryin mex file

2 vues (au cours des 30 derniers jours)
Zainub
Zainub le 9 Fév 2015
Commenté : Joss Knight le 17 Fév 2015
Hi.... I am working on matlab 2014 and GPU. I want to run cublas functions in mex files but I found following error
Error using loadlibrary (line 422) There was an error loading the library "libcublas" The specified module could not be found. Caused by: Error using loaddefinedlibrary The specified module could not be found.
please help me

Réponse acceptée

Erik S.
Erik S. le 9 Fév 2015
Is the lib file "libcublas" in your path? Have you told the complier (mex) where to find the file?
Usually you need to supply mex with something like '-L:C\MyLibs' -llibcublas
Assuming the lib file is in the folder C:\MyLibs
  2 commentaires
Zainub
Zainub le 9 Fév 2015
sir please explain your answer.... I found this way to excess cublas from net... loadlibrary('libcublas','C:\Program Files\Matlab\R2014a\extern\include\cublas.h')
Joss Knight
Joss Knight le 17 Fév 2015
No, you don't do that, you just link libraries to your code using -l parameters to mex. But you shouldn't need to link to cublas, that is linked by default for GPU MEX functions.

Connectez-vous pour commenter.

Plus de réponses (0)

Catégories

En savoir plus sur GPU Computing dans Help Center et File Exchange

Tags

Community Treasure Hunt

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

Start Hunting!

Translated by