1 !Processor col for global col number 2 pure function pcol(global_col, nblk, np_cols) result(local_col) 3 use iso_c_binding, only : c_int 4 implicit none 5 integer(kind=c_int), intent(in) :: global_col, nblk, np_cols 6 integer(kind=c_int) :: local_col 7 local_col = MOD((global_col-1)/nblk,np_cols) 8 end function 9 10 !Processor row for global row number 11 pure function prow(global_row, nblk, np_rows) result(local_row) 12 use iso_c_binding, only : c_int 13 implicit none 14 integer(kind=c_int), intent(in) :: global_row, nblk, np_rows 15 integer(kind=c_int) :: local_row 16 local_row = MOD((global_row-1)/nblk,np_rows) 17 end function 18 19