| tUpdated to CUDA 5.0 - sphere - GPU-based 3D discrete element method algorithm … | |
| git clone git://src.adamsgaard.dk/sphere | |
| Log | |
| Files | |
| Refs | |
| LICENSE | |
| --- | |
| commit 66e97b013ce81fb63d710488f2fa06a7abcd2296 | |
| parent 84e2dae168abdce683e72a95ac54409ea55b3214 | |
| Author: Anders Damsgaard <[email protected]> | |
| Date: Wed, 13 Mar 2013 22:53:26 +0100 | |
| Updated to CUDA 5.0 | |
| Diffstat: | |
| M README.rst | 12 ++++++++---- | |
| M src/CMakeLists.txt | 3 ++- | |
| M src/device.cu | 3 ++- | |
| 3 files changed, 12 insertions(+), 6 deletions(-) | |
| --- | |
| diff --git a/README.rst b/README.rst | |
| t@@ -9,6 +9,8 @@ See license.txt for more information. | |
| See the ``doc/`` folder for general reference, by default available in the `ht… | |
| <doc/html/index.html>`_ and `pdf <doc/pdf/sphere.pdf>`_ formats. | |
| +*Update* (2013-03-13): Sphere has been updated to work with CUDA 5.0 *only*. | |
| + | |
| Requirements | |
| ------------ | |
| The build requirements are: | |
| t@@ -18,7 +20,7 @@ The build requirements are: | |
| * `CMake <http://cmake.org>`_, version 2.8 or higher | |
| * A C/C++ compiler toolkit, e.g. the `GNU Compiler Collection | |
| <http://gcc.gnu.org/>`_ (GCC) | |
| - * The `Nvidia CUDA toolkit and SDK <https://developer.nvidia.com/cuda-downlo… | |
| + * The `Nvidia CUDA toolkit and samples <https://developer.nvidia.com/cuda-do… | |
| The runtime requirements are: | |
| * A `CUDA-enabled GPU <http://www.nvidia.com/object/cuda_gpus.html>`_ | |
| t@@ -52,10 +54,12 @@ the root directory:: | |
| cmake . && make | |
| In some cases the CMake FindCUDA module will have troubles locating the | |
| -CUDA SDK directory, and will complain about `cutil_math.h` not being found. | |
| +CUDA samples directory, and will complain about `helper_math.h` not being | |
| +found. | |
| -In that case, modify the ``NVSDKCOMPUTE_ROOT`` environment variable in | |
| -`INSTALL.sh`, and execute it. | |
| +In that case, modify the ``CUDA_SDK_ROOT_DIR`` variable in `src/CMakeLists.txt` | |
| +to the path where you installed the CUDA samples, and run ``cmake . && make`` | |
| +again. | |
| After a successfull installation, the `sphere` executable will be located | |
| in the root folder. To make sure that all components are working correctly, | |
| diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt | |
| t@@ -1,8 +1,9 @@ | |
| # Link with libcutil (expected to be in ${CUDA_SDK_ROOT_DIR}/C/lib) | |
| #LINK_LIBRARIES("-L${CUDA_SDK_ROOT_DIR}/lib -lcutil") # For 32 bit syst… | |
| -LINK_LIBRARIES("-L${CUDA_SDK_ROOT_DIR}/lib -lcutil_x86_64") # For 64 bit syste… | |
| +#LINK_LIBRARIES("-L${CUDA_SDK_ROOT_DIR}/lib -lcutil_x86_64") # For 64 bit syst… | |
| # Ohter folders to include | |
| +SET(CUDA_SDK_ROOT_DIR "/usr/local/cuda-5.0/samples") | |
| INCLUDE_DIRECTORIES("${CUDA_SDK_ROOT_DIR}/common/inc") | |
| INCLUDE_DIRECTORIES("${CMAKE_BINARY_DIR}/src") | |
| diff --git a/src/device.cu b/src/device.cu | |
| t@@ -3,7 +3,8 @@ | |
| #include <string> | |
| #include <cstdio> | |
| #include <cuda.h> | |
| -#include <cutil_math.h> | |
| +//#include <cutil_math.h> | |
| +#include <helper_math.h> | |
| #include "vector_arithmetic.h" // for arbitrary prec. vectors | |
| //#include <vector_functions.h> // for single prec. vectors |