determening registers shared memory with nvmex

i am trying to determine the number of registers used per thread in each kernel to use the occupancy calculator.
To compile my code i am using nvmex.
but the --ptxas-options=-v or the -cubin option somehow dont seem to work for nvmex.
Are there other compileroption i should use?
I only added the --ptxas-options=-v or the -cubin option to the compflags of the nvmexopts.bat
Does anyone know what to do?

best Regards

I still haven`t figured out how to use the occupancy_calculator with nvmex.
Is there somebody who could give me an idiotproof advice how to do it?

Best Regards

Why don’t you compile the kernel function with NVCC and compile/link the rest with C/MEX stuff?

thanks for the quick reply

if i compile it with

nvcc --ptxas-options=-v -c

an error occurs

nvcc fatal: cannot find compiler ‘cl.exe’ in path

there was already mentioned in the form that cl.exe would be the linker,

so how do i compile without linking?

nvcc --compile will compile your .cu files to object files without proceeding to the linking stage

You’ve already done that with -c option. The problem here is that NVCC cannot locate cl.exe (MS compiler/linker). You need to add C:\Program Files\Microsoft Visual Studio 9.0\VC\bin into your PATH. Note that NVCC is just a wrapper of cl.exe, so cl.exe is always required in all cases. Probably running ‘mex -setup’ then choosing the MS compiler is enough.

This is not an issue when you use NVMEX, probably NVMEX is a wrapper of another compiler (e.g. LCC).