Go to the documentation of this file.
33 integer,
public,
parameter ::
prc_w = 1
34 integer,
public,
parameter ::
prc_n = 2
35 integer,
public,
parameter ::
prc_e = 3
36 integer,
public,
parameter ::
prc_s = 4
37 integer,
public,
parameter ::
prc_nw = 5
38 integer,
public,
parameter ::
prc_ne = 6
39 integer,
public,
parameter ::
prc_sw = 7
40 integer,
public,
parameter ::
prc_se = 8
90 logical :: prc_cart_reorder = .false.
92 namelist / param_prc_cartesc / &
100 integer :: divide (2)
101 integer :: coords_w (2)
102 integer :: coords_n (2)
103 integer :: coords_e (2)
104 integer :: coords_s (2)
105 integer :: next_coords(2)
114 log_info(
"PRC_CARTESC_setup",*)
'Setup'
118 log_progress(*)
'start making Cartesian topology'
120 log_info(
"PRC_CARTESC_setup",*)
'Process information '
130 log_info_cont(
'(1x,A,I12)')
'total process [LOCAL] : ',
prc_nprocs
131 log_info_cont(
'(1x,A,I12)')
'my process ID [LOCAL] : ',
prc_myrank
132 log_info_cont(
'(1x,A,L12)')
'master rank? [LOCAL] : ',
prc_ismaster
134 log_info_cont(
'(1x,A,I12)')
'master rank ID [each world] : ',
prc_masterrank
139 read(
io_fid_conf,nml=param_prc_cartesc,iostat=ierr)
141 log_info(
"PRC_CARTESC_setup",*)
'Not found namelist. Default used.'
142 elseif( ierr > 0 )
then
143 log_error(
"PRC_CARTESC_setup",*)
'Not appropriate names in namelist PARAM_PRC_CARTESC. Check!'
149 log_info(
"PRC_CARTESC_setup",*)
'Process allocation '
153 log_error(
"PRC_CARTESC_setup",*)
'total number of node does not match that requested. Check!'
158 log_error(
"PRC_CARTESC_setup",*)
'number of requested node cannot devide to 2D. Check!'
194 next_coords(1) = coords_n(1)
195 next_coords(2) = coords_w(2)
203 next_coords(1) = coords_n(1)
204 next_coords(2) = coords_e(2)
212 next_coords(1) = coords_s(1)
213 next_coords(2) = coords_w(2)
221 next_coords(1) = coords_s(1)
222 next_coords(2) = coords_e(2)
225 call mpi_comm_free(iptbl,ierr)
230 log_info(
"PRC_CARTESC_setup",*)
'Node topology :'
231 log_info_cont(
'(1x,A,I5,A,I5,A,I5,A,A,I5,A,I5,A,I5,A,A,I5,A,I5,A,I5,A)') &
232 'NW(',next(
prc_nw),
',',
prc_2drank(next(
prc_nw),1),
',',
prc_2drank(next(
prc_nw),2),
')', &
233 ' - N(',next(
prc_n) ,
',',
prc_2drank(next(
prc_n) ,1),
',',
prc_2drank(next(
prc_n) ,2),
')', &
234 ' - NE(',next(
prc_ne),
',',
prc_2drank(next(
prc_ne),1),
',',
prc_2drank(next(
prc_ne),2),
')'
235 log_info_cont(
'(1x,A)')
' | | |'
236 log_info_cont(
'(1x,A,I5,A,I5,A,I5,A,A,I5,A,I5,A,I5,A,A,I5,A,I5,A,I5,A)') &
237 ' W(',next(
prc_w),
',',
prc_2drank(next(
prc_w),1),
',',
prc_2drank(next(
prc_w),2),
')', &
238 ' - P(',
prc_myrank ,
',',
prc_2drank(
prc_myrank, 1),
',',
prc_2drank(
prc_myrank, 2),
')', &
239 ' - E(',next(
prc_e),
',',
prc_2drank(next(
prc_e),1),
',',
prc_2drank(next(
prc_e),2),
')'
240 log_info_cont(
'(1x,A)')
' | | |'
241 log_info_cont(
'(1x,A,I5,A,I5,A,I5,A,A,I5,A,I5,A,I5,A,A,I5,A,I5,A,I5,A)') &
242 'SW(',next(
prc_sw),
',',
prc_2drank(next(
prc_sw),1),
',',
prc_2drank(next(
prc_sw),2),
')', &
243 ' - S(',next(
prc_s) ,
',',
prc_2drank(next(
prc_s) ,1),
',',
prc_2drank(next(
prc_s) ,2),
')', &
244 ' - SE(',next(
prc_se),
',',
prc_2drank(next(
prc_se),1),
',',
prc_2drank(next(
prc_se),2),
')'
logical, public prc_universal_ismaster
master process in universal communicator?
subroutine, public prc_abort
Abort Process.
integer, parameter, public prc_n
[node direction] north
integer, parameter, public prc_sw
[node direction] southwest
integer, dimension(8), public prc_next
node ID of 8 neighbour process
logical, public prc_has_s
logical, public prc_periodic_y
periodic condition or not (Y)?
integer, public prc_local_comm_world
local communicator
integer, public prc_myrank
process num in local communicator
logical, public prc_mpi_alive
MPI is alive?
integer, parameter, public prc_se
[node direction] southeast
subroutine, public prc_cartesc_setup
Setup Processor topology.
logical, public prc_has_n
integer, public prc_universal_myrank
myrank in universal communicator
logical, public prc_has_e
logical, public prc_periodic_x
periodic condition or not (X)?
integer, parameter, public prc_masterrank
master process in each communicator
logical, public prc_global_ismaster
master process in global communicator?
subroutine, public prc_cartesc_finalize
Setup Processor topology.
integer, dimension(:,:), allocatable, public prc_2drank
node index in 2D topology
integer, parameter, public prc_w
[node direction] west
integer, public prc_global_myrank
myrank in global communicator
integer, public prc_universal_comm_world
original communicator
integer, public prc_abort_comm_world
communicator for aborting
integer, parameter, public prc_s
[node direction] south
integer, public prc_nprocs
myrank in local communicator
integer, parameter, public prc_nw
[node direction] northwest
integer, public prc_num_y
y length of 2D processor topology
integer, parameter, public prc_e
[node direction] east
logical, public io_l
output log or not? (this process)
integer, public io_fid_nml
Log file ID (only for output namelist)
logical, public io_nml
output log or not? (for namelist, this process)
integer, public prc_num_x
x length of 2D processor topology
integer, public prc_global_comm_world
global communicator
integer, parameter, public prc_ne
[node direction] northeast
integer, public prc_universal_nprocs
process num in universal communicator
integer, public prc_global_nprocs
process num in global communicator
logical, public prc_has_w
integer, public io_fid_conf
Config file ID.
logical, public prc_twod
2D experiment
logical, public prc_ismaster
master process in local communicator?