ICC - Compiling with CUDA Build Rule

ICC - Compiling with CUDA Build Rule

Hi,
I have aCUDA project(milkyway) whichuse Build Rule files.
If I compile it with Visual Studio 2008 all works fine, no error occured.
If I now convert the project to use it with ICC, it will converted sucessful.
If I now compile with ICC I get following error:

1>------ Neues Erstellen gestartet: Projekt: milkyway, Konfiguration: Release Win32 ------

1>Deleting intermediate files and output files for project 'milkyway', configuration 'Release|Win32'.

1>Compiling with CUDA Build Rule... (Microsoft VC++ Environment)

1>D:\\I\\NVIDIA\\CUDA\\CUDA32_SDK\\v3.2\\\\bin\\nvcc.exe" -DDOUBLE_PRECISION -m32 -arch sm_13 -ccbin "C:\\Program Files\\Microsoft Visual Studio 9.0\\VC\\bin" -Xcompiler "/EHsc /W3 /nologo /O2 /Zi /MT " -I"D:\\I\\NVIDIA\\CUDA\\CUDA32_SDK\\C\\common\\inc" -I"E:\\I\\SC\\mw_gpu_v0.24\\milkyway\\bin\\\\boinc" -maxrregcount=[Value] --compile -o "Release\\evaluation_gpu6.cu.obj" "e:\\I\\SC\\mw_gpu_v0.24\\milkyway\\astronomy_gpu\\evaluation_gpu6.cu"

1>

1>nvc fatal : '[Value]': expected a number

1>Project milkyway : error: A tool returned an error code from "Compiling with CUDA Build Rule..."

1>Build log was saved at "file://E:\\I\\SC\\mw_gpu_v0.24\\milkyway\\bin\\Release\\BuildLog.htm"

1>milkyway - 1 error(s), 0 warning(s)

========== Alles neu erstellen: 0 erfolgreich, Fehler bei 1, 0 bersprungen ==========

if we compare both generated lineswe see:
MSC
1>Compiling with CUDA Build Rule...
1>"D:\\I\\NVIDIA\\CUDA\\CUDA32_SDK\\v3.2\\\\bin\\nvcc.exe" -DDOUBLE_PRECISION -m32 -arch sm_13 -ccbin "C:\\Program Files\\Microsoft Visual Studio 9.0\\VC\\bin" -Xcompiler "/EHsc /W3 /nologo /O2 /Zi /MT " -I"D:\\I\\NVIDIA\\CUDA\\CUDA32_SDK\\C\\common\\inc" -I"e:\\I\\SC\\mw_gpu_v0.24\\milkyway\\bin\\\\boinc" -maxrregcount=64 --compile -o "Release\\evaluation_gpu6.cu.obj" "e:\\I\\SC\\mw_gpu_v0.24\\milkyway\\astronomy_gpu\\evaluation_gpu6.cu"
ICC
1>Compiling with CUDA Build Rule... (Microsoft VC++ Environment)
1>D:\\I\\NVIDIA\\CUDA\\CUDA32_SDK\\v3.2\\\\bin\\nvcc.exe" -DDOUBLE_PRECISION -m32 -arch sm_13 -ccbin "C:\\Program Files\\Microsoft Visual Studio 9.0\\VC\\bin" -Xcompiler "/EHsc /W3 /nologo /O2 /Zi /MT " -I"D:\\I\\NVIDIA\\CUDA\\CUDA32_SDK\\C\\common\\inc" -I"E:\\I\\SC\\mw_gpu_v0.24\\milkyway\\bin\\\\boinc" -maxrregcount=[Value] --compile -o "Release\\evaluation_gpu6.cu.obj" "e:\\I\\SC\\mw_gpu_v0.24\\milkyway\\astronomy_gpu\\evaluation_gpu6.cu"
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
we are missing aquote at the beginning of the line 1>D:\\I\\NVIDIA..., and -maxrregcount get no value
I believe this is a error in the compiler partthat generate the line and insert the value.

Astropulse is open source, you can download and compile it with ICC to reproduce the error.

