nvcc 3.1 compiler error

Hi,

I get the following error during compilation:

nvcc error : ‘cudafe’ died due to signal 11 (Invalid memory reference)

nvcc --version output:

nvcc: NVIDIA ® Cuda compiler driver

Copyright © 2005-2010 NVIDIA Corporation

Built on Mon_Jun__7_18:10:28_PDT_2010

Cuda compilation tools, release 3.1, V0.2.1221

The code is a dummy kernel (just to test the compilation)

#include <iostream>

#include <vector>

#include <QFile>

#include <QTextStream>

using namespace std;

__global__ static void cudaTest()

{

}

int main(int argc, char** argv)

{

	cudaTest<<<1,1>>>();

	cudaThreadExit();

}

The same makefile/code, works fine in nvcc 2.3.

I’ve looking for some solutions but I didn’t find it.

Can anyone help me?

Thanks

You probably want to avoid including the standard template library into .cu files. It is quite possible that it either contains code which nvcc can’t parse, or which conflicts with something internal to the CUDA runtime library.

In fact the standard template library works fine included in the .cu file. The problem is Qt classes which causes nvcc to crash.

By removing Qt includes it compiles right but I get thousand of warnings like:

/usr/local/cuda/bin//…/include/device_functions.h:329: warning: unused parameter ‘a’

/usr/local/cuda/bin//…/include/texture_fetch_functions.h:1750: warning: unused parameter ‘y’

and so on

Which it has no sense because the code for the first warning is:

static inline device int mulhi(int a, int B)

{

return __mulhi(a, B);

}

Any idea?

With CC 1.3 device functions are always inlined and with CC 2.0 compiler decides when to do so. But you can add noinline or forceinline instead. See Appendix E.1 in the Programmin Guide on p. 139.

Edit: Do you call this function from within the same file?