Sphere is a 3D discrete element method algorithm utilizing CUDA.
Sphere is licensed under the GNU General Public License, v.3. See license.txt for more information.
See the doc/
folder for general reference, by default available in the html and pdf formats.
Update (2013-03-13): Sphere has been updated to work with CUDA 5.0 or newer only.
- The build requirements are:
- A Nvidia CUDA-supported version of Linux or Mac OS X (see the CUDA toolkit release notes for more information)
- CMake, version 2.8 or higher
- A C/C++ compiler toolkit, e.g. the GNU Compiler Collection (GCC)
- The Nvidia CUDA toolkit and samples, version 5.0
- The runtime requirements are:
- A CUDA-enabled GPU with compute capability 2.0 or greater.
- A Nvidia CUDA-enabled GPU and device driver
- Optional tools, required/useful for simulation setup and data processing:
- Optional tools, required for building the documentation:
The best way to keep up to date with subsequent updates, bugfixes and development, is to use the Git version control system. To obtain a local copy, execute:
git clone https://github.com/anders-dc/sphere.git
Sphere is built using cmake, the platform-specific c/c++ compilers, and nvcc from the cuda toolkit.
If you plan to run sphere on a Kepler GPU, execute the following commands from the root directory:
cmake . && make
If you instead plan to execute it o a Fermi GPU, change set(GPU_GENERATION
1)
to set(GPU_GENERATION 0
in CMakeLists.txt.
In some cases the CMake FindCUDA module will have troubles locating the CUDA samples directory, and will complain about helper_math.h not being found.
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. Alternatively, copy helper_math.h from the CUDA sample subdirectory
common/inc/helper_math.h into the sphere src/ directory, and run cmake
and make again. Due to license restrictions, sphere cannot be distributed
with this file.
After a successfull installation, the sphere executable will be located in the root folder. To make sure that all components are working correctly, execute:
make test
To update your local version, type the following commands in the sphere root directory:
git pull && cmake . && make