Cuda Sample 10.1 compliation error with Latest Visual Studio 2017

Hi,

I have updated my cuda version to 10.1 as well as visual studio 2017 to update 15.9.13 but the CUDA Samples 10.1 does not compile.

I got the following error message

165>C:/ProgramData/NVIDIA Corporation/CUDA Samples/v10.1/2_Graphics/simpleVulkan/vulkanCUDASinewave.cu(13): fatal error C1083: Cannot open include file: ‘GLFW/glfw3.h’: No such file or directory

There are other error messages but I did not put them here as they are pretty long but if needed, I can also put them here.

Does anyone have teh same issue or know how the resolve this issue ?

Here ismy environment:
Windows 10 64 bits
Visual Studio 2017 version 15.9.13
CUDA 10.1
GTX1080Ti

Thanks in advance,
Regards,
Ryo

GLFW is not a standard part of windows or visual studio, and it is not installed by CUDA.

You have to install it.

https://www.glfw.org/download.html

Unless you actually need the simpleVulkan project, you could alternatively just skip it.

Thank you for your reply Robert_Crovella.

Since I don’t need the simpleVulkan project, I just skiped it.

But now I have another error:

appdata\local\temp\tmpxft_00001f88_00000000-3_segmentationTree.fatbin.c(3150060): fatal error C1060: compiler is out of heap space

It’s weird beacause I have a pretty good config on my machine:
RAM: DDR4 48 GBytes
SSD: Samsung SSD 970 Pro 1TB (753 GB free)

Many thanks !

Error C1060 is an error thrown by Microsoft’s compiler. Here is what Microsoft has to say about it:

https://docs.microsoft.com/en-us/cpp/error-messages/compiler-errors-1/fatal-error-c1060

I have used MSVC for as long as it exists (decades) and I have never encountered this error message. Is 3150060 the line number where the error occurs in the source file? If so, that is a gigantic source file, which would explain the failed memory allocation. I would suggest reducing the size of that file.

Thanks njuffa.
I have read what Micorsoft but it did not help me.

Actually, the project where the error occurs is
C:\ProgramData\NVIDIA Corporation\CUDA Samples\v10.1\6_Advanced\segmentationTreeThrust\

but the error does not appear to be directly in the file “segmentationTree.cu”, the windows error display the following

  • Code : C1060
  • Description : compiler is out of heap space
  • Project : segmentationTreeThrust
  • File : c:\users\solidsnake\appdata\local\temp\tmpxft_000050a8_00000000-3_segmentationTree.fatbin.c - Line : 3150018

The file “segmentationTree.cu” has only 1067 lines of code.

Host code that is part of CUDA code is pre-processed before it gets sent to the host compiler (here: MSVC), which might explain a significant expansion. But I am not sure how that could result in 3 million lines of code in the intermediate source file passed to MSVC.

Since MSVS 2017 is a supported tool chain for CUDA 10.1, all examples shipping with CUDA have presumably been tested with that toolchain by NVIDIA. Maybe a recent incremental upgrade to CUDA or MSVS introduced a problem that was not there when CUDA 10 originally shipped, or something in your software setup is messed up.

If, after due-diligence checks, you conclude that the problem isn’t one of user or configuration error on your part, you may want to file a bug report with NVIDIA.

I found the problem. I did not realize that there is a single bin repository for all Visual Studio version, and when I switched from VS 2015 to VS 2017, I dit not perform a @clean before @Build Solution, but directly @Build solution.

After a clean, it works.

Thanks for your help.