Your help is appreciated

heinz

15 posts / 0 new
Last post
For more complete information about compiler optimizations, see our Optimization Notice.

Heinz,

What version of Intel compiler do you use?
entering "icl" in the command line will report the compiler build version.

Thanks,
--mark

I looked up in Options --> Compilers
Intel C++ Compiler Professional for applications running on IA-32, Version 11.1 Package ID: w_cproc_p_11.1.067
SelectedCompiler:Intel C++ 11.1.067 [IA-32]
full protocol:

1>------ Neues Erstellen gestartet: Projekt: milkyway, Konfiguration: Release Win32 ------

1>Deleting intermediate files and output files for project 'milkyway', configuration 'Release|Win32'.

1>Compiling with CUDA Build Rule... (Microsoft VC++ Environment)

1>D:\I\NVIDIA\CUDA\CUDA32_SDK\v3.2\\bin\nvcc.exe" -DDOUBLE_PRECISION -m32 -arch sm_13 -ccbin "C:\Program Files\Microsoft Visual Studio 9.0\VC\bin" -Xcompiler "/EHsc /W3 /nologo /O2 /Zi /MT " -I"D:\I\NVIDIA\CUDA\CUDA32_SDK\C\common\inc" -I"E:\I\SC\mw_gpu_v0.24\milkyway\bin\\boinc" -maxrregcount=[Value] --compile -o "Release\evaluation_gpu6.cu.obj" "e:\I\SC\mw_gpu_v0.24\milkyway\astronomy_gpu\evaluation_gpu6.cu"

1>

1>nvc fatal : '[Value]': expected a number

1>Project milkyway : error: A tool returned an error code from "Compiling with CUDA Build Rule..."

1>Build log was saved at "file://E:\I\SC\mw_gpu_v0.24\milkyway\bin\Release\BuildLog.htm"

1>milkyway - 1 error(s), 0 warning(s)

========== Alles neu erstellen: 0 erfolgreich, Fehler bei 1, 0 bersprungen ==========

And when I convert the project back to use MS C++ it runs without this error above:

1>------ Neues Erstellen gestartet: Projekt: milkyway, Konfiguration: Release Win32 ------

1>Die Zwischen- und Ausgabedateien fr das Projekt "milkyway" mit der Konfiguration "Release|Win32" werden gelscht.

1>Compiling with CUDA Build Rule...

1>"D:\I\NVIDIA\CUDA\CUDA32_SDK\v3.2\\bin\nvcc.exe" -DDOUBLE_PRECISION -m32 -arch sm_13 -ccbin "C:\Program Files\Microsoft Visual Studio 9.0\VC\bin" -Xcompiler "/EHsc /W3 /nologo /O2 /Zi /MT " -I"D:\I\NVIDIA\CUDA\CUDA32_SDK\C\common\inc" -I"e:\I\SC\mw_gpu_v0.24\milkyway\bin\\boinc" -maxrregcount=64 --compile -o "Release\evaluation_gpu6.cu.obj" "e:\I\SC\mw_gpu_v0.24\milkyway\astronomy_gpu\evaluation_gpu6.cu"

1>evaluation_gpu6.cu

1>tmpxft_00001038_00000000-3_evaluation_gpu6.cudafe1.gpu

1>tmpxft_00001038_00000000-8_evaluation_gpu6.cudafe2.gpu

1>evaluation_gpu6.cu

1>tmpxft_00001038_00000000-3_evaluation_gpu6.cudafe1.cpp

1>tmpxft_00001038_00000000-14_evaluation_gpu6.ii

1>e:\i\sc\mw_gpu_v0.24\milkyway\astronomy_gpu\evaluation_gpu6_double.cu(60) : warning C4018: '<': Konflikt zwischen 'signed' und 'unsigned'

1>e:/I/SC/mw_gpu_v0.24/milkyway/astronomy_gpu/evaluation_gpu6.cu(206) : warning C4018: '<': Konflikt zwischen 'signed' und 'unsigned'

