why I am getting this error??? : "cblas.h", "matrix_funcs.h" and "mex.h&q

Following issues I could not solve to create a mex file for .cu file. It says “cblas.h”, “matrix_funcs.h” and “mex.h” source files cannot be opened. I have searched in the Program Files\MATLAB\R2014a\extern\include directory. mex.h file is available but I cant get it why it cannot be opned. Other two files are not available in the directory. Even I have not used other two header files in my code as well but still dont know why it is asking for “cblas.h” and “matrix_funcs.h”

any good suggestion will really be appreciated. Thanks…

cuda-convnet uses a header file with the name “matrix_funcs.h” – see: https://github.com/dnouri/cuda-convnet/tree/master/include/common Are you using that in your code? If so, you need to point your includes directory to that folder.

If it says cannot open a header file, it’s possible that the path to
Program Files\MATLAB\R2014a\extern\include is not included as well… add it.

cblas.h seems to be part of OpenBlas perhaps? https://github.com/xianyi/OpenBLAS#readme
Unless that’s a typo and you meant cublas.h, in which case that’s part of the CUDA toolkit package and lives in Program Files\NVIDIA GPU Computing Toolkit\CUDA\v5.5\include (or a different version of CUDA, if you’re using that)… again same thing… add the folders to your INCLUDE path.

Also, I have to comment that if you have to ask for help, please at least post some code snippets, what compiler you are using, operating system, etc, etc…

Most of your posts are incredibly vague, not to mention they are usually simple errors that can be fixed by familiarizing yourself with the build environment you are using (I can only assume Visual Studio) and not even related to CUDA at all… just my 2 cents…

Hi vacaloca, Thanks a ton for your reply. Your replies are always helpful :) :) . You have given me one link earlier. http://www.orangeowlsolutions.com/archives/498 for creating mex file of cuda code.I have followed all the steps in the link. There is no problem in the .cpp file. But in the .cu file few problems are occurring. I am attaching the snapshots of the errors and .cu code snapshot along with this email. You have asked me to put code snippet. I tried several times but I dont know how to put it correctly. So I attached the snapshots of the code and errors. If possible please check and let me know what should I do? I am using windows 64 bit operating system. CUDA 6.5 version, visual studio 2013, matlab 2011a.
Here, I would also like to mention that I have added the following two paths in Properties–>Configuration Properties–>C/C+±->General–>Additional Include Directories
E:\Program Files\MATLAB\R2011a\extern\include;
C:\Program Files\NVIDIA Corporation\Installer2\CUDAToolkit_6.5.{6DBA433B-7F4F-4199-8467-E19896CC8E65}\include;

And I have added following three paths in Properties–>Configuration Properties–>Linker–>Input—>Additional Dependencies–>
E:\Program Files\MATLAB\R2011a\extern\lib\win64\microsoft\libmex.lib;
E:\Program Files\MATLAB\R2011a\extern\lib\win64\microsoft\libmx.lib;
C:\Program Files\NVIDIA Corporation\Installer2\CUDAToolkit_6.5.{6DBA433B-7F4F-4199-8467-E19896CC8E65}\lib\x64\cudart.lib;C:\Program Files\NVIDIA Corporation\Installer2\CUDAToolkit_6.5.{6DBA433B-7F4F-4199-8467-E19896CC8E65}\include

Above all are already mentioned in the link which you have given me earlier. After following everything, .cpp file is not showing any error but .cu file is showing the errors which I have attached in the snapshot.