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
89 logical :: prc_cart_reorder = .false.
91 namelist / param_prc / &
100 integer :: coords_w(2)
101 integer :: coords_n(2)
102 integer :: coords_e(2)
103 integer :: coords_s(2)
104 integer :: next_coords(2)
113 if(
io_l )
write(
io_fid_log,*)
'++++++ Module[PROCESS] / Categ[ATMOS-RM COMM] / Origin[SCALElib]' 118 write(
io_fid_log,*)
'*** Process information ***' 139 if(
io_l )
write(
io_fid_log,*)
'*** Not found namelist. Default used.' 140 elseif( ierr > 0 )
then 141 write(*,*)
'xxx Not appropriate names in namelist PARAM_PRC. Check!' 151 write(*,*)
'xxx total number of node does not match that requested. Check!' 156 write(*,*)
'xxx number of requested node cannot devide to 2D. Check!' 192 next_coords(1) = coords_n(1)
193 next_coords(2) = coords_w(2)
201 next_coords(1) = coords_n(1)
202 next_coords(2) = coords_e(2)
210 next_coords(1) = coords_s(1)
211 next_coords(2) = coords_w(2)
219 next_coords(1) = coords_s(1)
220 next_coords(2) = coords_e(2)
223 call mpi_comm_free(iptbl,ierr)
229 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)') &
230 '*** NW(',next(
prc_nw),
',',
prc_2drank(next(
prc_nw),1),
',',
prc_2drank(next(
prc_nw),2),
')', &
231 ' - N(',next(
prc_n) ,
',',
prc_2drank(next(
prc_n) ,1),
',',
prc_2drank(next(
prc_n) ,2),
')', &
232 ' - NE(',next(
prc_ne),
',',
prc_2drank(next(
prc_ne),1),
',',
prc_2drank(next(
prc_ne),2),
')' 234 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)') &
235 '*** W(',next(
prc_w),
',',
prc_2drank(next(
prc_w),1),
',',
prc_2drank(next(
prc_w),2),
')', &
236 ' - P(',
prc_myrank ,
',',
prc_2drank(
prc_myrank, 1),
',',
prc_2drank(
prc_myrank, 2),
')', &
237 ' - E(',next(
prc_e),
',',
prc_2drank(next(
prc_e),1),
',',
prc_2drank(next(
prc_e),2),
')' 239 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)') &
240 '*** SW(',next(
prc_sw),
',',
prc_2drank(next(
prc_sw),1),
',',
prc_2drank(next(
prc_sw),2),
')', &
241 ' - S(',next(
prc_s) ,
',',
prc_2drank(next(
prc_s) ,1),
',',
prc_2drank(next(
prc_s) ,2),
')', &
242 ' - 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_periodic_y
periodic condition or not (Y)?
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
logical, public prc_periodic_x
periodic condition or not (X)?
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?
logical, public io_nml
output log or not? (for namelist, this process)
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
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
integer, public io_fid_nml
Log file ID (only for output namelist)