I believe the only thing needed is --arch sm_13 in the mexopts file, nvmex uses the mexopts file for the compiler options. There is normally a line like NVCCOPTIONS = …, I just added --arch sm_13 to that line I believe. I am currently on holiday, so unable to check it unfortunately.
Thanks for help E.D. Riedijk, I finally have the solution.
Instead of adding flag in the compiler line in MATLAB (to enable double precision), which MATLAB script does not recognize in the current version, the flag should be permanently added to nvmexopts.bat file. The flag should be added to COMPFLAGS line in the file. Any of the following combinations of flags should work:
I have exact same problem, but even after adding flags to the COMPFLAGS line of the nvmexopts.bat, I still get error saying it does not recognize the flag or some other error. May I ask if it would be possible for you to post the modified nvmexopts.bat file? or may be just copy the contents of the file here? I am not a programming expert by any stretch of imagination So I might be doing something wrong.
The main problem I am looking at is pasted below. Just copying from other post that I made before.
"I am using CUDA code to speedup my matlab (version R2008a) computations and I am getting speedups of over 200. The trouble is that, I am using the code for an optimization technique where even though my CUDA results match within first 7 decimal places of accuracy for every element of my matrix (4 million entries), my code doesnt converge.
So, I moved to a double precision supporting card (GTX280) and now I am having troubles getting the GPU to do double precision computations. The kernel returns my matrices with garbage values. I browsed internet for solutions and some people talked about adding flags to the COMPFLAGS line of the nvmexopts.bat file but it didnt really work for me"
So Yeah, if would be wonderful if you can help me any way you can.