CUDA XCompiler
- To: mathgroup at smc.vnet.net
 - Subject: [mg122091] CUDA XCompiler
 - From: Grischika <Grischika at mail.ru>
 - Date: Thu, 13 Oct 2011 12:45:17 -0400 (EDT)
 - Delivered-to: l-mathgroup@mail-archive0.wolfram.com
 
Hello!
This is initialization code of CUDA:
Needs["CUDALink`"]
Needs["CCompilerDriver`"]
In[]:=CUDAQ[]
Out:=True
 The command  CUDADot[RandomInteger[1, {5, 5}], RandomInteger[1, {5,
5}]] works as it should.
But evaluation of
fun = CUDAFunctionLoad["__global__ void zero(int * in, int length) {
      int index = threadIdx.x + blockIdx.x * blockDim.x;
  	if (index < length)
  	   in[index] = 0;
    }", "zero", {{_Integer}, _Integer}, {10}]
gives the error message:
CUDAFunctionLoad::invxpth: The "XCompilerInstallation" option set to
$Failed is not valid. "XCompilerInstallation" must be a string
pointing to the C compiler directory.
So it means that something wrong with C Compiler. All compilations
like Compile[... ,CompilationTarget->"C"]  work.
Here information about the compiler . Microsoft Visual Studio 10.0
Ultimate.
In[]:=CCompilers[]
Out[]:={{"Name" -> "Visual Studio",
  "Compiler" ->
   CCompilerDriver`VisualStudioCompiler`VisualStudioCompiler,
  "CompilerInstallation" ->
   "C:\\Program Files\\Microsoft Visual Studio 10.0",
  "CompilerName" -> Automatic}, {"Name" -> "NVIDIA CUDA Compiler",
  "Compiler" -> NVCCCompiler,
  "CompilerInstallation" ->
   "C:\\Documents and Settings\\Grigory\\Application \
Data\\Mathematica\\Paclets\\Repository\\CUDAResources-Win-8.0.0.7\\\
CUDAToolkit\\bin\\", "CompilerName" -> Automatic}}
In[]:=CUDACCompilers[]
Out[]:={}
How to fix this compilation problem?