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:
tmpxft_000029e4_00000000-1.cpp
nvcc fatal : Host compiler targets unsupported OS.
Is there a way at all I can get this to run in windows?
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:
./search
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.