Monday, February 24, 2014

Home / CUDA Compiler Error in Visual Studio 2012 Error MSB3721: The command "C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v5.5\bin\nvcc.exe"

CUDA Compiler Error in Visual Studio 2012 Error MSB3721: The command "C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v5.5\bin\nvcc.exe"

I am very new to CUDA and parallel programming.  I was getting all kinds of errors in the beginning due wrong DLL,  LIB folder, Working directory etc.  However, the following error message was little confusing and misleading:

C:\Program Files (x86)\MSBuild\Microsoft.Cpp\v4.0\V110\BuildCustomizations\CUDA 5.5.targets(592,9): error MSB3721: The command ""C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v5.5\bin\nvcc.exe" -gencode=arch=compute_10,code=\"sm_10,compute_10\" --use-local-env --cl-version 2012 -ccbin "C:\Program Files (x86)\Microsoft Visual Studio 11.0\VC\bin"  -IC:\OpenCV -IC:\OpenCV\build -IC:\OpenCV\build\include -IC:\OpenCV\build\include\opencv -IC:\OpenCV\build\x86 -IC:\OpenCV\build\x86\vc10 -IC:\OpenCV\build\x86\vc10\bin -IC:\OpenCV\build\x86\vc10\lib -I"C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v5.5\include" -I"C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v5.5\include"  -G   --keep-dir Debug -maxrregcount=0  --machine 32 --compile -cudart static  -g   -DWIN32 -D_DEBUG -D_CONSOLE -D_MBCS -Xcompiler "/EHsc /W3 /nologo /Od /Zi /RTC1 /MDd  " -o Debug\kernel.cu.obj "D:\Santhosh\Project\Cuda1-OLD\Cuda1\kernel.cu"" exited with code 2.

I found a lot of recommendation on the net about changing the compute type, hardware configuration  etc for resolving this issue.  In my case, I was missing the correct folder name in the Include Directories under VC++ Directories node.  Everything started working after I added the correct include directories. 

image

SS

Santhosh Sivarajan

Microsoft MVP · Identity & Cybersecurity Architect

Santhosh has 30+ years of hands-on enterprise experience in Identity and Access Management, Microsoft Entra ID, Active Directory, Microsoft 365 and Zero Trust architecture. He is the author of two books on Windows Server and security, and leads consulting, assessments and training at SAG Business Group.

1 comments:

For engineers wandering into the domain of equal registering with CUDA (Figure Bound together Gadget Design), utilizing the force of GPUs (Illustrations Handling Units) can open exceptional performance gains. In any case, coordinating CUDA into Visual Studio 2012 undertakings isn't generally a consistent cycle, frequently prompting baffling experiences with mistake messages like MSB3721. In this aide, we'll investigate how to handle the CUDA compiler blunder in Visual Studio 2012 and resolve the MSB3721 order issue successfully.

Figuring out the MSB3721 Blunder:

The MSB3721 blunder is a typical event in Visual Studio environments, particularly while working with CUDA projects. This blunder regularly shows a disappointment in the execution of a post-construct order, forestalling the effective gathering and execution of the CUDA code. At the point when experienced, the mistake message could incorporate extra insights concerning the particular order that fizzled and the related blunder code.

Investigating Steps:

Actually take a look at CUDA Tool compartment Establishment:
Start by guaranteeing that the CUDA Tool stash is appropriately introduced on your framework and arranged to work with Visual Studio 2012. Confirm that the CUDA Tool stash form is viable with your Visual Studio adaptation and that all essential parts are introduced accurately.

Audit Fabricate Result:
Analyze the form yield window in Visual Studio for more itemized mistake messages or admonitions that might give experiences into the reason for the MSB3721 blunder. Search for a particular orders that fizzled during the form interaction and explore the related mistake codes or messages.

Check Venture Settings:
Double-actually look at the task settings to guarantee that the CUDA compiler ways and choices are designed accurately. Give close consideration to any custom form steps or post-fabricate orders that might be setting off the MSB3721 mistake. Check that all ways are indicated accurately and that any important environment factors are set up appropriately.

Update Visual Studio and CUDA Toolbox:
Guarantee that you are involving the most recent updates for both Visual Studio 2012 and the CUDA Toolbox. Microsoft and NVIDIA regularly discharge updates and fixes to address similarity issues and bugs that might cause aggregation blunders or construct disappointments.

Looking for Help with CUDA Development:

For people experiencing diligent issues with CUDA development or confronting difficulties in coordinating CUDA into Visual Studio projects, looking for help from specialists or signing up for particular courses can give important bits of knowledge and direction. Platforms offering administrations like Take My Classes Online can associate students with experienced educators who can give customized help and backing custom-made to their particular necessities.

End:

The MSB3721 blunder in Visual Studio 2012 can be a disappointing deterrent for engineers working with CUDA projects. By following the investigating steps illustrated in this aide and utilizing assets like documentation, forums, and master help, engineers can overcome this mistake and guarantee smooth mix of CUDA into their Visual Studio projects. With perseverance, persistence, and a deliberate way to deal with critical thinking, handling the MSB3721 blunder can prompt fruitful CUDA development encounters and open the maximum capacity of GPU-sped up registering.

Post a Comment

Popular Posts
Workstation Trust Relationship Issue Issue: You receive the following error message, when you try to login to the domain.  The security database on the server does not have ... ADMT Service Account - Permission and Configuration The ADMT service account needs to have proper permission in source and target domains.  You don’t need to use 2 separate accounts.  You can ... My First Peek into Microsoft Exchange 2010 By Santhosh Sivarajan Before I really dive into Exchange 2010, I thought I would install and play with it first. I took some screen shots and notes during the ins... ObjectSID and Active Directory What is an objectSID in Active Directory? When a new object is created in Active Directory, Domain Controller assigns a unique value used ... AD Group Report - List Group Members in Active Directory–PowerShell Script Updated Script - http://portal.sivarajan.com/2011/10/search-ad-collect-local-admin-group.html Script #1 This script... Add Users to a Group–PowerShell Script Purpose – Add users to a group from an input file – PowerShell V2 Script.  Input file – Input file (Users.csv) contains samAccountName in... User Account Migration and Merging – Part I (ADMT) Part I - User Account Migration and Merging Using ADMT Part II - User Account Migration and Merging Using QMM pre-creating user account ... User Account Migration and Merging – Part II (Quest Migration Manager) Part I - User Account Migration and Merging Using ADMT Part II - User Account Migration and Merging Using QMM Pre-creating user account in... Delete Stale or Inactive Computer Accounts from Active Directory Here is an easy way to identify and delete inactive or stale computers in an Active Directory environment.  Using the dsquery command you c... Converting PowerShell (PS1) to EXE / Standalone Application As we know, there many applications available to convert a PowerShell file to a standalone executable file.  Based on my experience, PowerSh...