[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: gdb, jana and threads




Hi Mark,

    Sorry I never responded to this. It rolled off the top of my e-mail 
window and I forgot about it until now.

    The short answer is no, there is no way to run a JANA program with 
only one thread. The minimum is 3 threads:

1. The main thread monitors event rates and checks for end of program 
conditions etc... It is asleep most of the time
  and only wakes up every 0.5 seconds to do its checks.

2. The event-buffer-filler thread reads events into the event buffer and 
then sleeps until a slot is available in the buffer. If you are doing 
full reconstruction, this is probably asleep a lot of the time too once 
the first 10 events are read in and the event buffer is full.

3. The event processor thread. There can be any number of these, but 1 
is the minimum since without at least 1, there are no consumers and the 
program will do nothing.

I guess this doesn't help, but maybe at least answers your question.

Regards,
-David

Mark M. Ito wrote:
> Dave,
>
> I'm still trying to grapple with the running-jana-under-gdb issue on 
> my box (Fedora 9). As a thing to try, I would like to turn off 
> multi-threading. Is there a way to run with only a single thread?
>
>  -- Mark
>

-- 

------------------------------------------------------------------------
  David Lawrence Ph.D.
  Staff Scientist                 Office: (757)269-5567   [[[  [   [ [       
  Jefferson Lab                   Pager:  (757)584-5567   [  [ [ [ [ [   
  http://www.jlab.org/~davidl     davidl@jlab.org         [[[  [[ [[ [[[
------------------------------------------------------------------------