chrxh / alien

ALIEN is a CUDA-powered artificial life simulation program.
https://alien-project.org
BSD 3-Clause "New" or "Revised" License
4.45k stars 136 forks source link

Unable to run examples #16

Closed azrrik closed 3 years ago

azrrik commented 3 years ago

I installed this program via the provided installer on windows. The program starts, but running the default simulation or loading another simulation will cause the program to freeze. Is there anything I can do to troubleshoot this? I have a GTX 1070.

chrxh commented 3 years ago

Can you send me the log.txt (should be in bin-folder) please?

azrrik commented 3 years ago

log.txt

Attached, thanks!

chrxh commented 3 years ago

Thank you! I'm not sure if I can find the reason without using a debugger on your system. The examples you have loaded are using all algorithms from the simulation code. I've the suspicion that some of them are not properly running on your graphics card. There are demo files that use simpler algorithms. For instance, examples/simulations/collisions.sim. Does this demo work?

azrrik commented 3 years ago

I can load collisions.sim. When I hit the play button, one frame renders, but no more. If I then try to exit the application, the autosave dialog pops up and the application never actually terminates.

chrxh commented 3 years ago

Ok, I attach a special version where only the basic physics algorithm are activated: http://alien-project.org/alien_installer_debug.zip

Does freezing still occur?

azrrik commented 3 years ago

The attached version runs for about 10 seconds then crashes. I sent the bug report when prompted and attached the log: log.txt

chrxh commented 3 years ago

Many thanks for trying ! One more request: I have rougly 300 automatic tests which test all features of the simulation code. Here is a compiled version: alien-project.org/Tests.zip Simple unpack and start Tests.exe. The tests are executed in a console. Which ones are failing?

azrrik commented 3 years ago

No worries! Thanks for helping me troubleshoot the issue. The CleanupGpuTests.testCleanupCells test never finishes. (I waited a couple minutes... not sure if it should take longer?) Attached is the output from Tests.exe.

test_out.txt

chrxh commented 3 years ago

This test possibly recreates the timeout problem you have described at the beginning. The test checks the garbage collector. At this time, I see no way to further address the problem without having your hardware.

The only thing what remains to try is to reduce the number of CUDA blocks in the simulator (under Settings -> General settings -> Number of blocks), e.g. halve the number, before running the simulation because it could be a problem with the size of the shared memory. Could you please try this on the special version I sent?

azrrik commented 3 years ago

It runs when I cut the CUDA blocks to 128. Thanks for the help!

chrxh commented 3 years ago

Super! Also the freezing no longer occurs? The number of threads per block and blocks is a science in itself. Currently, no automatism is implemented. Too low values lead to poor performance and too high values can lead to undefined behavior.

azrrik commented 3 years ago

Nope, no freezing when the number of CUDA blocks is 128.