Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.soft-sys.math.mathematica > #5621 > unrolled thread

CUDA XCompiler

Started byGrischika <Grischika@mail.ru>
First post2011-10-13 07:50 +0000
Last post2011-11-11 10:09 +0000
Articles 2 — 2 participants

Back to article view | Back to comp.soft-sys.math.mathematica


Contents

  CUDA XCompiler Grischika <Grischika@mail.ru> - 2011-10-13 07:50 +0000
    Re: CUDA XCompiler DmitryG <einschlag@gmail.com> - 2011-11-11 10:09 +0000

#5621 — CUDA XCompiler

FromGrischika <Grischika@mail.ru>
Date2011-10-13 07:50 +0000
SubjectCUDA XCompiler
Message-ID<j76592$2c6$1@smc.vnet.net>
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?

[toc] | [next] | [standalone]


#6385

FromDmitryG <einschlag@gmail.com>
Date2011-11-11 10:09 +0000
Message-ID<j9is98$8iq$1@smc.vnet.net>
In reply to#5621
On Oct 13, 2:50 am, Grischika <Grisch...@mail.ru> wrote:
> 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" -> "NVIDIACUDA 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?

I have tested this piece of code on my system (also Microsoft Visual
Studio 10) and I've got the error message

CUDAFunctionLoad::cmpf: The kernel compilation failed. Consider
setting the option "ShellOutputFunction"->Print to display the
compiler error message. >>

I cannot say more to this because I am not a C programmer.

I wanted to use simple CUDA commands like CUDADot but they are slower
the regular commands, so I do not yet see the point in GPU computing
with Mathematica.

Best,

Dmitry

[toc] | [prev] | [standalone]


Back to top | Article view | comp.soft-sys.math.mathematica


csiph-web