1>e:/I/SC/mw_gpu_v0.24/milkyway/astronomy_gpu/evaluation_gpu6.cu(209) : warning C4018: '<': Konflikt zwischen 'signed' und 'unsigned'

1>Kompilieren...

1>settings.c

1>matrix.c

etc...

etc..

1>Verknpfen...

1>Code wird generiert.

1>Codegenerierung ist abgeschlossen.

1>Das Manifest wird eingebettet...

1>Das Buildprotokoll wurde unter "file://e:\I\SC\mw_gpu_v0.24\milkyway\bin\Release\BuildLog.htm" gespeichert.

1>milkyway - 0 Fehler, 32 Warnung(en)

========== Alles neu erstellen: 1 erfolgreich, Fehler bei 0, 0 bersprungen ==========

heinz

Thanks for the update Heinz. I will look into this issue and get back to you.

--mark

Hi Mark,
if you want the source: http://milkyway.cs.rpi.edu/milkyway/download/code_release/
download the file:mw_gpu_v0.24.zip
That's what I used.

heinz

Thanks for the pointer Heinz. I downloaded the package and tried to build it with the Microsoft compiler in VS2008 by opening milway_vc90.sln but get errors about nvcc.exe not recognized. Do I need to install any additional tools in order to build the project?

--mark

This is pretty far off topic for this forum, but if you are building with a combination of Intel and Nvidia compilers, both must be installed and have their PATH environments set.

Thanks for the update Tim.Heinz saysthe project builds fine when he uses VS2008 but fails to build after the .sln file is converted to build with the Intel Compiler. Looks like there may be a compatibility issue, and that's why I'm trying to reproduce it.

--mark

Hi Mark,
thats exactly the point here, to show that conversion fails anyhow, and this is a matter of the Intel software.

@Tim, It is not the point to compile the project milkyway. But this project shows that Intels conversion software don't work properly and thats the point.

@Mark, you need to install CUDA SDK v3.2 and the developer driver.
download-->http://developer.nvidia.com/object/cuda_3_2_toolkit_rc.html

Hoping you have a machine with supported GeForce Nvidia GPU for CUDA.

heinz

Nowusing PS2011
compiler:Intel C++ Compiler 12.0.0.063 [IA-32]
Intel C++ Compiler for applications running on IA-32, version 12.0.0 Package ID: composer_2011.063
~~~~~~~~~~~~~~~~~~~~~~~~~~

1>Compiling with CUDA Build Rule... (Microsoft VC++ Environment)

1>"D:\I\NVIDIA\CUDA\CUDA32_SDK\v3.2\\bin\nvcc.exe" -DDOUBLE_PRECISION -m32 -arch sm_13 -ccbin "C:\Program Files\Microsoft Visual Studio 9.0\VC\bin" -Xcompiler "/EHsc /W3 /nologo /O2 /Zi /MT " -I"D:\I\NVIDIA\CUDA\CUDA32_SDK\C\common\inc" -I"D:\I\SC\mw_gpu_v0.24\milkyway\bin\\boinc" -maxrregcount=[Value] --compile -o "Release\evaluation_gpu6.cu.obj" "d:\I\SC\mw_gpu_v0.24\milkyway\astronomy_gpu\evaluation_gpu6.cu"

1>nvcc fatal : '[Value]': expected a number

We constate:
1.the quote at the beginning line is there --> 1>"D:\I\NVIDIA\CUDA\......
2.the value of maxrregcount will not overtaken
-->http://www.britta-d.de/images/2011/cuda_build_rule_maxrregcount.jpg
3. maybe a initialization error in the Build Rule file.

The big question is why does it not run after convert to PS2011
If I use MSC it works as it should and maxrregcount get its value

1>Compiling with CUDA Build Rule...

