find_number_of_cpus Subroutine

private impure elemental subroutine find_number_of_cpus(this)

Uses

    • popen_module
  • proc~~find_number_of_cpus~~UsesGraph proc~find_number_of_cpus forclust::linux_nodes%find_number_of_cpus popen_module popen_module proc~find_number_of_cpus->popen_module

Type Bound

linux_nodes

Arguments

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

Calls

proc~~find_number_of_cpus~~CallsGraph proc~find_number_of_cpus forclust::linux_nodes%find_number_of_cpus get_command_as_string get_command_as_string proc~find_number_of_cpus->get_command_as_string

Called by

proc~~find_number_of_cpus~~CalledByGraph proc~find_number_of_cpus forclust::linux_nodes%find_number_of_cpus proc~select_node forclust::linux_nodes%select_node proc~select_node->proc~find_number_of_cpus

Contents

Source Code


Source Code

   elemental impure subroutine find_number_of_cpus(this)
      use :: popen_module, only: get_command_as_string
      class(linux_nodes), intent(inout) :: this
      character(len=:), allocatable     :: ncpu_char

      ncpu_char = get_command_as_string('nproc --all')
      read(ncpu_char,*) this%ncpus
   end subroutine find_number_of_cpus