comms_setup_vars Subroutine

public subroutine comms_setup_vars()

Set up variables related to communicators This should be called also in library mode

Arguments

None

Called by

proc~~comms_setup_vars~~CalledByGraph proc~comms_setup_vars comms_setup_vars proc~comms_setup comms_setup proc~comms_setup->proc~comms_setup_vars proc~wannier_setup wannier_setup proc~wannier_setup->proc~comms_setup_vars program~w90spn2spn w90spn2spn program~w90spn2spn->proc~comms_setup program~wannier wannier program~wannier->proc~comms_setup program~w90chk2chk w90chk2chk program~w90chk2chk->proc~comms_setup program~postw90 postw90 program~postw90->proc~comms_setup

Contents

Source Code


Source Code

  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