1>"D:\I\NVIDIA\CUDA\CUDA32_SDK\v3.2\\bin\nvcc.exe" -DDOUBLE_PRECISION -m32 -arch sm_13 -ccbin "C:\Program Files\Microsoft Visual Studio 9.0\VC\bin" -Xcompiler "/EHsc /W3 /nologo /O2 /Zi /MT " -I"D:\I\NVIDIA\CUDA\CUDA32_SDK\C\common\inc" -I"d:\I\SC\mw_gpu_v0.24\milkyway\bin\\boinc" -maxrregcount=64 --compile -o "Release\evaluation_gpu6.cu.obj" "d:\I\SC\mw_gpu_v0.24\milkyway\astronomy_gpu\evaluation_gpu6.cu"

1>evaluation_gpu6.cu

heinz

Hi,

i have under Linux compile the complete CUDA SDK 3.2 sample set with the Composer XE compiler ICC 12.0
no problems, i check the astropulse and see whats gone

Hi guys,

I found the answer at http://software.intel.com/en-us/forums/showthread.php?t=68567

the post is:
"I also faced this problem. Even more, exactly the same situation is with Cuda 3.0 Beta released a few days ago.

It seems to me that I found a very simple solution:

Open your "Cuda.Rules" file (default location is in "..NVIDIA GPU Computing SDKCcommonCuda.Rules") in any text editor,
find the line

Switch="-maxrregcount=[Value]"

and change it to

Switch="-maxrregcount=[value]"

Restart you IDE, and try to build the solution again.

It should do the trick!

Regards,
Michael"

Thanks Michael for the workaround, and thanks Heinz for trying out the Parallel Studio XE and giving us the status update.

Heinz, in the other thread Michael notedhttp://software.intel.com/en-us/forums/showthread.php?t=68567

you confirmed that Michael's workaround resolved the problem in your FFT project. Does the workaround with this project, too?

Thanks,
--mark

Hi Michael,
thanks for the trick.

I can confirm that it works for my FFT project.

CUDA 3.2 RC2 64Bit,

Projekt: MonteCarloMultiGPU, Konfiguration: Release Win32 ------

hung up with ptxas...too bad, some more research must be done.

short protocoll:

3>------ Neues Erstellen gestartet: Projekt: MonteCarloMultiGPU, Konfiguration: Release Win32 ------

3>Deleting intermediate files and output files for project 'MonteCarloMultiGPU', configuration 'Release|Win32'.

3>Compiling with CUDA Build Rule... (Microsoft VC++ Environment)

3>"C:\CUDA\v3.2\\bin\nvcc.exe" -G0 -gencode=arch=compute_13,code="sm_13,compute_13" -gencode=arch=compute_20,code="sm_20,compute_20" --machine 32 -ccbin "C:\Program Files (x86)\Microsoft Visual Studio 9.0\VC\bin" -D_NEXUS_DEBUG -g -Xcompiler "/EHsc /W3 /nologo /O2 /Zi /MT " -I"C:\CUDA\v3.2\/include" -I"./" -I"../../common/inc" -I"../../../shared/in" -I"C:\CUDA\v3.2\\include" -maxrregcount=32 --compile -o "Win32\Release/MonteCarlo_SM13.cu.obj" MonteCarlo_SM13.cu

3>MonteCarlo_SM13.cu

3>tmpxft_00000bd0_00000000-6_MonteCarlo_SM13.compute_13.cudafe1.gpu

3>tmpxft_00000bd0_00000000-10_MonteCarlo_SM13.compute_13.cudafe2.gpu

3>MonteCarlo_SM13.cu

3>tmpxft_00000bd0_00000000-3_MonteCarlo_SM13.compute_20.cudafe1.gpu

3>tmpxft_00000bd0_00000000-14_MonteCarlo_SM13.compute_20.cudafe2.gpu

3>MonteCarlo_SM13.cu

hung upstatus line shows:Z86
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
the other project"MonteCarlo" project hung up with same issue..ptxas...

The rest of the projects run under XE2011
========== Alles neu erstellen: 91 erfolgreich, Fehler bei 0, 2 bersprungen ==========

2 samples dont run with XE2011(MontCarlo,MonteCarloMultiGPU)

the big question is: why does it run with MS C++ and why not with IntelXE2011

Regards heinz

Leave a Comment

Please sign in to add a comment. Not a member? Join today