help a beginner day with nvcc

Hi Everyone,

Jumping straight into this for the first time, no idea what I am doing so please stick with me…

I grabbed this .cpp file from github. The dev has a remark that simply says the following:
// compile with: nvcc -ccbin=g+±5 -O3 -std=c++11 -arch compute_60 -x cu search.cpp -o search

I ran it. Complained about not being able to find CL.exe, found CL.exe to be part of Visual Studio so I installed visual studio community and dumped one of the CL.exe from into the PATH.

Ran the command again, and get the following:
Failed to run C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Tools\MSVC\14.22.27905\bin\Hostx64\x64/g+±5 (The system cannot find the file specified.).

At this point I am going to assume that the person who was doing this was doing it in linux or with some other compiler? No idea what g++ is.

If I remove that from the command line and run this:
nvcc -O3 -std=c++11 -arch compute_60 -x cu seedsearch.cpp -o seedsearch.exe

I then get:
nvcc fatal : Host compiler targets unsupported OS.

Is there a way at all I can get this to run in windows?

That might be a problem, if you didn’t dump the right one.

Just to make sure, I went in and tried every single one of them. Same error. These are the ones I tried, MS doesn’t make this very clean do they…

C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Tools\MSVC\14.16.27023\bin\HostX64\x64
C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Tools\MSVC\14.16.27023\bin\HostX64\x86
C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Tools\MSVC\14.16.27023\bin\HostX86\x64
C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Tools\MSVC\14.16.27023\bin\HostX86\x86
C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Tools\MSVC\14.22.27905\bin\Hostx64\x64
C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Tools\MSVC\14.22.27905\bin\Hostx64\x86
C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Tools\MSVC\14.22.27905\bin\Hostx86\x64
C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Tools\MSVC\14.22.27905\bin\Hostx86\x86

I just ran up Ubuntu in a VM and installed nvcc, g++ and all the other required for both and ran the coder’s orig command. It produced a file; search

If I then do ./search it executes the file and I get:
seed 0, launch 0, time 0 ms
terminate called after throwing an instance of ‘thrust::system::system_error’
what(): device free failed: unknown error
Aborted (core dumped)

Maybe this is because this Ubuntu machine is a VM and doesn’t have access to the hardware properly.