MathGroup Archive 2013

[Date Index] [Thread Index] [Author Index]

Search the Archive

CUDAFunctionLoad error with windows 7 64 bits

  • To: mathgroup at smc.vnet.net
  • Subject: [mg131454] CUDAFunctionLoad error with windows 7 64 bits
  • From: "gebe13 at neuf.fr" <gebe13 at neuf.fr>
  • Date: Fri, 26 Jul 2013 05:46:14 -0400 (EDT)
  • Delivered-to: l-mathgroup@mail-archive0.wolfram.com
  • Delivered-to: l-mathgroup@wolfram.com
  • Delivered-to: mathgroup-outx@smc.vnet.net
  • Delivered-to: mathgroup-newsendx@smc.vnet.net

Compile with Visual Studio 2010 Express, Microsoft Windows SDK for Windows 7 64 bits and .NET Framework 4

In[1]:= Needs["CUDALink`"]
Needs["CCompilerDriver`"]
CCompilers[]
CUDAQ[]

Out[3]= {{"Name" -> "Visual Studio",
  "Compiler" -> CCompilerDriver`VisualStudioCompiler`VisualStudioCompiler,
  "CompilerInstallation" ->
   "C:\\Program Files (x86)\\Microsoft Visual Studio 10.0",
  "CompilerName" -> Automatic}, {"Name" -> "NVIDIA CUDA Compiler",
  "Compiler" -> NVCCCompiler,
  "CompilerInstallation" ->
   "C:\\Users\\Gebe13\\AppData\\Roaming\\Mathematica\\Paclets\\Repository\\\
CUDAResources-Win64-9.0.2.0\\CUDAToolkit\\bin\\",
  "CompilerName" -> Automatic}}

Out[4]= True

section 1 CreateExecutable OK

In[5]:= greeter = CreateExecutable[StringJoin[
    "#include <stdio.h>\n",
    "int main(){\n",
    "  printf(\"Hello world.\\n\");\n",
    "}\n"],
   "hello", "ShellOutputFunction" -> Print];

During evaluation of In[5]:=
C:\Users\Gebe13\AppData\Roaming\Mathematica\SystemFiles\LibraryResources\Windows-x86-64\Working-pc1-5196-3844-1>call "C:\Program Files (x86)\MicrosoftVisual Studio 10.0\VC\vcvarsall.bat" amd64

Setting SDK environment relative to C:\Program Files\Microsoft SDKs\Windows\v7.1\.
Targeting Windows 7 x64 Debug

Microsoft (R) C/C++ Optimizing Compiler Version 16.00.40219.01 for x64
Copyright (C) Microsoft Corporation.  All rights reserved.

hello.c
Microsoft (R) Incremental Linker Version 10.00.40219.01
Copyright (C) Microsoft Corporation.  All rights reserved.

/out:hello.exe
user32.lib
kernel32.lib
gdi32.lib
"/LIBPATH:C:\Program Files\Wolfram Research\Mathematica\9.0\SystemFiles\Links\MathLink\DeveloperKit\Windows-x86-64\CompilerAdditions\mldev64\lib"
"/LIBPATH:C:\Program Files\Wolfram Research\Mathematica\9.0\SystemFiles\Libraries\Windows-x86-64"
/out:C:\Users\Gebe13\AppData\Roaming\Mathematica\SystemFiles\LibraryResources\Windows-x86-64\Working-pc1-5196-3844-1\hello.exe
hello.obj

In[6]:= Import["!\"" <> greeter <> "\"", "Text"]

Out[6]= "Hello world."

section 2 CUDAFunctionLoad error, why?

In[7]:= cudacode = "
  __global__ void addTwo(mint * in, mint * out, mint length) {
  	int index = threadIdx.x + blockIdx.x*blockDim.x;
  	if (index < length)
  		out[index] = in[index] + 2;
  }";

In[8]:= cudaFun = CUDAFunctionLoad[cudacode,
  "addTwo", {{_Integer, _, "Input"}, {_Integer, _, "Output"}, _Integer}, 256,
  "ShellOutputFunction" -> Print]

During evaluation of In[8]:= CUDAFunctionLoad::cmpf: The kernel compilation failed. Consider setting the option "ShellOutputFunction"->Print to display the compiler error message. >>

During evaluation of In[8]:=
C:\Users\Gebe13\AppData\Roaming\Mathematica\ApplicationData\CUDALink\BuildFolder\pc1-5196\Working-pc1-5196-3844-2>call "C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\vcvarsall.bat" amd64

Setting SDK environment relative to C:\Program Files\Microsoft SDKs\Windows\v7.1\.
Targeting Windows 7 x64 Debug

CUDAFunction-5687.cu
CUDAFunction-5687.cu
tmpxft_000013d8_00000000-5_CUDAFunction-5687.cudafe1.gpu
tmpxft_000013d8_00000000-11_CUDAFunction-5687.cudafe2.gpu
'cicc' n'est pas reconnu en tant que commande interne
ou externe, un programme ex=82cutable ou un fichier de commandes.

Out[8]= CUDAFunctionLoad["
 __global__ void addTwo(mint * in, mint * out, mint length) {
 	int index = threadIdx.x + blockIdx.x*blockDim.x;
 	if (index < length)
 		out[index] = in[index] + 2;
 }", "addTwo", {{_Integer, _, "Input"}, {_Integer, _,
   "Output"}, _Integer}, 256, "ShellOutputFunction" -> Print]



  • Prev by Date: Re: ListLinePlot Color each line differently
  • Next by Date: Re: "Complement" to the Risch Algorithm
  • Previous by thread: Re: ListLinePlot Color each line differently
  • Next by thread: Re: CUDAFunctionLoad error with windows 7 64 bits