32 integer,
public,
parameter ::
prc_w = 1
33 integer,
public,
parameter ::
prc_n = 2
34 integer,
public,
parameter ::
prc_e = 3
35 integer,
public,
parameter ::
prc_s = 4
36 integer,
public,
parameter ::
prc_nw = 5
37 integer,
public,
parameter ::
prc_ne = 6
38 integer,
public,
parameter ::
prc_sw = 7
39 integer,
public,
parameter ::
prc_se = 8
87 logical :: PRC_CART_REORDER = .false.
89 namelist / param_prc_cartesc / &
98 integer :: coords_W (2)
99 integer :: coords_N (2)
100 integer :: coords_E (2)
101 integer :: coords_S (2)
102 integer :: next_coords(2)
111 log_info(
"PRC_CARTESC_setup",*)
'Setup' 115 log_progress(*)
'start MPI' 117 log_info(
"PRC_CARTESC_setup",*)
'Process information ' 127 log_info_cont(
'(1x,A,I12)')
'total process [LOCAL] : ',
prc_nprocs 128 log_info_cont(
'(1x,A,I12)')
'my process ID [LOCAL] : ',
prc_myrank 129 log_info_cont(
'(1x,A,L12)')
'master rank? [LOCAL] : ',
prc_ismaster 131 log_info_cont(
'(1x,A,I12)')
'master rank ID [each world] : ',
prc_masterrank 136 read(
io_fid_conf,nml=param_prc_cartesc,iostat=ierr)
138 log_info(
"PRC_CARTESC_setup",*)
'Not found namelist. Default used.' 139 elseif( ierr > 0 )
then 140 log_error(
"PRC_CARTESC_setup",*)
'Not appropriate names in namelist PARAM_PRC_CARTESC. Check!' 146 log_info(
"PRC_CARTESC_setup",*)
'Process allocation ' 150 log_error(
"PRC_CARTESC_setup",*)
'total number of node does not match that requested. Check!' 155 log_error(
"PRC_CARTESC_setup",*)
'number of requested node cannot devide to 2D. Check!' 191 next_coords(1) = coords_n(1)
192 next_coords(2) = coords_w(2)
200 next_coords(1) = coords_n(1)
201 next_coords(2) = coords_e(2)
209 next_coords(1) = coords_s(1)
210 next_coords(2) = coords_w(2)
218 next_coords(1) = coords_s(1)
219 next_coords(2) = coords_e(2)
222 call mpi_comm_free(iptbl,ierr)
227 log_info(
"PRC_CARTESC_setup",*)
'Node topology :' 228 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)') &
229 'NW(',next(
prc_nw),
',',
prc_2drank(next(
prc_nw),1),
',',
prc_2drank(next(
prc_nw),2),
')', &
230 ' - N(',next(
prc_n) ,
',',
prc_2drank(next(
prc_n) ,1),
',',
prc_2drank(next(
prc_n) ,2),
')', &
231 ' - NE(',next(
prc_ne),
',',
prc_2drank(next(
prc_ne),1),
',',
prc_2drank(next(
prc_ne),2),
')' 232 log_info_cont(
'(1x,A)')
' | | |' 233 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)') &
234 ' W(',next(
prc_w),
',',
prc_2drank(next(
prc_w),1),
',',
prc_2drank(next(
prc_w),2),
')', &
235 ' - P(',
prc_myrank ,
',',
prc_2drank(
prc_myrank, 1),
',',
prc_2drank(
prc_myrank, 2),
')', &
236 ' - E(',next(
prc_e),
',',
prc_2drank(next(
prc_e),1),
',',
prc_2drank(next(
prc_e),2),
')' 237 log_info_cont(
'(1x,A)')
' | | |' 238 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)') &
239 'SW(',next(
prc_sw),
',',
prc_2drank(next(
prc_sw),1),
',',
prc_2drank(next(
prc_sw),2),
')', &
240 ' - S(',next(
prc_s) ,
',',
prc_2drank(next(
prc_s) ,1),
',',
prc_2drank(next(
prc_s) ,2),
')', &
241 ' - SE(',next(
prc_se),
',',
prc_2drank(next(
prc_se),1),
',',
prc_2drank(next(
prc_se),2),
')' integer, public prc_universal_nprocs
process num in universal communicator
integer, parameter, public prc_sw
[node direction] southwest
integer, dimension(8), public prc_next
node ID of 8 neighbour process
integer, parameter, public prc_n
[node direction] north
logical, public prc_global_ismaster
master process in global communicator?
integer, public io_fid_nml
Log file ID (only for output namelist)
integer, public prc_global_myrank
myrank in global communicator
subroutine, public prc_cartesc_setup
Setup Processor topology.
integer, public io_fid_conf
Config file ID.
logical, public prc_mpi_alive
MPI is alive?
logical, public prc_has_s
integer, parameter, public prc_se
[node direction] southeast
logical, public prc_has_n
logical, public prc_has_e
logical, public prc_periodic_y
periodic condition or not (Y)?
integer, public prc_universal_comm_world
original communicator
integer, public prc_nprocs
myrank in local communicator
integer, public prc_universal_myrank
myrank in universal communicator
logical, public prc_periodic_x
periodic condition or not (X)?
logical, public io_l
output log or not? (this process)
integer, parameter, public prc_w
[node direction] west
integer, parameter, public prc_masterrank
master process in each communicator
integer, public prc_global_nprocs
process num in global communicator
integer, public prc_myrank
process num in local communicator
integer, dimension(:,:), allocatable, public prc_2drank
node index in 2D topology
subroutine, public prc_abort
Abort Process.
integer, public prc_num_y
y length of 2D processor topology
integer, parameter, public prc_nw
[node direction] northwest
integer, parameter, public prc_e
[node direction] east
logical, public prc_ismaster
master process in local communicator?
integer, public prc_global_comm_world
global communicator
integer, parameter, public prc_s
[node direction] south
logical, public prc_universal_ismaster
master process in universal communicator?
integer, public prc_local_comm_world
local communicator
integer, public prc_abort_comm_world
communicator for aborting
logical, public io_nml
output log or not? (for namelist, this process)
integer, parameter, public prc_ne
[node direction] northeast
logical, public prc_has_w
integer, public prc_num_x
x length of 2D processor topology