Output only from rank 0 in test program