OpenCL Solar System

Discussion in 'GPGPU Technology & Programming' started by moozoo, May 18, 2013.

  1. fellix

    fellix Hey, You!
    Veteran

    Joined:
    Dec 4, 2004
    Messages:
    3,338
    Location:
    Varna, Bulgaria
    [​IMG]
    That would be very useful. A bunch of dedicated CLI options would suffice, too. ;)
     
  2. moozoo

    Newcomer

    Joined:
    Jul 23, 2010
    Messages:
    105
    I have my new system :) , I now have a HD 7770 :( . Anyway I believe this will let me do everything I need. I have done some initial profiling but it will take me awhile to get up to speed on it. On the flip side I'm going to lose the system with the nvidia card ( it's my ex's) so I'm going to have the reverse problem lol.
     
  3. Lightman

    Veteran

    Joined:
    Jun 9, 2008
    Messages:
    1,566
    Location:
    Torquay, UK
    Good to hear you've got GCN now and a bit of a shame you loosing green camp card. Still, I'm curious how much extra performance you will find in GCN :)
     
  4. moozoo

    Newcomer

    Joined:
    Jul 23, 2010
    Messages:
    105
    Released V1.05
    Added a acceleration kernel that uses local memory to cache gravitational bodies
    Removed a lot of unnecessary synchronization.
    Added Stereoscopic support (AMD + HDMI monitor) The i,I keys adjust the eye separation.
    Added 2560 and 65536 bodies options.
    Uploaded the roguestar.bin file

    Cross vendor gl sharing seems broken now. i.e. amd gl with amd opencl and intel gl with intel opencl (cpu) works, but amd gl with intel opencl (cpu) doesn't work.

    I can no longer test Nvidia opencl. If anyone could test its not broken, I would appreciate it.
     
  5. fellix

    fellix Hey, You!
    Veteran

    Joined:
    Dec 4, 2004
    Messages:
    3,338
    Location:
    Varna, Bulgaria
    :sad:

    [​IMG]

    * GTX580
    * 314.22 WHQL
    * Win8 64-bit
     
  6. Lightman

    Veteran

    Joined:
    Jun 9, 2008
    Messages:
    1,566
    Location:
    Torquay, UK
    Great job!
    It's about 10% faster than previously on GCN :smile:
     
  7. lanek

    Veteran

    Joined:
    Mar 7, 2012
    Messages:
    2,132
    Location:
    Switzerland
    I have not really got much time for test, but seems no problem with 7970's. CAT 13.6 b2.

    ( only usage stay low, but i had CFX enabled, and ofc , windowed only load one gpu. )
     
  8. moozoo

    Newcomer

    Joined:
    Jul 23, 2010
    Messages:
    105
    Thanks fellix, sorry about that, could you try the Release binary at
    http://moozoo.dyndns.org/OpenCLSolarSystem/

    Lightman, From what I can tell the acceleration kernel is the bottle neck and its at 100% ALU Busy... So I don't think I can optimise the kernels without sacrificing accuracy which I don't want to do. The version that caches positions in local memory runs slower than the one that doesn't.

    At the moment I'm copying old values to new. I can avoid that by just switching pointers. That would cut out the buffer copies.

    When AMD release their next cards (October?) I'm going to implement multiple card support.

    About Stereoscopic support, the driver switches the monitor to stereoscopic mode when it sees me requesting stereo in the window's pixel format. I don't explicitly control it. When the program exits, the driver doesn't switch the monitor out of stereoscopic mode. Hence you end up with your monitor stuck in stereoscopic mode.
    One workaround is to run a program that does know how to switch the monitor (via DirectX) and then exit it. I use Tridef's Multimedia player.
    Note I've only tested stereoscopic mode under windows 8. Under Windows 7 the application might need to go into full screen mode, which my program currently does not do.
     
  9. moozoo

    Newcomer

    Joined:
    Jul 23, 2010
    Messages:
    105
    Well I released 1.051 that should work with nvidia
     
  10. fellix

    fellix Hey, You!
    Veteran

    Joined:
    Dec 4, 2004
    Messages:
    3,338
    Location:
    Varna, Bulgaria
    :no:
     
  11. moozoo

    Newcomer

    Joined:
    Jul 23, 2010
    Messages:
    105
    If you upgrade your opencl icd to 1.2 it should work.

    The easiest way to do this is to install the "CPU Only driver with OpenCL 1.2 features" from the download section of the intel opencl sdk site
    http://software.intel.com/en-us/vcsource/tools/opencl-sdk-2013

    This will add CPU based opencl support as well.
    (you can remove that by removing references to the intel dll under
    HKEY_LOCAL_MACHINE\SOFTWARE\Khronos\OpenCL\Vendors in the registry)

    If you don't want to install anything then instead of running the installer open it in 7-zip. Navigate down to intel_sdk_for_ocl_applications_2013_runtime_setup\OpenCL\x86 and extract the opencl.dll to the same directory as Opencl solar system.
    (I believe this should work).
     
  12. moozoo

    Newcomer

    Joined:
    Jul 23, 2010
    Messages:
    105
    v1.06

    I've uploaded a new version.
    It would be great if people could test it for me.

    If you have a nvidia card try copying the OpenCl.dll from the opencl-icd directory to the same directory as the the program.

    I've included a program that downloads the latest asteroid data to a .slf file that can then be imported into the opencl solar system program.

    Debug Logging calls where being included in the Release build.
    I have removed this. This should increase the fps.
     
  13. Davros

    Legend

    Joined:
    Jun 7, 2004
    Messages:
    12,791
    v1.06 ?
    Works for me
     
  14. moozoo

    Newcomer

    Joined:
    Jul 23, 2010
    Messages:
    105
    V1.061

    Added asteroid colouring based on type.
    Also added close encounter detection and the option to add Oort Cloud objects (when making .slf files using OrbToSlf)
    Added source to OrbToSlf on sourceforge.

    http://sourceforge.net/projects/openclsolarsyst/
     
  15. Lightman

    Veteran

    Joined:
    Jun 9, 2008
    Messages:
    1,566
    Location:
    Torquay, UK
    Works and looks great now!
    Latest Cat. 13.12 and R9 290X
     
  16. homerdog

    homerdog donator of the year
    Legend Veteran Subscriber

    Joined:
    Jul 25, 2008
    Messages:
    5,531
    Location:
    still camping with a mauler
    I tired this about a week ago and forgot to post back. Doesn't work for me at all... GTX670 with a modern driver, though probably not the latest. I'll try again this evening with the newest driver.
     
  17. moozoo

    Newcomer

    Joined:
    Jul 23, 2010
    Messages:
    105
    Unfortunately I don't have access to a Nvidia card to test.

    OpenCL operating system support has two parts.
    A generic loader (ICD) and a number of vendor specific implementation dll's.
    A later version of the loader can still load earlier vendor specific implementations.

    Nvidia only supply a loader (OpenCL ICD) OpenCL.dll that is version 1.1.
    The 32 bit one is in C:\Windows\SysWOW64 and the 64 bit one is in C:\Windows\System32

    My code is using 1.2 (as per AMD and Intel)
    I have included a OpenCL.dll that is version 1.2 in the opencl-icd directory. Copy it to the same directory as the OpenCLSolarSystem.exe
    I believe it will be used instead of the system one.

    If you decide you want to upgrade the system OpenCL.dll and have a recent Intel CPU you can install the Intel CPU OpenCL runtime. I believe Intel include it in their display drivers. If you don't have that installed you can install the CPU only runtime by
    1) Open the web page http://software.intel.com/en-us/vcsource/tools/opencl-sdk
    2) find the paragraph that talks about 1st and 2nd generation Intel core processors
    3) download via the relevant 64bit or 32bit link in the paragraph text.
    If you are on a 64 bit OS you want the 64bit one, even though my program is 32 bit

    I believe the OpenCL 1.2 icd is fully backwards compatible with the Nvidia 1.1 one. Its meant to be.
    The OpenCL 1.2 ICD OpenCL.dll will still call the nvidia opencl 1.1 implementation dlls.
     
  18. pcchen

    Moderator Veteran

    Joined:
    Feb 6, 2002
    Messages:
    2,645
    Location:
    Taiwan
    After installing Intel's OpenCL driver, it runs fine on my machine with a GeForce 670.
     
  19. moozoo

    Newcomer

    Joined:
    Jul 23, 2010
    Messages:
    105
    Thanks pcchen for testing it.

    I might have access to a machine with a nvidia card soon (only at GT 610 but still)

    On an unrelated issue, the code compiles and runs fine on Ubuntu. So I may have a Ubuntu version out soon.
     
  20. Lightman

    Veteran

    Joined:
    Jun 9, 2008
    Messages:
    1,566
    Location:
    Torquay, UK
    Good to know Linux is getting your program!

    I also was wondering if you're expecting any efficiency/performance uplift from HSA (specifically Kaveri chip) for your algorithms once OpenCL 2 tools supporting required extensions become available?
     

Share This Page

Loading...