Closed ptheywood closed 3 years ago
As discussed away from GitHub, I couldn't reproduce these on Windows.
Under debug builds, the SDL windows does appear, but instancing data is missing from the visualisation as the sim has already finished.
This isn't what I thought it was. At the end of each sim step, the instancing data should be updated (it uses mutex to avoid race conditions). So I'm not actually sure of the cause, as the buffers should be upto date.
Additionally, If the visualisation is closed in visualisation more the simulation should end (IMO), at least if no iteration count is specified.
My assumption was that it would, but I guess I didn't think it through.
Edit: Fixed in branch initial_interface
as of dbcac41
From rediscussing this in slack. The problem is that the Sim requests buffer resize, and sends buffer updates until the sim ends. The vis for whatever reason is being very slow initially, and doesn't actually resize the buffers until the sim has already ended and finished sending it's buffer updates (which are therefore all ignored).
The solution being for the sim to have a better understand of whether the vis is ready to render before sending it's first data update. This will require an additional method adding to the vis interface, to return whether the render loop has begun (or first buffer resize has been received?) permitting data updated to be sent.
As an (incorrect) fix, moving the call to cudaSimulation.initialise
to before visualisation.activate
appears to lead to the expected behaviour (just posting for future reference before i discared my local changes).
This may be required for #26, or atleast relevant.
The branch wait_for_vis
in both repos has my attempted fix.
Under linux it appears that if a small number of steps are specified (i.e.
-s 5
) then the flame simulation completes before the visualisation is fully initialised, and therefore it does not work.Initialisation should be blocking: the simulation should not start until the visualisation is fully initialised.
Additionally, If the visualisation is closed in visualisation more the simulation should end (IMO), at least if no iteration count is specified.
With
-s 1
With
-s 5
my GPU appears to lock up for a while, with no SDL window appearing before the 5 (actually 10 steps for circles_3d) has completed.Under debug builds, the SDL windows does appear, but instancing data is missing from the visualisation as the sim has already finished.