Message: Re: How to split file reading between cores Not Logged In (login)
 Next-in-Thread Next-in-Thread
 Next-in-Forum Next-in-Forum

Feedback Re: How to split file reading between cores 

Forum: Multithreading
Re: Question How to split file reading between cores (Volodymyr Rodin)
Date: Feb 15, 13:03
From: Jonathan Madsen <Jonathan Madsen>

I am pretty sure we don't have a built-in mechanism for doing this. What is sounds like you are trying to do is something you would commonly do with multiple processes (i.e. MPI) instead of multiple threads. Parallel I/O is complicated and best avoided IMO.

One possible way to do this would be to read all the parameters into memory on the master thread and in your primary generator action, just have each event either pop a "beam parameter" out of the global list (use a mutex) or increment an index that tells the threads which "beam parameter" index to use (use an atomic)

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

1 Question: Re: How to split file reading between cores   (Volodymyr Rodin - Feb 15, 14:52)
(_ Feedback: Re: How to split file reading between cores   (Jonathan Madsen - Feb 15, 15:59)
(_ Feedback: Re: How to split file reading between cores   (Volodymyr Rodin - Feb 15, 17:22)
(_ Ok: Re: How to split file reading between cores   (Volodymyr Rodin - Feb 16, 10:18)
(_ Question: Re: How to split file reading between cores   (Michael H. Kelsey - Feb 17, 10:22)
1 Ok: Re: How to split file reading between cores   (Volodymyr Rodin - Feb 18, 04:06)
1 Feedback: Re: How to split file reading between cores   (Jonathan Madsen - Feb 18, 07:24)
2 Feedback: Re: How to split file reading between cores   (Jonathan Madsen - Feb 18, 07:57)
 Add Message Add Message
to: "Re: How to split file reading between cores"

 Subscribe Subscribe

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