diff --git a/src/applications/dynamic_simulation_full_y/dsf_comm_main.cpp b/src/applications/dynamic_simulation_full_y/dsf_comm_main.cpp index f38ee9f7c..c255829fe 100644 --- a/src/applications/dynamic_simulation_full_y/dsf_comm_main.cpp +++ b/src/applications/dynamic_simulation_full_y/dsf_comm_main.cpp @@ -69,9 +69,16 @@ void dsf(MPI_Comm comm, int argc, char **argv) gridpack::NoPrint *noprint_ins = gridpack::NoPrint::instance(); noprint_ins->setStatus(true); + + int rank,size; + MPI_Comm_rank(comm,&rank); + MPI_Comm_size(comm,&size); + std::cout << "Rank: "< 2) { using namespace gridpack; using namespace gridpack::parallel; Environment env(argc,argv,csplit); - Communicator gp_world; + if (env.active()) { + Communicator gp_world; - printf("GP %d: Process %d of %d (global: %d of %d)\n", - color, gp_world.rank(), gp_world.size(), - global_rank, global_size); + printf("GP %d: Process %d of %d (global: %d of %d)\n", + color, gp_world.rank(), gp_world.size(), + global_rank, global_size); + } }