Go to the documentation of this file.
51 logical :: execute_preprocess = .true.
52 logical :: execute_model = .false.
53 integer :: num_bulkjob = 1
54 integer :: num_domain = 1
55 integer :: num_fail_tolerance = 1
56 integer :: freq_fail_check = 0
59 logical :: abort_all_jobs = .false.
60 logical :: log_split = .false.
61 logical :: color_reorder = .true.
62 logical :: failure_prc_manage = .false.
64 namelist / param_launcher / &
78 integer :: universal_comm
79 integer :: universal_nprocs
80 integer :: universal_myrank
81 logical :: universal_master
82 character(len=H_LONG) :: universal_cnf_fname
84 integer :: global_comm
85 integer :: global_nprocs
89 logical :: use_fpm = .false.
93 integer :: intercomm_parent
94 integer :: intercomm_child
95 character(len=H_LONG) :: local_cnf_fname
108 if( universal_master )
write(*,*)
'*** Start Launch System for SCALE-RM'
118 conf_files(1) = universal_cnf_fname
122 read(fid,nml=param_launcher,iostat=ierr)
125 elseif( ierr > 0 )
then
126 if( universal_master )
write(*,*)
'xxx Not appropriate names in namelist PARAM_LAUNCHER. Check!'
133 if ( execute_preprocess &
134 .OR. execute_model )
then
135 if( universal_master )
write(*,*)
"*** Execute preprocess? : ", execute_preprocess
136 if( universal_master )
write(*,*)
"*** Execute model? : ", execute_model
138 if( universal_master )
write(*,*)
'xxx No execution. please check PARAM_LAUNCHER. STOP'
144 if ( mod(universal_nprocs,num_bulkjob) /= 0 )
then
145 if( universal_master )
write(*,*)
'xxx Total Num of Processes must be divisible by NUM_BULKJOB. Check!'
146 if( universal_master )
write(*,*)
'xxx Total Num of Processes = ', universal_nprocs
147 if( universal_master )
write(*,*)
'xxx NUM_BULKJOB = ', num_bulkjob
151 global_nprocs = universal_nprocs / num_bulkjob
152 prc_bulkjob(1:num_bulkjob) = global_nprocs
153 if ( num_bulkjob > 1 )
then
154 if( universal_master )
write(*,
'(1x,A,I5)')
"*** TOTAL BULK JOB NUMBER = ", num_bulkjob
155 if( universal_master )
write(*,
'(1x,A,I5)')
"*** PROCESS NUM of EACH JOB = ", global_nprocs
157 if ( failure_prc_manage )
then
158 if( universal_master )
write(*,
'(1x,A)')
"*** Available: Failure Process Management"
160 if ( num_fail_tolerance <= 0 )
then
161 if( universal_master )
write(*,*)
'xxx Num of Failure Processes must be positive number. Check!'
162 if( universal_master )
write(*,*)
'xxx NUM_FAIL_TOLERANCE = ', num_fail_tolerance
166 if ( num_fail_tolerance > num_bulkjob )
then
167 write(*,*)
'xxx NUM_FAIL_TOLERANCE is bigger than NUM_BLUKJOB number'
168 write(*,*)
' set to be: NUM_FAIL_TOLERANCE <= NUM_BLUKJOB'
187 if ( num_domain > 1 )
then
188 if( universal_master )
write(*,
'(1x,A,I5)')
"*** TOTAL DOMAIN NUMBER = ", num_domain
189 if( universal_master )
write(*,
'(1x,A,L5)')
"*** Flag of ABORT ALL JOBS = ", abort_all_jobs
204 call fpm_init( num_fail_tolerance, &
221 if ( num_bulkjob > 1 )
then
222 write(local_cnf_fname,
'(I4.4,2A)') id_bulkjob,
"/", trim(conf_files(id_domain))
224 local_cnf_fname = trim(conf_files(id_domain))
227 if ( execute_preprocess )
then
234 if ( execute_model )
then
244 if( universal_master )
write(*,*)
'*** End Launch System for SCALE-RM'
subroutine, public prc_abort
Abort Process.
subroutine, public prc_universal_setup(comm, nprocs, myrank, ismaster)
setup MPI in universal communicator
subroutine, public prc_mpisplit_bulk(ORG_COMM_WORLD, NUM_BULKJOB, PRC_BULKJOB, debug, SUB_COMM_WORLD, ID_BULKJOB)
MPI Communicator Split (bulk job)
subroutine, public rm_prep(comm_world, intercomm_parent, intercomm_child, cnf_fname)
Setup.
subroutine, public prc_global_setup(abortall, comm)
setup MPI in global communicator
subroutine, public io_set_universalrank(myrank, jobid, domainid)
Put for error log.
subroutine, public prc_mpistart(comm)
Start MPI.
subroutine, public fpm_init(max_failure, polling_freq, universal_comm, global_comm, local_comm, num_member, global_root, use_fpm)
Initialize FPM.
integer, parameter, public prc_comm_null
subroutine, public prc_errhandler_setup(use_fpm, master)
Setup MPI error handler.
integer, dimension(prc_domain_nlim), public prc_global_root
root processes in global members
integer, parameter, public prc_domain_nlim
max depth of domains
program scalerm_pp
Program SCALE-RM (a launcher of main routine)
subroutine, public prc_mpisplit_nest(ORG_COMM_WORLD, NUM_DOMAIN, PRC_DOMAIN, debug, color_reorder, SUB_COMM_WORLD, ID_DOMAIN, INTERCOMM_parent, INTERCOMM_child)
MPI Communicator Split (nesting)
module SCALE-RM (a main routine of regional model)
subroutine, public prc_mpifinish
Stop MPI peacefully.
subroutine, public rm_driver(comm_world, intercomm_parent, intercomm_child, cnf_fname)
Setup.
character(len=h_long) function, public io_arg_getfname(is_master, allow_noconf)
get config filename from argument
integer function, public io_cnf_open(fname, is_master)
open config file