Thursday, 11 September 2008

Bug Fixes

While working on my much talked about acceleration structure I have kept noticing artifacts and distortions as soon as it is applied to the scene. This has had me rather stumped for two days as the code / raw output seemed correct. Finally it occured to me to check my scene code and in particular my viewport code.

As it turns out my viewport code has been flawed since I converted from purely triangles to include spheres. Here is a new screenshot showing the improvement in the image quality now that its been fixed. You will also notice that you can clearly see the spiral reflected in the sphere as well as the red light that is behind the viewer (have to look closely for this one). The image is scaled down from the original size in order to save a bit of bandwith - lots of traffic from nvidia site :) 

 

[caption id="attachment_274" align="alignnone" width="403" caption="After bug fix of viewport code"]After bug fix of viewport code[/caption]

I am yet to fix the downloadable version (downloads section) but will do so tonight.

12 comments:

  1. If you should need a mirror for video/executables etc., I could host them on my student space at my university.

    Looks very nice btw. Keep up the good work ;)

    ReplyDelete
  2. I tried the example again on my Macbook Pro (GeForce 8600M) in bootcamp. First using the original bootcamp drivers (167, didn't work to well with any cuda demos) and then the newest ones (177). It crashed the same way as my desktop computer with both of those drivers.

    Are you sure you're not compiling in debug mode or something?

    I also noticed that the Cuda Toolkit needs to be installed. If not it will complain about missing cudart.dll and glut32.dll

    If you get 24fps for some fairly nice scenes you should make a scene demo ;)

    ReplyDelete
  3. Thanks for the bandwidth offer. I check with my hosting provider today and I don't get 2 GB a month as I thought but rather 2TB :) So bandwidth isnt an issue it seems.
    Expect a page with some decent screenshots soon.

    As to the crash - still not sure why... Did you extract the whole zip file? It does need cutil32.dll and glew32.dll in order to run. It is definately compiled in release mode and I've tested on both sets of drivers... I do use windows XP - not sure if that will make a big difference.

    It is rather difficult to test all the different combinations of drivers / cards / os's. I think releasing a commercial cuda app could become a testing nightmare.

    Good idea on the demo - now if I could just get my new algorithm to actually work...

    ReplyDelete
  4. Hi,
    I've tried the cudart on my Quadro NVS 290 board (2x8 processors, G86) and it crashes without any message. Have you any idea way ? (to few processors?). In order to start the program, I've copied the glut32.dll from CUDA SDK to cudart directory.
    I have XP on a Q6600. ForceWare version: 177.35.
    When I will go to tomorrow to university, I will test the program on a GTX280

    Dan

    ReplyDelete
  5. I tried the cudarc on GTX280 and it is not working. The glu32.dll that I have copied in the cudarc directory is from CUDA SDK 2.0. Can you add to the zip file the glu32.dll?
    Way are two exe file ?

    Dan

    ReplyDelete
  6. Hi,
    Thanks for the comments and your testing.
    I usually just run the .exe from the release folder in the nvidia subdirectory: NVIDIA CUDA SDK\bin\win32\Release

    So after having a look in there I see two more files that I have not included glut32.dll and cudpp32.dll. I do use glut and glew in the app as well as some opengl extensions - for the rendering to screen. Nothing fancy though and its the same/similar type of code used in the nvidia demos.

    The two .exe's in the zip are just two different versions. The 0.02 being the later one with more colours on the spheres etc.

    I have just uploaded an ammended zip file with these dll's added.

    For those of you getting crashes - do you get any text in the command window at all? There just be a little initialization log. Possibly it crashes too fast to see?

    ReplyDelete
  7. I have tested the new version and it is still not working. I even put the exe file in CUDA dir: NVIDIA CUDA SDK\bin\win32\Release. The program is crashing without any message. A log file would be useful.

    ReplyDelete
  8. If you open a command window and pipe the output to a file that would be useful.

    something along the lines of:

    cudart-sp-0.02 >log.dat

    It is rather strange it works on the majority of systems, I have no idea what the common denominator is for the fails. Hopefully your log file will help.

    ReplyDelete
  9. Hey

    I've run the executable through a debugger, and might have some information that could be useful. Could you send me your e-mail address so I can mail it to you?

    ReplyDelete
  10. Thanks Audun - I've emailed you my address

    ReplyDelete
  11. I've run the cudart-sp-0.02 >log.dat in a cmd window, but the log.dat is empty. Try to use fflush() after each fprintf().

    ReplyDelete
  12. The bug has been found and re-created on my machine.
    Thanks for all the help - especially from Audun who actually traced it in a debugger.

    Stupidly I thought the v2 cudart.dll would have the same param / calls as the v1.1 one so the .lib file (which I compiled with) would mean it would be ok against either... d'oh!

    Basically you have to compile with the correct .lib for the dll - something I really should have realized. Auduns stack and call trace made it appear quite obvious. It looks as if the v2 one pushes an extra param on the stack which of course really confuses system

    I will be rebuilding the .exe shortly and including the cudart.dll in the zip file distribution. I will also compile one for v2.0. There will be a post on the main page once this is done.

    Again thanks to everyone who has contributed.

    ReplyDelete