Drexel dragonThe Math ForumDonate to the Math Forum



Search All of the Math Forum:

Views expressed in these public forums are not endorsed by Drexel University or The Math Forum.


Math Forum » Discussions » Software » comp.soft-sys.math.mathematica

Topic: CUDAFunctionLoad error with windows 7 64 bits
Replies: 1   Last Post: Jul 28, 2013 1:43 AM

Advanced Search

Back to Topic List Back to Topic List Jump to Tree View Jump to Tree View   Messages: [ Previous | Next ]
gebe13@neuf.fr

Posts: 3
Registered: 6/24/13
CUDAFunctionLoad error with windows 7 64 bits
Posted: Jul 26, 2013 5:45 AM
  Click to see the message monospaced in plain text Plain Text   Click to reply to this topic Reply

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]




Point your RSS reader here for a feed of the latest messages in this topic.

[Privacy Policy] [Terms of Use]

© Drexel University 1994-2014. All Rights Reserved.
The Math Forum is a research and educational enterprise of the Drexel University School of Education.