• Welcome to TechPowerUp Forums, Guest! Please check out our forum guidelines for info related to our community.

Looking for a real-time N-body simulation

Joined
Jan 13, 2015
Messages
135 (0.04/day)
Hey guys,

I'm looking for a real-time n-body simulation that takes advantage of a discrete GPU. I've seen YouTube videos of n-body simulations, but I'm looking for a program that I can download, change the parameters and run on my PC. Anyone?

Cheers,

grecinos
 
Joined
Mar 19, 2005
Messages
302 (0.04/day)
Location
Chicago
System Name Big Beast
Processor AMD Ryzen 7 5800x3D
Motherboard Asus Strix x570-I Gaming
Cooling NZXT AIO
Memory Patriot Viper 16GB 3666MHz
Video Card(s) AMD Radeon 7900XTX
Storage Lot's of it
Display(s) Samsung CHG70 27"
Case NZXT H1
Power Supply 850watt
Software Windows 11 Professional x64
Nvidia has some samples and one of them I believe is an n-body simulation using opencl. Check them out and if im wrong maybe something else you will find in there that is interesting. https://developer.nvidia.com/opencl

edit: just found it, it's at the bottom of the page.
 
Joined
Jan 13, 2015
Messages
135 (0.04/day)
Thanks for the link. That looks very close to what I'm looking for. I downloaded the "OpenCL N-Body Physics Simulation". I tried to compile the sample code with MS Visual Studio 12 but am getting an error code.

Their compiled sample crashes with some error message as well:

!!! Error # -11 (CL_BUILD_PROGRAM_FAILURE) at line 297 , in file .\src\oclBodyS
ystemOpenclLaunch.cpp !!!

Exiting...

It came with a readme doc, I'll have to do some investigating in their documentation. If you have any suggestions, that'd be great.
 
Joined
Mar 19, 2005
Messages
302 (0.04/day)
Location
Chicago
System Name Big Beast
Processor AMD Ryzen 7 5800x3D
Motherboard Asus Strix x570-I Gaming
Cooling NZXT AIO
Memory Patriot Viper 16GB 3666MHz
Video Card(s) AMD Radeon 7900XTX
Storage Lot's of it
Display(s) Samsung CHG70 27"
Case NZXT H1
Power Supply 850watt
Software Windows 11 Professional x64
There is an executable in ...\NVIDIA GPU Computing SDK\OpenCL\bin\win64\Release where you can run it with these parameters:
Command line switches:
--qatest Check correctness of GPU execution and measure performance)
--noprompt Quit simulation automatically after a brief period
--n=<numbodies> Specify # of bodies to simulate (default = 7680)
--double Use double precision floating point values for simulation
--p=<workgroup X dim> Specify X dimension of workgroup (default = 256)
--q=<workgroup Y dim> Specify Y dimension of workgroup (default = 1)

I'm getting cl_device_not_found juist running ti though :x (it may be my use windows 10 drivers on 8.1)
I'll try compiling it also.


Edit: I just started typing graphics vendors (intel and amd) with n-body and also came up with this: https://software.intel.com/en-us/articles/opencl-cross-devices-nbody-simulation-sample check it out, that one may not give you as much trouble when compiling. AMD probably has an n-body sample too in one of there sdks. look around if the Nvidia one becomes a pain in the butt.
 
Last edited:
Joined
Jan 13, 2015
Messages
135 (0.04/day)
Excellent. Thanks for the update. I'll check it out tomorrow. FYI, I'm on a Windows 7-64 bit PC.
 
Joined
Jan 13, 2015
Messages
135 (0.04/day)
I downloaded Intel's n-body simulation as per your link provided. I think it's closer to successfully compiling than Nvidia's code. But, it's giving me an error message. It's complaining about a file called "cl_platform.h". It wasn't included in the intel_ocl_nbody_multidevice_win.zip file. Nvidia's simulation does have that file. I tried copying it to the appropriate directory, but no dice, it couldn't find the file. It probably wouldn't have compiled, but I was surprised that it couldn't even find the include.
 
Joined
May 3, 2014
Messages
965 (0.27/day)
System Name Sham Pc
Processor i5-2500k @ 4.33
Motherboard INTEL DZ77SL 50K
Cooling 2 bay res. "2L of fluid in loop" 1x480 2x360
Memory 16gb 4x4 kingstone 1600 hyper x fury black
Video Card(s) hfa2 gtx 780 @ 1306/1768 (xspc bloc)
Storage 1tb wd red 120gb kingston on the way os, 1.5Tb wd black, 3tb random WD rebrand
Display(s) cibox something or other 23" 1080p " 23 inch downstairs. 52 inch plasma downstairs 15" tft kitchen
Case 900D
Audio Device(s) on board
Power Supply xion gaming seriese 1000W (non modular) 80+ bronze
Software windows 10 pro x64
remember to check windows hasnt blocked any files because they came from a nother computer..
that is annoying at times when it has you trouble shooting things that dont need trouble shooting.
 
Joined
Dec 14, 2005
Messages
1,765 (0.26/day)
Location
Calverton, New York
System Name Current rig
Processor i9-9900k
Motherboard Z390 Aorus Xtreme
Cooling Corsair h150i Pro
Memory 32GB Ripjaws V 3200
Video Card(s) Asus 2090 ti Strix
Storage Samsung 970 Pro 1tb
Display(s) Alienware aw3418dw
Case Thermaltake View 91
Power Supply seasonic 1kw
Top