Skip to content

Commit c37d44c

Browse files
Update gpu Barnes-Hut code with latest version from Martin Burtscher.
1 parent 8df4cd2 commit c37d44c

4 files changed

Lines changed: 1021 additions & 1125 deletions

File tree

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,5 @@
1+
# This app has to be built with -O1 to avoid a compiler bug.
2+
set(CMAKE_CUDA_FLAGS_RELEASE "-O1 -DNDEBUG")
3+
set(CMAKE_CUDA_FLAGS_RELWITHDEBINFO "-O1 -g -DNDEBUG")
14
app_scientific_gpu(bh barneshut)
2-
add_test_gpu(barneshut rmat15 rmat15.out bh 50000 2 0)
5+
add_test(NAME barneshut COMMAND barneshut-gpu 50000 2 0)
Lines changed: 30 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -1,33 +1,37 @@
1-
CUDA BarnesHut v3.1: Simulation of the gravitational forces
2-
in a galactic cluster using the Barnes-Hut n-body algorithm
1+
L-BH v4.5: Simulation of the gravitational forces in a star cluster using
2+
the Barnes-Hut n-body algorithm.
33

4-
Copyright (c) 2013, Texas State University-San Marcos. All rights reserved.
4+
Copyright (c) 2010-2020 Texas State University. All rights reserved.
55

6-
Redistribution and use in source and binary forms, with or without modification,
7-
are permitted for academic, research, experimental, or personal use provided that
8-
the following conditions are met:
6+
Redistribution and use in source and binary forms, with or without
7+
modification, are permitted provided that the following conditions are met:
98

10-
* Redistributions of source code must retain the above copyright notice,
11-
this list of conditions and the following disclaimer.
12-
* Redistributions in binary form must reproduce the above copyright notice,
13-
this list of conditions and the following disclaimer in the documentation
14-
and/or other materials provided with the distribution.
15-
* Neither the name of Texas State University-San Marcos nor the names of its
16-
contributors may be used to endorse or promote products derived from this
17-
software without specific prior written permission.
18-
19-
For all other uses, please contact the Office for Commercialization and Industry
20-
Relations at Texas State University-San Marcos <http://www.txstate.edu/ocir/>.
9+
* Redistributions of source code must retain the above copyright
10+
notice, this list of conditions and the following disclaimer.
11+
* Redistributions in binary form must reproduce the above copyright
12+
notice, this list of conditions and the following disclaimer in the
13+
documentation and/or other materials provided with the distribution.
14+
* Neither the name of Texas State University nor the names of its
15+
contributors may be used to endorse or promote products derived from
16+
this software without specific prior written permission.
2117

2218
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
2319
ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
24-
WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED
25-
IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,
26-
INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
27-
BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
28-
DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
29-
LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE
30-
OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
31-
OF THE POSSIBILITY OF SUCH DAMAGE.
20+
WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
21+
DISCLAIMED. IN NO EVENT SHALL TEXAS STATE UNIVERSITY BE LIABLE FOR ANY
22+
DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
23+
(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
24+
LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
25+
ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
26+
(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
27+
SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
28+
29+
Authors: Martin Burtscher and Sahar Azimi
30+
31+
URL: The latest version of this code is available at
32+
https://userweb.cs.txstate.edu/~burtscher/research/ECL-BH/.
3233

33-
Author: Martin Burtscher <burtscher@txstate.edu>
34+
Publication: This work is described in detail in the following paper.
35+
Martin Burtscher and Keshav Pingali. An Efficient CUDA Implementation of the
36+
Tree-based Barnes Hut n-Body Algorithm. Chapter 6 in GPU Computing Gems
37+
Emerald Edition, pp. 75-92. January 2011.

0 commit comments

Comments
 (0)