set_intel_turbo Subroutine

private impure elemental subroutine set_intel_turbo(this, turbo)

Type Bound

linux_nodes

Arguments

Type IntentOptional Attributes Name
class(linux_nodes), intent(inout) :: this
character(len=*), intent(in) :: turbo

Calls

proc~~set_intel_turbo~~CallsGraph proc~set_intel_turbo forclust::linux_nodes%set_intel_turbo proc~is_intel_pstate_available forclust::linux_nodes%is_intel_pstate_available proc~set_intel_turbo->proc~is_intel_pstate_available

Contents

Source Code


Source Code

   elemental impure subroutine set_intel_turbo(this,turbo)
      ! bug: it does not depend on a node
      class(linux_nodes), intent(inout) :: this
      character(len=*),   intent(in)    :: turbo
      integer                           :: nunit, stat

      call this%is_intel_pstate_available()
      if (this%is_intel_pstate == 1) then

         this%turbo = turbo

         open(newunit=nunit, file='/sys/devices/system/cpu/intel_pstate/no_turbo', iostat=stat)
         if (turbo == 'on' ) write(nunit,'(i0)') 0
         if (turbo == 'off') write(nunit,'(i0)') 1
         close(nunit)
      end if
   end subroutine set_intel_turbo