nvcc not doing anything

Hi All,

Hoping that someone has some advice.

I have a .cu file - hw5.cu . I have nvcc installed (nvcc – version works and gives info). Whenever I try a command such as nvcc hw5.cu , I enter in the command and no error shows up, but no output file is created either. nothing happens. I tried various variations such as nvcc -o here hw5.cu , nvcc hw5.cu -o here , nvcc -o here.exe hw5.cu , nvcc -cuda hw5.cu , nvcc --cuda hw5.cu . But with all of these variations, the same thing always happens. No output file is created, and I get no response/error either in the terminal. nothing happens. If I can get some info on how to resolve this issue and compile my .cu file that would be greatly appreciated

I can’t recall ever encountering such a case. What version CUDA and what version of Microsoft Visual Studio do you have installed?

What output do you get when you run

nvcc --help

What output do you get when you run

nvcc -v -o hw5.exe hw5.cu

Hi, I tried the nvcc -v -o hw5.exe hw5.cu

nvcc -v -o hw5.exe hw5ThreadCuda.cu # C:/Program Files (x86)/Microsoft Visual Studio/2019/Community/VC/Tools/MSVC/14.24.28314/bin/Hostx86/x86/…/…/…/…/…/…/…/VC/Auxili
ary/Build/vcvars64.bat

C:\learning c++\thisOne>call “C:/Program Files (x86)/Microsoft Visual Studio/2019/Community/VC/Tools/MSVC/14.24.28314/bin/Hostx86/x86/…/
…/…/…/…/…/…/VC/Auxiliary/Build/vcvars64.bat”


** Visual Studio 2019 Developer Command Prompt v16.4.4
** Copyright © 2019 Microsoft Corporation


