While building the CUDA Multiforcer on CentOS Linux I ran into a couple of different errors. One of the errors is noted below in more detail along with how I was able to resolve the error. The problem ended up being that I didn’t build the common Nvidia SDK tools before proceeding with installing the CUDA Multiforcer which is compiled from within the Nvidia SDK directory.
A quick background of how things were set up on the CentOS server I was compiling the CUDA-Multiforcer on. The Nvidia drivers were installed in /opt cuda and then the Nvidia SDK was installed in /opt/cuda/sdk. The CUDA-Multiforcer source was unpackaged to the /opt/cuda/sdk/C/src directory so the below command was issued from the /opt/cuda/sdk/C/src/CUDA-Multiforcer-Release directory.
Error Compiling CUDA Multiforcer On CentOS Linux:
- [root@dev CUDA-Multiforcer-Release]# make
- /usr/bin/ld: cannot find -lcutil
- collect2: ld returned 1 exit status
- make: *** [../../bin/linux/release/CUDA-Multiforcer] Error 1
After reading a bit more I figured out that I had to compile some items from the Nvidia SDK install to be able to compile other items from within the SDK src directory. To do so simply issue the make command from the /opt/cuda/sdk/C/common directory but make sure to modify the path to where you have installed the Nvidia SDK.
Compile Nvidia SDK Common On CentOS Linux:
- [root@dev common]# make
- a - obj/release/bank_checker.cpp.o
- a - obj/release/cmd_arg_reader.cpp.o
- a - obj/release/cutil.cpp.o
- a - obj/release/stopwatch.cpp.o
- a - obj/release/stopwatch_linux.cpp.o
- a - obj/release/multithreading.cpp.o
After issuing the make command above I was able to go back into the CUDA-Multiforcer-Release directory already located in the /opt/cuda/sdk/C/src directory and compile the CUDA-Multiforcer without issue.