find_number_of_nodes Subroutine

private impure elemental subroutine find_number_of_nodes(this)

Uses

    • popen_module
  • proc~~find_number_of_nodes~~UsesGraph proc~find_number_of_nodes forclust::cluster%find_number_of_nodes popen_module popen_module proc~find_number_of_nodes->popen_module

Type Bound

cluster

Arguments

Type IntentOptional Attributes Name
class(cluster), intent(inout) :: this

Calls

proc~~find_number_of_nodes~~CallsGraph proc~find_number_of_nodes forclust::cluster%find_number_of_nodes get_command_as_string get_command_as_string proc~find_number_of_nodes->get_command_as_string

Called by

proc~~find_number_of_nodes~~CalledByGraph proc~find_number_of_nodes forclust::cluster%find_number_of_nodes proc~select_linux forclust::cluster%select_linux proc~select_linux->proc~find_number_of_nodes

Contents

Source Code


Source Code

   elemental impure subroutine find_number_of_nodes(this)
      use :: popen_module, only: get_command_as_string
      class(cluster), intent(inout) :: this
      character(len=:), allocatable :: nnodes_char

      nnodes_char = get_command_as_string("lscpu | grep 'NUMA node(s):' | awk '{print $3}'")
      read(nnodes_char,*) this%nnodes
   end subroutine find_number_of_nodes