[vcvarsall.bat] Environment initialized for: ‘x64’
# ALLUSERSPROFILE=C:\ProgramData # APPDATA=C:\Users\karti\AppData\Roaming
# CommandPromptType=Native # COMMONPROGRAMFILES=C:\Program Files\Common Files
# COMPUTERNAME=DESKTOP-TH9AM2O # COMSPEC=C:\WINDOWS\system32\cmd.exe
# CUDA_PATH=C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v10.2 # CUDA_PATH_V10_2=C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v10.2
# CommonProgramFiles(x86)=C:\Program Files (x86)\Common Files # CommonProgramW6432=C:\Program Files\Common Files
# DevEnvDir=C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\Common7\IDE\ # DriverData=C:\Windows\System32\Drivers\DriverData
# EXECIGNORE=*.dll # ExtensionSdkDir=C:\Program Files (x86)\Microsoft SDKs\Windows Kits\10\ExtensionSDKs
# Framework40Version=v4.0 # FrameworkDir=C:\Windows\Microsoft.NET\Framework64
# FrameworkDir64=C:\Windows\Microsoft.NET\Framework64\ # FrameworkVersion=v4.0.30319
# FrameworkVersion64=v4.0.30319 # HOME=C:\cygwin64\home\karti
# HOMEDRIVE=C: # HOMEPATH=\Users\karti
# HOSTNAME=DESKTOP-TH9AM2O # INCLUDE=C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Tools\MSVC\14.24.28314\ATLMFC\include;C:\Program Files (x86)
Microsoft Visual Studio\2019\Community\VC\Tools\MSVC\14.24.28314\include;C:\Program Files (x86)\Windows Kits\NETFXSDK\4.8\include\um;C:\P
rogram Files (x86)\Windows Kits\10\include\10.0.18362.0\ucrt;C:\Program Files (x86)\Windows Kits\10\include\10.0.18362.0\shared;C:\Progra
m Files (x86)\Windows Kits\10\include\10.0.18362.0\um;C:\Program Files (x86)\Windows Kits\10\include\10.0.18362.0\winrt;C:\Program Files
(x86)\Windows Kits\10\include\10.0.18362.0\cppwinrt
# INFOPATH=/usr/local/info:/usr/share/info:/usr/info # LANG=en_US.UTF-8
# LIB=C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Tools\MSVC\14.24.28314\ATLMFC\lib\x64;C:\Program Files (x86)\Micr osoft Visual Studio\2019\Community\VC\Tools\MSVC\14.24.28314\lib\x64;C:\Program Files (x86)\Windows Kits\NETFXSDK\4.8\lib\um\x64;C:\Progr am Files (x86)\Windows Kits\10\lib\10.0.18362.0\ucrt\x64;C:\Program Files (x86)\Windows Kits\10\lib\10.0.18362.0\um\x64; # LIBPATH=C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Tools\MSVC\14.24.28314\ATLMFC\lib\x64;C:\Program Files (x86)
Microsoft Visual Studio\2019\Community\VC\Tools\MSVC\14.24.28314\lib\x64;C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC
\Tools\MSVC\14.24.28314\lib\x86\store\references;C:\Program Files (x86)\Windows Kits\10\UnionMetadata\10.0.18362.0;C:\Program Files (x86)
\Windows Kits\10\References\10.0.18362.0;C:\Windows\Microsoft.NET\Framework64\v4.0.30319;
# LOCALAPPDATA=C:\Users\karti\AppData\Local # LOGONSERVER=\DESKTOP-TH9AM2O
# MINTTY_SHORTCUT=/cygdrive/c/ProgramData/Microsoft/Windows/Start Menu/Programs/Cygwin/Cygwin64 Terminal.lnk # NETFXSDKDir=C:\Program Files (x86)\Windows Kits\NETFXSDK\4.8
# NUMBER_OF_PROCESSORS=12 # NVCUDASAMPLES10_2_ROOT=C:\ProgramData\NVIDIA Corporation\CUDA Samples\v10.2
# NVCUDASAMPLES_ROOT=C:\ProgramData\NVIDIA Corporation\CUDA Samples\v10.2 # NVTOOLSEXT_PATH=C:\Program Files\NVIDIA Corporation\NvToolsExt
# OLDPWD=/cygdrive/c/learning c++ # ORIGINAL_PATH=/cygdrive/c/Program Files/NVIDIA GPU Computing Toolkit/CUDA/v10.2/bin:/cygdrive/c/Program Files/NVIDIA GPU Computing Too
lkit/CUDA/v10.2/libnvvp:/cygdrive/c/Program Files (x86)/Common Files/Oracle/Java/javapath:/cygdrive/c/Program Files (x86)/Intel/Intel®
Management Engine Components/iCLS:/cygdrive/c/Program Files/Intel/Intel® Management Engine Components/iCLS:/cygdrive/c/Windows/system32
:/cygdrive/c/Windows:/cygdrive/c/Windows/System32/Wbem:/cygdrive/c/Windows/System32/WindowsPowerShell/v1.0:/cygdrive/c/Windows/System32/O
penSSH:/cygdrive/c/Program Files (x86)/Intel/Intel® Management Engine Components/DAL:/cygdrive/c/Program Files/Intel/Intel® Managemen
t Engine Components/DAL:/cygdrive/c/Program Files (x86)/Intel/Intel® Management Engine Components/IPT:/cygdrive/c/Program Files/Intel/I
ntel® Management Engine Components/IPT:/cygdrive/c/Program Files (x86)/NVIDIA Corporation/PhysX/Common:/cygdrive/c/Program Files/Git/cm
d:/cygdrive/c/Program Files/NVIDIA Corporation/Nsight Compute 2019.5.0:/cygdrive/c/Program Files/NVIDIA Corporation/NVIDIA NvDLISR:/cygdr
ive/c/WINDOWS/system32:/cygdrive/c/WINDOWS:/cygdrive/c/WINDOWS/System32/Wbem:/cygdrive/c/WINDOWS/System32/WindowsPowerShell/v1.0:/cygdriv
e/c/WINDOWS/System32/OpenSSH:/cygdrive/c/Program Files/dotnet:/cygdrive/c/Program Files/Microsoft SQL Server/130/Tools/Binn:/cygdrive/c/P
rogram Files/Microsoft SQL Server/Client SDK/ODBC/170/Tools/Binn:/cygdrive/c/Users/karti/AppData/Local/Microsoft/WindowsApps:/cygdrive/c/
Program Files (x86)/Microsoft Visual Studio/2019/Community/VC/Tools/MSVC/14.24.28314/bin/Hostx86/x86
# OS=Windows_NT # OneDrive=C:\Users\karti\OneDrive
# OneDriveConsumer=C:\Users\karti\OneDrive # PATH=C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Tools\MSVC\14.24.28314\bin\HostX64\x64;C:\Program Files (x86)\Mi
crosoft Visual Studio\2019\Community\Common7\IDE\VC\VCPackages;C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\Common7\IDE
CommonExtensions\Microsoft\TestWindow;C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\Common7\IDE\CommonExtensions\Microsof
t\TeamFoundation\Team Explorer;C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\MSBuild\Current\bin\Roslyn;C:\Program Files
(x86)\Microsoft Visual Studio\2019\Community\Team Tools\Performance Tools\x64;C:\Program Files (x86)\Microsoft Visual Studio\2019\Communi
ty\Team Tools\Performance Tools;C:\Program Files (x86)\Microsoft Visual Studio\Shared\Common\VSPerfCollectionTools\vs2019\x64;C:\Program
Files (x86)\Microsoft Visual Studio\Shared\Common\VSPerfCollectionTools\vs2019;C:\Program Files (x86)\Microsoft SDKs\Windows\v10.0A\bin
\NETFX 4.8 Tools\x64;C:\Program Files (x86)\Windows Kits\10\bin\10.0.18362.0\x64;C:\Program Files (x86)\Windows Kits\10\bin\x64;C:\Progr
am Files (x86)\Microsoft Visual Studio\2019\Community\MSBuild\Current\Bin;C:\Windows\Microsoft.NET\Framework64\v4.0.30319;C:\Program Fil
es (x86)\Microsoft Visual Studio\2019\Community\Common7\IDE;C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\Common7\Tools
;C:\cygwin64\usr\local\bin;C:\cygwin64\bin;C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v10.2\bin;C:\Program Files\NVIDIA GPU Compu
ting Toolkit\CUDA\v10.2\libnvvp;C:\Program Files (x86)\Common Files\Oracle\Java\javapath;C:\Program Files (x86)\Intel\Intel® Management
Engine Components\iCLS;C:\Program Files\Intel\Intel® Management Engine Components\iCLS;C:\Windows\system32;C:\Windows;C:\Windows\Syste
m32\Wbem;C:\Windows\System32\WindowsPowerShell\v1.0;C:\Windows\System32\OpenSSH;C:\Program Files (x86)\Intel\Intel® Management Engine C
omponents\DAL;C:\Program Files\Intel\Intel® Management Engine Components\DAL;C:\Program Files (x86)\Intel\Intel® Management Engine Co
mponents\IPT;C:\Program Files\Intel\Intel® Management Engine Components\IPT;C:\Program Files (x86)\NVIDIA Corporation\PhysX\Common;C:\P
rogram Files\Git\cmd;C:\Program Files\NVIDIA Corporation\Nsight Compute 2019.5.0;C:\Program Files\NVIDIA Corporation\NVIDIA NvDLISR;C:\WI
NDOWS\system32;C:\WINDOWS;C:\WINDOWS\System32\Wbem;C:\WINDOWS\System32\WindowsPowerShell\v1.0;C:\WINDOWS\System32\OpenSSH;C:\Program File
s\dotnet;C:\Program Files\Microsoft SQL Server\130\Tools\Binn;C:\Program Files\Microsoft SQL Server\Client SDK\ODBC\170\Tools\Binn;C:\Use
rs\karti\AppData\Local\Microsoft\WindowsApps;C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Tools\MSVC\14.24.28314\bin
Hostx86\x86;C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\Common7\IDE\CommonExtensions\Microsoft\CMake\CMake\bin;C:\Progr
am Files (x86)\Microsoft Visual Studio\2019\Community\Common7\IDE\CommonExtensions\Microsoft\CMake\Ninja
# PATHEXT=.COM;.EXE;.BAT;.CMD;.VBS;.VBE;.JS;.JSE;.WSF;.WSH;.MSC # Platform=x64
# PRINTER=OneNote # PROCESSOR_ARCHITECTURE=AMD64
# PROCESSOR_IDENTIFIER=Intel64 Family 6 Model 158 Stepping 10, GenuineIntel # PROCESSOR_LEVEL=6
# PROCESSOR_REVISION=9e0a # PROFILEREAD=true
# PROGRAMFILES=C:\Program Files # PROMPT=$P$G
# PS1=\[\e]0;\w\a\]\n\[\e[32m\]\u@\h \[\e[33m\]\w\[\e[0m\]\n\$ # PSModulePath=C:\Program Files\WindowsPowerShell\Modules;C:\WINDOWS\system32\WindowsPowerShell\v1.0\Modules
# PUBLIC=C:\Users\Public # PWD=/cygdrive/c/learning c++/thisOne
# ProgramData=C:\ProgramData # ProgramFiles(x86)=C:\Program Files (x86)
# ProgramW6432=C:\Program Files # SESSIONNAME=Console
# SHELL=/bin/bash # SHLVL=1
# SYSTEMDRIVE=C: # SYSTEMROOT=C:\WINDOWS
# TERM=xterm # TZ=America/New_York
# UCRTVersion=10.0.18362.0 # UniversalCRTSdkDir=C:\Program Files (x86)\Windows Kits\10
# USER=karti # USERDOMAIN=DESKTOP-TH9AM2O
# USERDOMAIN_ROAMINGPROFILE=DESKTOP-TH9AM2O # USERNAME=karti
# USERPROFILE=C:\Users\karti # VCIDEInstallDir=C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\Common7\IDE\VC
# VCINSTALLDIR=C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\ # VCToolsInstallDir=C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Tools\MSVC\14.24.28314
# VCToolsRedistDir=C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Redist\MSVC\14.24.28127\ # VCToolsVersion=14.24.28314
# VisualStudioVersion=16.0 # VS160COMNTOOLS=C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\Common7\Tools
# VSCMD_ARG_app_plat=Desktop # VSCMD_ARG_HOST_ARCH=x64
# VSCMD_ARG_TGT_ARCH=x64 # VSCMD_VER=16.4.4
# VSINSTALLDIR=C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\ # WINDIR=C:\WINDOWS
# WindowsLibPath=C:\Program Files (x86)\Windows Kits\10\UnionMetadata\10.0.18362.0;C:\Program Files (x86)\Windows Kits\10\References\10. 0.18362.0 # WindowsSdkBinPath=C:\Program Files (x86)\Windows Kits\10\bin
# WindowsSdkDir=C:\Program Files (x86)\Windows Kits\10\ # WindowsSDKLibVersion=10.0.18362.0
# WindowsSdkVerBinPath=C:\Program Files (x86)\Windows Kits\10\bin\10.0.18362.0\ # WindowsSDKVersion=10.0.18362.0
# WindowsSDK_ExecutablePath_x64=C:\Program Files (x86)\Microsoft SDKs\Windows\v10.0A\bin\NETFX 4.8 Tools\x64\ # WindowsSDK_ExecutablePath_x86=C:\Program Files (x86)\Microsoft SDKs\Windows\v10.0A\bin\NETFX 4.8 Tools
# _=/cygdrive/c/Program Files/NVIDIA GPU Computing Toolkit/CUDA/v10.2/bin/nvcc # cl=C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Tools\MSVC\14.24.28314\bin\Hostx86\x86
# __DOTNET_ADD_64BIT=1 # __DOTNET_PREFERRED_BITNESS=64
#$ __VSCMD_PREINIT_PATH=C:\cygwin64\usr\local\bin;C:\cygwin64\bin;C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v10.2\bin;C:\Program
Files\NVIDIA GPU Computing Toolkit\CUDA\v10.2\libnvvp;C:\Program Files (x86)\Common Files\Oracle\Java\javapath;C:\Program Files (x86)\In
tel\Intel® Management Engine Components\iCLS;C:\Program Files\Intel\Intel® Management Engine Components\iCLS;C:\Windows\system32;C:\W
indows;C:\Windows\System32\Wbem;C:\Windows\System32\WindowsPowerShell\v1.0;C:\Windows\System32\OpenSSH;C:\Program Files (x86)\Intel\Intel
® Management Engine Components\DAL;C:\Program Files\Intel\Intel® Management Engine Components\DAL;C:\Program Files (x86)\Intel\Intel(
R) Management Engine Components\IPT;C:\Program Files\Intel\Intel® Management Engine Components\IPT;C:\Program Files (x86)\NVIDIA Corpor
ation\PhysX\Common;C:\Program Files\Git\cmd;C:\Program Files\NVIDIA Corporation\Nsight Compute 2019.5.0;C:\Program Files\NVIDIA Corporati
on\NVIDIA NvDLISR;C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS\System32\Wbem;C:\WINDOWS\System32\WindowsPowerShell\v1.0;C:\WINDOWS\System32
OpenSSH;C:\Program Files\dotnet;C:\Program Files\Microsoft SQL Server\130\Tools\Binn;C:\Program Files\Microsoft SQL Server\Client SDK\ODB
C\170\Tools\Binn;C:\Users\karti\AppData\Local\Microsoft\WindowsApps;C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Tool
s\MSVC\14.24.28314\bin\Hostx86\x86

So what is installed appears to be CUDA 10.2 and MSVC 2019 Community Edition? I am actually not sure that CUDA supports MSVC 2019 Community Edition, and the CUDA Installation Guide for Windows (https://docs.nvidia.com/cuda/cuda-installation-guide-microsoft-windows/index.html) doesn’t specifically mention it, which I take to mean: not supported. Maybe other forum participants have further insights.

From comparing your log output with a log of a successful build on my Windows machine it is clear that processing stopped just before the Microsoft compiler is supposed to kick off for the first time.