Welcome, Guest

Author Topic: Gravity Options: Computation Device  (Read 4854 times)

Prometech

  • *****
  • Posts: 119
  • Official Photographer of the Universe at large
Gravity Options: Computation Device
« on: December 11, 2014, 01:53:57 AM »
Under the Simulation>Gravity Dropdown, there is the "Compute Device" option.
Here I see listed my GPU and my CPU. When I choose the GPU as the computation device; Is the GPU only computing the gravity simulation, or is it computing all physics calculations in the sandbox?

I tend to get significantly better performance when I use my GPU as the computing device.

Camacha

  • *****
  • Posts: 60
Re: Gravity Options: Computation Device
« Reply #1 on: December 11, 2014, 09:32:27 AM »
Funny, I had not seen that option before. Though I can see a difference in the utilization graphs of CPU and GPU, the performance is actually the same. Only the fourth option, Regular CPU, makes a difference and slows everything to a crawl.

The Ventifact

  • *****
  • Posts: 213
  • I am the Creator...
Re: Gravity Options: Computation Device
« Reply #2 on: December 12, 2014, 04:41:20 PM »
I would recommend keeping the compute device set to GPU. That's what you want to use anyway. And to answer your question on whether or not it is just simulating gravity, or computing everything. Modern graphics cards have OpenCL in them, usually 3.0 and higher. And for games that use OpenCL (like US2), it is used for the gravity simulation, orbit projections, and collisions (that's what I heard), while everything else is rendered normally like any other game.

More than likely, OpenCL is gravity, orbits, and collisions, and then normal GPU computation takes care of texture rendering, and helping keep that frame rate up when doing crazy collisions or spawning many planets. I'm not an expert, but last I heard, that's why we have dedicated GPU's in the first place, to run games better and faster.

C7

  • Development Team
  • *****
  • Posts: 544
Re: Gravity Options: Computation Device
« Reply #3 on: December 15, 2014, 12:31:17 PM »
We automatically choose the best computation device, based on how it performs a series of testing calculations. In general, the automatic setting is best.

Some GPUs have very poor support for double precision math, which is what we use. In those cases the central processor will actually be faster.

If your cpu doesn't show up as an OpenCL compute device, you can install the AMD APP SDK, which supports a huge amount of processors, even non-amd ones.

http://developer.amd.com/tools-and-sdks/opencl-zone/amd-accelerated-parallel-processing-app-sdk/

The easiest thing to do is just test a few simulations and see what performs best on your hardware. It can get complicated when you factor in the GPU juggling OpenCL code while also trying to render a lot of content. Long story short, it depends on where the bottlenecks are at any given time for your system computationally.


Camacha

  • *****
  • Posts: 60
Re: Gravity Options: Computation Device
« Reply #4 on: December 15, 2014, 07:37:11 PM »
Some GPUs have very poor support for double precision math, which is what we use. In those cases the central processor will actually be faster.
Is it coincidence that my GPU and CPU score pretty much exactly the same in one of the harder scenarios (all possible dwarf planets)?

C7

  • Development Team
  • *****
  • Posts: 544
Re: Gravity Options: Computation Device
« Reply #5 on: December 16, 2014, 09:31:02 AM »
The gpu can take a bit to unload and load objects to its memory, so it tends to perform better when it's doesn't have to do this exchange as often. A CPU doesn't have that problem. So it's quite possible that the performance of the two devices will converge in performance depending on what's going on in the simulation. Every device is different too, and will tend to hit a performance limit in one area or another, be that memory, computation power or bus transfer speeds.

spa_sapping

  • *****
  • Posts: 67
Re: Gravity Options: Computation Device
« Reply #6 on: December 19, 2014, 04:31:33 PM »
Pretty weird, choosing CPU gives me an extra 10 fps here  :P