The problem is that the compiler generates CUDA code for compute capability 1.0.
Once GTX460 implements compute capability 2.1... it fails :(
Well... I patched the compiler and it is working now, for me.
The problem is that the fix is a hack at the moment, I mean: it is not a proper solution.
I hope X10 team will be addressing the definitive fix soon.
The fix I did is described below:
1. Edit file
x10-trunk/x10.compiler/src/x10cuda/visit/CUDACodeGenerator.java
2. Replace method postCompile by the method below.
The changes I've done are
highlighted.
public static boolean postCompile(X10CPPCompilerOptions options,
Compiler compiler, ErrorQueue eq) {
if (options.post_compiler != null && !options.output_stdout) {
Collection<String> compilationUnits = options.compilationUnits();
String[] nvccCmd = { "nvcc", "--cubin", "-Xptxas", "-v",
"-arch=sm_21", // support compute capability 2.1
"-I" + CXXCommandBuilder.X10_DIST + "/include", null };
for (String f : compilationUnits) {
if (f.endsWith(".cu")) {
nvccCmd[nvccCmd.length-1] = f;
if (!X10CPPTranslator.doPostCompile(options, eq, compilationUnits, nvccCmd, true)) {
eq.enqueue(ErrorInfo.WARNING,
"Found @CUDA annotation, but not compiling for GPU because nvcc could not be run (check your $PATH).");
return true;
}
}
}
}
return true;
}3. Rebuild X10
4. Rebuid the examples
Have fun :)
Richard Gomes
http://tinyurl.com/frgomes