Set up variables related to communicators This should be called also in library mode
subroutine comms_setup_vars
!! Set up variables related to communicators
!! This should be called also in library mode
implicit none
#ifdef MPI
integer :: ierr
call mpi_comm_rank(mpi_comm_world, my_node_id, ierr)
call mpi_comm_size(mpi_comm_world, num_nodes, ierr)
#else
num_nodes = 1
my_node_id = 0
#endif
on_root = .false.
if (my_node_id == root_id) on_root = .true.
end subroutine comms_setup_vars