set_io_rank Subroutine

public subroutine set_io_rank(rk)

Utility function to set the rank of the process doing I/O.

Arguments

Type IntentOptional Attributes Name
integer, intent(in) :: rk

Desired rank for the IO process.


Source Code

   subroutine set_io_rank(rk)
      !! Utility function to set the rank of the process doing I/O.
      integer, intent(in) :: rk
      !! Desired rank for the IO process.
      if (rk > comm_size .or. rk < 0) then
         if (io_rank()) print *, 'Invalid I/O rank specified!', rk
      else
         nio = rk
         if (io_rank()) print *, 'I/O rank --> rank ', nio
      end if
   end subroutine set_io_rank