Back to OASIS4 home
Routine psmile_io_init
(ierror)
Subroutine that creates a communicator for the underlying
file IO package. Initializes underlying NetCDF IO package
Create a communicator which covers the application but separates
the I/O from the rest of the data exchange library, based on the local
comm of the application Appl%comm => IO_apps_infos%comm
Initialize the MPP modules :
constructs file mpplog based on the name of the application, and arg of
mpp_init
call mpp_init(mpp_comm=IO_apps_infos%comm,logfile=trim(mpplog))
mpp_init (in
mpp_mod_oa) : define
comm_intern = IO_apps_infos%comm
call MPI_COMM_RANK( comm_intern, pe,
error )
call MPI_COMM_SIZE( comm_intern, npes,
error )
allocate( mpp_request(0:npes-1) )
mpp_request(:) = MPI_REQUEST_NULL
initialisation of peset(0:PESET_MAX) of type communicator and creation of a new
communicator for the group of pe of the application : peset(i)%id and
peset(i)%group
Root of IO_apps_infos%comm sends il_stackmaxd and il_stackmax to the
other pe's.
Then :
call mpp_domains_set_stack_size(il_stackmaxd)
mpp_domains_set_stack_size
: allocate mpp_domains_stack(il_stackmaxd)
initialise mpp_domains_stack_size = il_stackmaxd
call mpp_io_init(maxunit=PSMILE_IO_MAX_UNIT+4 ,maxresunit=4)
mpp_io_init
:
call mpp_init : already called, will merely return
get my number of pe among the others : pe = function mpp_pe (in module mpp_mod_oa
= pe)
get total number of pe : npes = function mpp_npes() (in
module mpp_mod_oa = npes)
call mpp_domains_init
: call
mpp_init : already called, will merely return
get my number of pe among
the others : pe = function mpp_pe (in module mpp_mod_oa
= pe)
call
mpp_domains_set_stack_size(983040) : as 983040 < il_stackmaxd
will merely return
call mpp_io_set_stack_size(131072) :
allocate( mpp_io_stack(n) )
mpp_io_stack_size = n
Then
call mpp_set_stack_size(il_stackmax)
mpp_set_stack_size
:
allocate( mpp_stack(n) )
mpp_stack_size = n