34 integer,
public,
parameter ::
prc_w = 1
35 integer,
public,
parameter ::
prc_n = 2
36 integer,
public,
parameter ::
prc_e = 3
37 integer,
public,
parameter ::
prc_s = 4
38 integer,
public,
parameter ::
prc_nw = 5
39 integer,
public,
parameter ::
prc_ne = 6
40 integer,
public,
parameter ::
prc_sw = 7
41 integer,
public,
parameter ::
prc_se = 8
86 logical :: PRC_PERIODIC_X = .true.
87 logical :: PRC_PERIODIC_Y = .true.
88 logical :: PRC_CART_REORDER = .false.
90 namelist / param_prc / &
99 integer :: coords_W(2)
100 integer :: coords_N(2)
101 integer :: coords_E(2)
102 integer :: coords_S(2)
103 integer :: next_coords(2)
112 if(
io_l )
write(
io_fid_log,*)
'++++++ Module[PROCESS] / Categ[ATMOS-RM COMM] / Origin[SCALElib]' 137 if(
io_l )
write(
io_fid_log,*)
'*** Not found namelist. Default used.' 138 elseif( ierr > 0 )
then 139 write(*,*)
'xxx Not appropriate names in namelist PARAM_PRC. Check!' 149 write(*,*)
'xxx total number of node does not match that requested. Check!' 154 write(*,*)
'xxx number of requested node cannot devide to 2D. Check!' 169 period(1) = prc_periodic_y
170 period(2) = prc_periodic_x
190 next_coords(1) = coords_n(1)
191 next_coords(2) = coords_w(2)
199 next_coords(1) = coords_n(1)
200 next_coords(2) = coords_e(2)
208 next_coords(1) = coords_s(1)
209 next_coords(2) = coords_w(2)
217 next_coords(1) = coords_s(1)
218 next_coords(2) = coords_e(2)
221 call mpi_comm_free(iptbl,ierr)
227 if(
io_l )
write(
io_fid_log,
'(1x,A,I5,A,I5,A,I5,A,A,I5,A,I5,A,I5,A,A,I5,A,I5,A,I5,A)') &
228 '*** NW(',next(
prc_nw),
',',
prc_2drank(next(
prc_nw),1),
',',
prc_2drank(next(
prc_nw),2),
')', &
229 ' - N(',next(
prc_n) ,
',',
prc_2drank(next(
prc_n) ,1),
',',
prc_2drank(next(
prc_n) ,2),
')', &
230 ' - NE(',next(
prc_ne),
',',
prc_2drank(next(
prc_ne),1),
',',
prc_2drank(next(
prc_ne),2),
')' 232 if(
io_l )
write(
io_fid_log,
'(1x,A,I5,A,I5,A,I5,A,A,I5,A,I5,A,I5,A,A,I5,A,I5,A,I5,A)') &
233 '*** W(',next(
prc_w),
',',
prc_2drank(next(
prc_w),1),
',',
prc_2drank(next(
prc_w),2),
')', &
234 ' - P(',
prc_myrank ,
',',
prc_2drank(
prc_myrank, 1),
',',
prc_2drank(
prc_myrank, 2),
')', &
235 ' - E(',next(
prc_e),
',',
prc_2drank(next(
prc_e),1),
',',
prc_2drank(next(
prc_e),2),
')' 237 if(
io_l )
write(
io_fid_log,
'(1x,A,I5,A,I5,A,I5,A,A,I5,A,I5,A,I5,A,A,I5,A,I5,A,I5,A)') &
238 '*** SW(',next(
prc_sw),
',',
prc_2drank(next(
prc_sw),1),
',',
prc_2drank(next(
prc_sw),2),
')', &
239 ' - S(',next(
prc_s) ,
',',
prc_2drank(next(
prc_s) ,1),
',',
prc_2drank(next(
prc_s) ,2),
')', &
240 ' - SE(',next(
prc_se),
',',
prc_2drank(next(
prc_se),1),
',',
prc_2drank(next(
prc_se),2),
')' integer, public prc_num_x
x length of 2D processor topology
integer, parameter, public prc_s
[node direction] south
logical, public prc_ismaster
master process in local communicator?
logical, public prc_has_n
integer, parameter, public prc_w
[node direction] west
integer, public prc_local_comm_world
local communicator
subroutine, public prc_mpistop
Abort MPI.
logical, public prc_mpi_alive
MPI is alive?
logical, public prc_global_ismaster
master process in global communicator?
logical, public io_l
output log or not? (this process)
subroutine, public prc_setup
Setup Processor topology.
logical, public prc_has_e
integer, public prc_universal_nprocs
process num in universal communicator
integer, public prc_universal_comm_world
original communicator
integer, dimension(8), public prc_next
node ID of 8 neighbour process
logical, public prc_has_s
integer, parameter, public prc_n
[node direction] north
integer, public prc_num_y
y length of 2D processor topology
logical, public prc_universal_ismaster
master process in universal communicator?
integer, parameter, public prc_nw
[node direction] northwest
integer, public prc_global_comm_world
global communicator
integer, public prc_global_myrank
myrank in global communicator
integer, parameter, public prc_e
[node direction] east
integer, parameter, public prc_masterrank
master process in each communicator
integer, public prc_myrank
process num in local communicator
integer, parameter, public prc_sw
[node direction] southwest
integer, public prc_global_nprocs
process num in global communicator
logical, public io_lnml
output log or not? (for namelist, this process)
integer, dimension(:,:), allocatable, public prc_2drank
node index in 2D topology
integer, public prc_abort_comm_world
communicator for aborting
integer, parameter, public prc_ne
[node direction] northeast
integer, public io_fid_conf
Config file ID.
integer, public prc_universal_myrank
myrank in universal communicator
integer, public io_fid_log
Log file ID.
integer, parameter, public prc_se
[node direction] southeast
logical, public prc_has_w
integer, public prc_nprocs
myrank in local communicator