Running and Verification
Procedure
- Use PuTTY to log in to the server as the root user.
- Verify the Thrust version.
- Go to the directory.
cd /path/to/thrust/include
- Create a version.cu file.
vim version.cu
- Press i to enter the insert mode and add the following content:
#include <thrust/version.h> #include <iostream> int main(void) { int major = THRUST_MAJOR_VERSION; int minor = THRUST_MINOR_VERSION; std::cout << "Thrust v" << major << "." << minor << std::endl; return 0; } - Press Esc, type :wq!, and press Enter to save the file and exit.
- Perform the verification.
nvcc version.cu -o version ./version
Information similar to the following is displayed:

- Go to the directory.
- Verify the built-in test case.
cd /path/to/thrust/thrust/build/ ctest
Information similar to the following is displayed:

Parent topic: Thrust 1.12 Porting Guide (Kylin V10)