Go to the documentation of this file.
   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
 
   89     logical :: prc_cart_reorder = .false. 
 
   91     namelist / param_prc_cartesc / &
 
  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     log_info(
"PRC_CARTESC_setup",*) 
'Setup' 
  117        log_progress(*) 
'start MPI' 
  119        log_info(
"PRC_CARTESC_setup",*) 
'Process information ' 
  129        log_info_cont(
'(1x,A,I12)')     
'total process [LOCAL]       : ', 
prc_nprocs 
  130        log_info_cont(
'(1x,A,I12)')     
'my process ID [LOCAL]       : ', 
prc_myrank 
  131        log_info_cont(
'(1x,A,L12)')     
'master rank?  [LOCAL]       : ', 
prc_ismaster 
  133        log_info_cont(
'(1x,A,I12)')     
'master rank ID [each world] : ', 
prc_masterrank 
  138     read(
io_fid_conf,nml=param_prc_cartesc,iostat=ierr)
 
  140        log_info(
"PRC_CARTESC_setup",*) 
'Not found namelist. Default used.' 
  141     elseif( ierr > 0 ) 
then  
  142        log_error(
"PRC_CARTESC_setup",*) 
'Not appropriate names in namelist PARAM_PRC_CARTESC. Check!' 
  148     log_info(
"PRC_CARTESC_setup",*) 
'Process allocation ' 
  152        log_error(
"PRC_CARTESC_setup",*) 
'total number of node does not match that requested. Check!' 
  157        log_error(
"PRC_CARTESC_setup",*) 
'number of requested node cannot devide to 2D. Check!' 
  193           next_coords(1) = coords_n(1)
 
  194           next_coords(2) = coords_w(2)
 
  202           next_coords(1) = coords_n(1)
 
  203           next_coords(2) = coords_e(2)
 
  211           next_coords(1) = coords_s(1)
 
  212           next_coords(2) = coords_w(2)
 
  220           next_coords(1) = coords_s(1)
 
  221           next_coords(2) = coords_e(2)
 
  224        call mpi_comm_free(iptbl,ierr)
 
  229     log_info(
"PRC_CARTESC_setup",*) 
'Node topology :' 
  230     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)') &
 
  231        'NW(',next(
prc_nw),
',',
prc_2drank(next(
prc_nw),1),
',',
prc_2drank(next(
prc_nw),2),
')', &
 
  232     ' -  N(',next(
prc_n) ,
',',
prc_2drank(next(
prc_n) ,1),
',',
prc_2drank(next(
prc_n) ,2),
')', &
 
  233     ' - NE(',next(
prc_ne),
',',
prc_2drank(next(
prc_ne),1),
',',
prc_2drank(next(
prc_ne),2),
')' 
  234     log_info_cont(
'(1x,A)') 
'             |                       |                       |' 
  235     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)') &
 
  236        ' W(',next(
prc_w),
',',
prc_2drank(next(
prc_w),1),
',',
prc_2drank(next(
prc_w),2),
')', &
 
  237     ' -  P(',
prc_myrank ,
',',
prc_2drank(
prc_myrank, 1),
',',
prc_2drank(
prc_myrank, 2),
')', &
 
  238     ' -  E(',next(
prc_e),
',',
prc_2drank(next(
prc_e),1),
',',
prc_2drank(next(
prc_e),2),
')' 
  239     log_info_cont(
'(1x,A)') 
'             |                       |                       |' 
  240     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)') &
 
  241        'SW(',next(
prc_sw),
',',
prc_2drank(next(
prc_sw),1),
',',
prc_2drank(next(
prc_sw),2),
')', &
 
  242     ' -  S(',next(
prc_s) ,
',',
prc_2drank(next(
prc_s) ,1),
',',
prc_2drank(next(
prc_s) ,2),
')', &
 
  243     ' - 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?
 
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?