Issues running a Mex Function (.mexw64)
10 visualizaciones (últimos 30 días)
Mostrar comentarios más antiguos
Hi I am very new to Matlab Mex functions. I was able to compile and create a .mexw64 file using Visual Studio 2019 which I am calling from Matlab. When I run it I get the following error:
"Couldn't open source file ./optixRaycasting_generated_OptiXRaycastingContext.cu.ptx"
I foulnd the specified file and added its path to the Matlab path as well. I am unfamiliar with files of type .ptx and I am not sure if this is an error associated with the build of the mex function itself or something that I may not be doing on the Matlab side of things.
2 comentarios
Jan
el 15 de Oct. de 2021
Please explain exactly, when this message appears. Does "When I run it" mean the compilation or the calling?
I guess, that the compiled function try to open this file and does not find it. Adding the folder to Matlab's path does not help, because the C code does not search in the path automatically.
Did you write thefunction? Is there any documentation which explains, where this file should be stored?
Respuestas (1)
Jan
el 16 de Oct. de 2021
The leading "./" means, that it is searching in the current folder. Assuming, that the current folder is chosen as expected, is a standard source of bugs. Prefer absolute file names. Search in the file for the command, to open this file, and include the abolute path there. If this does not work for any reasons, use cd() to change to the folder, in which the file is found.
0 comentarios
Ver también
Categorías
Más información sobre MATLAB Compiler en Help Center y File Exchange.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!