Instructions for installation of this software (includes profiling, linting, building, and unit testing):
- Ensure you have an NVIDIA based GPU (mandatory!)
- Install the CUDA toolkit and runtime (refer to link for download/installation procedure)
- Install Valgrind (profiling, memory checks, memory leaks etc.)
$ sudo apt install valgrind
- Install Cmake/Makefile (build tools)
$ sudo apt install cmake
- Install Google Test (unit testing) - See this tutorial for tutorial on using Google Test library
$ sudo apt install libgtest-dev $ cd /usr/src/gtest $ sudo cmake CMakeLists.txt $ sudo make $ sudo cp *.a /usr/lib
- Install Cppcheck (linting)
$ sudo apt install cppcheck
- Configure the code for usage (modify gridder config)
- Create local execution folder
$ mkdir build && cd build
- Build gridder project (from project folder)
$ cmake .. -DCMAKE_BUILD_TYPE=Release && make
- Important: set -CDMAKE_BUILD_TYPE=Debug if planning to run Valgrind. Debug mode disables compiler optimizations, which is required for Valgrind to perform an optimal analysis.
To perform memory checking, memory leak analysis, and profiling using Valgrind, execute the following (assumes you are in the appropriate build folder (see step 5 above):
$ valgrind --leak-check=yes -v ./gridder
To execute linting, execute the following commands (assumes you are in the appropriate source code folder):
$ cppcheck --enable=all main.cpp
$ cppcheck --enable=all gridder.cu
To execute the gridder (once configured and built), execute the following command (also assumes appropriate build folder):
$ ./gridder