I have a python script which reads a .cgns file, computes my quantities of interest and writes it to a file. Initially I was using pvpython to run this script, but as my data sets are growing I wish to switch to pvbatch. When I tried pvbatch everything was working fine but I was receiving output from every MPI rank, i.e.
would be printed by every rank, and every rank would write the same value to the file as I did
Is there a way I could make these commands execute on root rank ? Maybe a pythonic way of accessing MPI comm ? Any help is appreciated.