select_linux Subroutine

private impure elemental subroutine select_linux(this)

Type Bound

cluster

Arguments

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

Calls

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

Contents

Source Code


Source Code

   elemental impure subroutine select_linux(this)
      class(cluster), intent(inout) :: this
      character(len=100)            :: current_node_path
      character(len=100)            :: backlight_path
      integer                       :: i

      call this%find_number_of_nodes()
      if (.not. allocated(this%node)) allocate(this%node(this%nnodes))

      do concurrent (i = 1:this%nnodes)
         write (current_node_path, "(a,i0,a)") "/sys/devices/system/node/node",i-1,"/"
         this%node(i)%path_node=adjustl(trim(current_node_path))
      end do

      write (backlight_path, "(a,i0,a)") "/sys/class/backlight/intel_backlight"
      this%backlight%path_backlight=adjustl(trim(backlight_path))
   end subroutine select_linux