SCALE-RM
Functions/Subroutines
scale Module Reference

module SCALE More...

Functions/Subroutines

subroutine, public scale_init (app_name)
 Initialization. More...
 
subroutine, public scale_finalize
 Finalize. More...
 

Detailed Description

module SCALE

Description
initialization

Function/Subroutine Documentation

◆ scale_init()

subroutine, public scale::scale_init ( character(len=*), optional  app_name)

Initialization.

Definition at line 65 of file scale.F90.

65  use scale_prc, only: &
66  prc_mpistart, &
69  use scale_const, only: &
71  implicit none
72 
73  character(len=*), optional :: app_name
74 
75  character(len=H_SHORT) :: name
76 
77  ! for prc setup
78  integer :: comm
79  integer :: nprocs
80  integer :: myrank
81  logical :: ismaster
82  !---------------------------------------------------------------------------
83 
84  if ( present(app_name) ) then
85  name = app_name
86  else
87  name = "SCALE APPLICATION"
88  end if
89 
90  ! start MPI
91  call prc_mpistart( comm ) ! [OUT]
92 
93  ! setup MPI communicator
94  call prc_singlecom_setup( comm, & ! [IN]
95  nprocs, & ! [OUT]
96  myrank, & ! [OUT]
97  ismaster ) ! [OUT]
98 
99  ! setup errhandler
100  call prc_errhandler_setup( .false., & ! [IN]
101  ismaster ) ! [IN]
102 
103  ! setup scale_io
104  call io_setup( name, allow_noconf = .true. )
105 
106  ! setup log
107  call io_log_setup( myrank, ismaster )
108 
109  ! setup profiler
110  call prof_setup
111 
112  ! setup constants
113  call const_setup
114 
115  call prof_rapstart( 'Main', 0 )
116 
117  return

References scale_const::const_setup(), scale_io::io_log_setup(), scale_io::io_setup(), scale_prc::prc_errhandler_setup(), scale_prc::prc_mpistart(), scale_prc::prc_singlecom_setup(), scale_prof::prof_rapstart(), and scale_prof::prof_setup().

Here is the call graph for this function:

◆ scale_finalize()

subroutine, public scale::scale_finalize

Finalize.

Definition at line 123 of file scale.F90.

123  use scale_file, only: &
125  use scale_prc, only: &
127  implicit none
128  !---------------------------------------------------------------------------
129 
130  call prof_rapend( 'Main', 0 )
131 
132  call file_close_all
133 
134  call prof_rapreport
135 
136  ! stop mpi
137  call prc_mpifinish
138 
139  return

References scale_file::file_close_all(), scale_prc::prc_mpifinish(), scale_prof::prof_rapend(), and scale_prof::prof_rapreport().

Here is the call graph for this function:
scale_file::file_close_all
subroutine, public file_close_all(skip_abort)
Definition: scale_file.F90:4787
scale_prc::prc_mpistart
subroutine, public prc_mpistart(comm)
Start MPI.
Definition: scale_prc.F90:122
scale_file
module file
Definition: scale_file.F90:15
scale_prc
module PROCESS
Definition: scale_prc.F90:11
scale_const
module CONSTANT
Definition: scale_const.F90:11
scale_prc::prc_errhandler_setup
subroutine, public prc_errhandler_setup(use_fpm, master)
Setup MPI error handler.
Definition: scale_prc.F90:305
scale_prc::prc_singlecom_setup
subroutine, public prc_singlecom_setup(comm, nprocs, myrank, ismaster)
Setup MPI single communicator (not use universal-global-local setting)
Definition: scale_prc.F90:256
scale_prc::prc_mpifinish
subroutine, public prc_mpifinish
Stop MPI peacefully.
Definition: scale_prc.F90:358
scale_const::const_setup
subroutine, public const_setup
Setup.
Definition: scale_const.F90:115