Welcome to MilkyWay@home

N-Body OpenCL

Message boards : Application Code Discussion : N-Body OpenCL
Message board moderation

To post messages, you must log in.

AuthorMessage
Xterelle

Send message
Joined: 7 Aug 22
Posts: 12
Credit: 20,671,368
RAC: 9,516
Message 77715 - Posted: 18 Nov 2025, 8:52:57 UTC

nbody 0.80:
- Added OpenCL version
- Add progress reporting if Ncurses is available
- "Exact" criterion is now an actual exact implementation. To get
the old "Exact" behaviour, use theta = 0.0 with the BH86 criterion

- Histogram no longer needed to generate histogram
- Histogram is now CSV
- Histogram now have comments (#) and ignores blank lines
- Histogram now includes lambda
- Fix possibility of checkpoints breaking for simulations running the same directory
- Fix not using SSE2 intrinsics in dSFMT
- Can now return a Lua function from makePotential() as external potential.
Must take 3 numbers as x, y, z and return acceleration as a_x, a_y, a_z

- Add --static-draw option to display body output file to visualizer
- Slightly reduced memory usage of cells
- Fixed annoying creation of empty output files at beginning
- Last checkpoint is now deleted by default on completion
- Added 'make bench' simple benchmark
- Setting NBODY_FLAGS environment variable will pass extra flags to tests/benchmark
- Add more user documentation using texinfo.
- Add --match-histogram argument
- Add new likelihood options

The question is, why isn't there a video card app yet? If there's a line like | `DNBODY_OPENCL` | ON, OFF | Build with OpenCL libraries to support running N-Body on GPUs. |
And
cmake -DCMAKE_BUILD_TYPE=Release -DNBODY_DEV_OPTIONS=ON -DNBODY_GL=OFF -DBOINC_APPLICATION=ON -DSEPARATION=OFF -DDOUBLEPREC=ON -DNBODY_OPENMP=ON -DNBODY_OPENCL=OFF $PathToMilkyWayAtHomeClientDirectory/
ID: 77715 · Rating: 0 · rate: Rate + / Rate - Report as offensive     Reply Quote
Xterelle

Send message
Joined: 7 Aug 22
Posts: 12
Credit: 20,671,368
RAC: 9,516
Message 77716 - Posted: 18 Nov 2025, 9:57:47 UTC - in response to Message 77715.  
Last modified: 18 Nov 2025, 9:58:39 UTC

N-Body CMAKE Flags
Flag Values Description
DCMAKE_BUILD_TYPE Debug, Release, RelWithDebInfo, MinSizeRel Set to Release for a normal build. Other options include debugging information.
DNBODY_DEV_OPTIONS ON, OFF Set to ON for developer options. OFF to use client-side parameter files.
DNBODY_GL ON, OFF Builds the visualizer. Requires additional OpenGL packages.
DBOINC_APPLICATION ON, OFF Cross-compile with BOINC.
DSEPARATION ON, OFF Option for building the Separation code. Defaults to OFF.
DDOUBLEPREC ON, OFF Enable double-precision floating point calculation.
DNBODY_OPENMP ON, OFF Build the algorithm single-threaded (OFF) or multithreaded (ON).
DNBODY_OPENCL ON, OFF Build with OpenCL libraries to support running N-Body on GPUs.
ID: 77716 · Rating: 0 · rate: Rate + / Rate - Report as offensive     Reply Quote
Link
Avatar

Send message
Joined: 19 Jul 10
Posts: 789
Credit: 20,601,273
RAC: 10,851
Message 77717 - Posted: 18 Nov 2025, 12:02:32 UTC - in response to Message 77715.  

The question is, why isn't there a video card app yet?
The answer is buried somewhere in the News section of the forums. In short: it's possible to build it (or at least it was in the past), but it was very slow, so they didn't release it. Also they don't have the time to maintain GPU builds.
ID: 77717 · Rating: 0 · rate: Rate + / Rate - Report as offensive     Reply Quote
Xterelle

Send message
Joined: 7 Aug 22
Posts: 12
Credit: 20,671,368
RAC: 9,516
Message 77718 - Posted: 18 Nov 2025, 14:43:18 UTC - in response to Message 77717.  

It's sad because I have a fast enough video card nvidia 4070 ti compared to tasks, for example, fgrp 5 Einstein on my video card, it comes out much faster there.
ID: 77718 · Rating: 0 · rate: Rate + / Rate - Report as offensive     Reply Quote
alanb1951

Send message
Joined: 16 Mar 10
Posts: 218
Credit: 110,448,290
RAC: 3,321
Message 77725 - Posted: 19 Nov 2025, 20:14:11 UTC - in response to Message 77718.  

It's sad because I have a fast enough video card nvidia 4070 ti compared to tasks, for example, fgrp 5 Einstein on my video card, it comes out much faster there.
Applications that do lots of array or matrix arithmetic without many condition tests other than loop control are the best candidates for GPU running. That includes techniques such as Fast Fourier Transforms for signal processing (Einstein, for instance!)

An application with lots of condition testing within each iteration may not lend itself to efficient computation -- I suspect N-Body has that "problem"...

Cheers - Al.
ID: 77725 · Rating: 0 · rate: Rate + / Rate - Report as offensive     Reply Quote

Message boards : Application Code Discussion : N-Body OpenCL

©2025 Astroinformatics Group