You can use the firedrake.op2.MPI.rank_zero decorator to make a function which will only execute on rank 0. On 8 November 2014 18:53, Cotter, Colin J <colin.cotter@imperial.ac.uk> wrote:
Dear Firedrakers, What's the best way to modify a print statement so that only one MPI process does the print?
cheers --cjc
-- Dr David Ham Departments of Mathematics and Computing Imperial College London http://www.imperial.ac.uk/people/david.ham
Thanks! I just educated myself about Python decorators. --cjc ________________________________ From: firedrake-bounces@imperial.ac.uk [firedrake-bounces@imperial.ac.uk] on behalf of David Ham [David.Ham@imperial.ac.uk] Sent: 08 November 2014 19:11 To: firedrake Subject: Re: [firedrake] printing stuff You can use the firedrake.op2.MPI.rank_zero decorator to make a function which will only execute on rank 0. On 8 November 2014 18:53, Cotter, Colin J <colin.cotter@imperial.ac.uk<mailto:colin.cotter@imperial.ac.uk>> wrote: Dear Firedrakers, What's the best way to modify a print statement so that only one MPI process does the print? cheers --cjc -- Dr David Ham Departments of Mathematics and Computing Imperial College London http://www.imperial.ac.uk/people/david.ham
participants (2)
- 
                
                Cotter, Colin J
- 
                
                David Ham