49 logical :: EXECUTE_PREPROCESS = .false.
50 logical :: EXECUTE_MODEL = .true.
51 integer :: NUM_BULKJOB = 1
52 integer :: NUM_DOMAIN = 1
55 logical :: ABORT_ALL_JOBS = .false.
56 logical :: LOG_SPLIT = .false.
57 logical :: COLOR_REORDER = .true.
59 namelist / param_launcher / &
70 integer :: universal_comm
71 integer :: universal_nprocs
72 logical :: universal_master
73 character(len=H_LONG) :: universal_cnf_fname
75 integer :: global_comm
76 integer :: global_nprocs
79 integer :: intercomm_parent_null
80 integer :: intercomm_child_null
81 character(len=H_LONG) :: bulk_prefix
84 integer :: intercomm_parent
85 integer :: intercomm_child
86 character(len=H_LONG) :: local_cnf_fname
98 if( universal_master )
write(*,*)
'*** Start Launch System for SCALE-RM' 108 conf_files(1) = universal_cnf_fname
112 read(fid,nml=param_launcher,iostat=ierr)
115 elseif( ierr > 0 )
then 116 if( universal_master )
write(*,*)
'xxx Not appropriate names in namelist PARAM_LAUNCHER. Check!' 122 if ( execute_preprocess &
123 .OR. execute_model )
then 124 if( universal_master )
write(*,*)
"*** Execute preprocess? : ", execute_preprocess
125 if( universal_master )
write(*,*)
"*** Execute model? : ", execute_model
127 if( universal_master )
write(*,*)
'xxx No execution. please check PARAM_LAUNCHER. STOP' 133 if ( mod(universal_nprocs,num_bulkjob) /= 0 )
then 134 if( universal_master )
write(*,*)
'xxx Total Num of Processes must be divisible by NUM_BULKJOB. Check!' 135 if( universal_master )
write(*,*)
'xxx Total Num of Processes = ', universal_nprocs
136 if( universal_master )
write(*,*)
'xxx NUM_BULKJOB = ', num_bulkjob
140 global_nprocs = universal_nprocs / num_bulkjob
141 prc_bulkjob(1:num_bulkjob) = global_nprocs
142 if ( num_bulkjob > 1 )
then 143 if( universal_master )
write(*,
'(1x,A,I5)')
"*** TOTAL BULK JOB NUMBER = ", num_bulkjob
144 if( universal_master )
write(*,
'(1x,A,I5)')
"*** PROCESS NUM of EACH JOB = ", global_nprocs
156 intercomm_parent_null, &
157 intercomm_child_null, &
165 if ( num_domain > 1 )
then 166 if( universal_master )
write(*,
'(1x,A,I5)')
"*** TOTAL DOMAIN NUMBER = ", num_domain
167 if( universal_master )
write(*,
'(1x,A,L5)')
"*** Flag of ABORT ALL JOBS = ", abort_all_jobs
185 if ( num_bulkjob > 1 )
then 186 local_cnf_fname = trim(bulk_prefix)//
"/"//trim(local_cnf_fname)
189 if ( execute_preprocess )
then 191 intercomm_parent_null, &
192 intercomm_child_null, &
196 if ( execute_model )
then 206 if( universal_master )
write(*,*)
'*** End Launch System for SCALE-RM'
subroutine, public prc_mpistop
Abort MPI.
subroutine, public scalerm(comm_world, intercomm_parent, intercomm_child, cnf_fname)
Setup.
subroutine, public prc_universal_setup(comm, nprocs, ismaster)
setup MPI in universal communicator
subroutine, public prc_mpisplit(ORG_COMM, NUM_DOMAIN, PRC_DOMAINS, CONF_FILES, LOG_SPLIT, bulk_split, color_reorder, INTRA_COMM, inter_parent, inter_child, fname_local)
MPI Communicator Split.
character(len=h_long) function, public io_arg_getfname(is_master)
get config filename from argument
subroutine, public loginit(fid_conf, fid_log, master)
module SCALE-RM (a main routine of regional model)
program scalerm_launcher
Program SCALE-RM (a launcher of main routine)
subroutine, public prc_global_setup(abortall, comm)
setup MPI in global communicator
subroutine, public scalerm_prep(comm_world, intercomm_parent, intercomm_child, cnf_fname)
Setup.
subroutine, public prc_mpistart(comm)
Start MPI.
integer, parameter, public prc_domain_nlim
max depth of domains
subroutine, public prc_mpifinish
Stop MPI peacefully.
integer function, public io_cnf_open(fname, is_master)
open config file