samedi 4 juillet 2020

How to print only once from all the parallel processors?

I'm running a parallel program in Fortran and using MPI. There is an algorithm that is executed by only certain parallel processors which contain a flag. I want to print a statement only once but I couldn't use MPI_Rank = 0 as it might/might not satisfy the IF condition of whether it contains the flag. The parallel processors which contain the flag changes when I change the problem and I want to keep the code generic. Any help? Thank you!

Aucun commentaire:

Enregistrer un commentaire