Go to the documentation of this file.
51 logical :: execute_preprocess = .false.
52 logical :: execute_model = .true.
53 integer :: num_bulkjob = 1
54 integer :: num_domain = 1
55 integer :: num_fail_tolerance = 1
56 integer :: freq_fail_check = 5
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!'
132 if ( execute_preprocess &
133 .OR. execute_model )
then
134 if( universal_master )
write(*,*)
"*** Execute preprocess? : ", execute_preprocess
135 if( universal_master )
write(*,*)
"*** Execute model? : ", execute_model
137 if( universal_master )
write(*,*)
'xxx No execution. please check PARAM_LAUNCHER. STOP'
143 if ( mod(universal_nprocs,num_bulkjob) /= 0 )
then
144 if( universal_master )
write(*,*)
'xxx Total Num of Processes must be divisible by NUM_BULKJOB. Check!'
145 if( universal_master )
write(*,*)
'xxx Total Num of Processes = ', universal_nprocs
146 if( universal_master )
write(*,*)
'xxx NUM_BULKJOB = ', num_bulkjob
150 global_nprocs = universal_nprocs / num_bulkjob
151 prc_bulkjob(1:num_bulkjob) = global_nprocs
152 if ( num_bulkjob > 1 )
then
153 if( universal_master )
write(*,
'(1x,A,I5)')
"*** TOTAL BULK JOB NUMBER = ", num_bulkjob
154 if( universal_master )
write(*,
'(1x,A,I5)')
"*** PROCESS NUM of EACH JOB = ", global_nprocs
156 if ( failure_prc_manage )
then
157 if( universal_master )
write(*,
'(1x,A)')
"*** Available: Failure Process Management"
159 if ( num_fail_tolerance <= 0 )
then
160 if( universal_master )
write(*,*)
'xxx Num of Failure Processes must be positive number. Check!'
161 if( universal_master )
write(*,*)
'xxx NUM_FAIL_TOLERANCE = ', num_fail_tolerance
165 if ( num_fail_tolerance > num_bulkjob )
then
166 write(*,*)
'xxx NUM_FAIL_TOLERANCE is bigger than NUM_BLUKJOB number'
167 write(*,*)
' set to be: NUM_FAIL_TOLERANCE <= NUM_BLUKJOB'
171 if ( num_domain > 1 )
then
172 if ( freq_fail_check >= 1 .or. num_fail_tolerance /= num_bulkjob )
then
173 write(*,*)
'xxx Full function of FPM is not available with online nesting.'
174 write(*,*)
' You can use this only to avoid job stop until all members finish.'
175 write(*,*)
' for this purpose, set: FREQ_FAIL_CHECK = 0'
176 write(*,*)
' NUM_FAIL_TOLERANCE == NUM_BULKJOB'
196 if ( num_domain > 1 )
then
197 if( universal_master )
write(*,
'(1x,A,I5)')
"*** TOTAL DOMAIN NUMBER = ", num_domain
198 if( universal_master )
write(*,
'(1x,A,L5)')
"*** Flag of ABORT ALL JOBS = ", abort_all_jobs
213 call fpm_init( num_fail_tolerance, &
230 if ( num_bulkjob > 1 )
then
231 write(local_cnf_fname,
'(I4.4,2A)') id_bulkjob,
"/", trim(conf_files(id_domain))
233 local_cnf_fname = trim(conf_files(id_domain))
236 if ( execute_preprocess )
then
243 if ( execute_model )
then
253 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
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)
program scalerm
Program SCALE-RM (a launcher of main routine)
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