Reputation: 417
I am absolutely lost trying to build CUDA 7.5 samples on Ubuntu 14.04! Please bear in mind I am very unfamiliar with makefiles and the like.
Problem:
I change directory and run the 'deviceQuery' sample:
cd NVIDIA_CUDA-7.5_Samples/1_Utilities/deviceQuery
make
But the shell simply prints
make: Nothing to be done for `all'.
What I have tried:
I have tried freshly installing Ubuntu, adding CUDA to my path by editing .bashrc, and running the commands again. The same message is printed for every sample.
I have installed MPI:
sudo apt-get install libcr-dev mpich2 mpich2-doc
I've trawled through SO and all the issues with this message are related to the asker's code. I doubt my issue is the code, as it is stock from NVIDIA. I did try converting spaces to tabs in the makefiles, which changed nothing.
Because of the brevity of the message I can't seem to find any helpful comments on the internet; any answers would be greatly appreciated as I am genuinely stuck.
Thanks in advance!
Upvotes: 0
Views: 3585
Reputation: 152143
The CUDA Sample codes can be built by issuing a make
command, either in one of the sample directories or at the main directory.
make
in this case simply compiles the indicated code(s). It does not run any of the compiled codes. Furthermore, in typical usage, make
will not rebuild codes that are already built, unless you subsequently edit a file that the Makefile
tracks. If make
determines that all the codes are built, up-to-date, and don't need recompiling, it will issue the typical "nothing to be done..." message.
To run a code, after building it with make
, you can run the code directly as indicated in the installation guide, e.g.:
./deviceQuery
(if you are in the deviceQuery
directory, or else in the samples .../bin
directory)
I often suggest using make -k
instead of make
if you are building all the sample codes from the main directory. This will cause make
to continue even if one of the codes cannot be built, for example due to a missing dependency.
Upvotes: 2