Message: Re: ogl refresh from threads Not Logged In (login)
 Next-in-Thread Next-in-Thread
 Next-in-Forum Next-in-Forum

None Re: ogl refresh from threads 

Forum: Multithreading
Re: None ogl refresh from threads
Date: 05 Oct, 2017
From: John Allison <John Allison>

Hi Maurizio

I've not seen that message before. It is true that in multithreading mode event drawing is done on a sub-thread. For OpenGL over X11 and Qt, the GL context is switched to the sub-thread at beginning of run and switched back again at the end.

Where does that message come from? What UI are you using?

You seem to think it is correlated with an "automatic screen refresh". That would only be done if

  /vis/scene/endOEventAction refresh

which is the default but it can be changed with

  /vis/scene/endOEventAction accumulate

> In other words, would it be possible to re-draw the screen only form the
> main thread, after all workers are done with their events?

Curiously, that's what we did in version 10.0 as a stop-gap solution when multithreading was first introduced. (You can't have all subthreads drawing at the same time.) From 10.1 - or was it 10.2 - we queue events and have them drawn from a special visualisation sub-thread. I don't see an easy way to mimic the old behaviour. You could, of course, use sequential mode for visualisation. I think you can do that just by instantiating the G4RunManager in your main program instead of G4MTRunManager.

In multithreading mode you can "/vis/disable". If in your end of event action

    G4EventManager::GetEventManager()->KeepTheCurrentEvent();

the events will be kept and you can view them one by on with

  /vis/reviewKeptEvents

Maybe we could add an option to draw all kept events, but that's not available at present.

Hope that helps.

John

Inline Depth:
 1 1
 All All
Outline Depth:
 1 1
 2 2
 All All
Add message: (add)

1 None: Re: ogl refresh from threads   (ungaro@jlab.org - 05 Oct, 2017)
(_ None: Re: ogl refresh from threads   (John Allison - 05 Oct, 2017)
(_ None: Re: ogl refresh from threads   (ungaro@jlab.org - 05 Oct, 2017)
(_ None: Re: ogl refresh from threads   (John Allison - 06 Oct, 2017)
(_ None: Re: ogl refresh from threads   (ungaro@jlab.org - 06 Oct, 2017)
 Add Message Add Message
to: "Re: ogl refresh from threads"

 Subscribe Subscribe

This site runs SLAC HyperNews version 1.11-slac-98, derived from the original HyperNews