1. Trouble with the game?
    Try the troubleshooter!

    Dismiss Notice
  2. Issues with the game?
    Check the Known Issues list before reporting!

    Dismiss Notice
  3. Before reporting issues or bugs, please check the up-to-date Bug Reporting Thread for the current version.
    0.30 Bug Reporting thread
    Solutions and more information may already be available.

Cuda/OpenCL

Discussion in 'Troubleshooting: Bugs, Questions and Support' started by rs200evo, Feb 16, 2013.

  1. rs200evo

    rs200evo
    Expand Collapse

    Joined:
    Feb 16, 2013
    Messages:
    2
    Hiya, quick question. As and when you tackle OpenCL or Cuda, how much of a ballpark performance increase do you think you could get over CPU cores? I'm thinking it might be much better bang for buck, to have a 2nd GPU card dedicated to the physics, rather than trying to max out expensive CPU cores. An amazing number of cores on mid range GPU's these days, which are generally highly suited to physics?
     
  2. Gouranga

    Gouranga
    Expand Collapse

    Joined:
    Aug 5, 2012
    Messages:
    67
    You can try to look up some papers about parallel computing of mass-spring systems like this. It's quite a challenge to transform your data to an array of independent bits. Take a beam, it connects a pair of nodes. But these nodes are connected to others with more beams. So you have several processors (each dealing with a single beam) that need access to the same memory address simultaneously. Not good. You can preprocess your data and put it back together at the end, but the overhead can easily defeat advantages of GPU computing. Also you could forget about additional features that need access to the node/beam data every physics frame, because you just can't copy everything from RAM to VRAM and back 2000 times per second. Etc...
    Moreover graphics like this needs some power too.
     
  3. rs200evo

    rs200evo
    Expand Collapse

    Joined:
    Feb 16, 2013
    Messages:
    2
    It was an extract from a IEEE paper that suggested you could get a decent performance boost.

    "specifically a highly realistic mass-spring model, and a GPU based technique, and analysis, that provides a nearly 80x speedup over serial execution and 20x speedup over CPU based parallel execution."

    I'll maybe just buy the paper.
     
  4. Gouranga

    Gouranga
    Expand Collapse

    Joined:
    Aug 5, 2012
    Messages:
    67
    The "specifically a highly realistic mass-spring model..." part suggest that the GPU would be busy for a long enough time with each data element that it will compensate for added overhead, like when you send the GPU some command which causes a stall.
     
  5. estama

    estama
    Expand Collapse
    Developer
    BeamNG Team

    Joined:
    Aug 7, 2012
    Messages:
    267
    Thanks for the nice conversation, and all the information.

    We also have some ideas about possible approaches to the OpenCL spring-mass systems subject, but until we try we won't know how they'll work.

    IMHO the most difficult thinks to tackle, is the bandwidth requirements of the data going back and forth between CPU and GPU, and orchestrating all the different processing without having lots and lots of waiting.
     
  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice