PIO  2.5.4
Functions/Subroutines
Initialize an IOSystem

Create a new IO System, designating numbers of I/O and computation tasks in Fortran. More...

Functions/Subroutines

subroutine piolib_mod::init_intracom (comp_rank, comp_comm, num_iotasks, num_aggregator, stride, rearr, iosystem, base, rearr_opts)
 Rearranger methods. More...
 
subroutine piolib_mod::init_intercom (iosystem, incomm, procs_per_component, comp_proc_list, io_proc_list, rearranger, comp_comm, io_comm)
 
subroutine piolib_mod::init_intercom_from_comms (iosystem, world_comm, comp_comms, io_comm, rearranger)
 

Detailed Description

Create a new IO System, designating numbers of I/O and computation tasks in Fortran.

Use the Fortran generic function PIO_init() to initialize the IO System. The PIO_init() function will call init_intracom().

This code from examples/f03/examplePio.F90 demonstrates how to initialize the IO system for intracom mode.

call PIO_init(this%myRank, & ! MPI rank
mpi_comm_world, & ! MPI communicator
this%niotasks, & ! Number of iotasks (ntasks/stride)
this%numAggregator, & ! number of aggregators to use
this%stride, & ! stride
pio_rearr_subset, & ! do not use any form of rearrangement
this%pioIoSystem, & ! iosystem
base=this%optBase) ! base(optional argument)

Function/Subroutine Documentation

◆ init_intercom()

subroutine piolib_mod::init_intercom ( type(iosystem_desc_t), dimension(:), intent(out)  iosystem,
integer, intent(in)  incomm,
integer, dimension(:), intent(in)  procs_per_component,
integer, dimension(:,:), intent(in)  comp_proc_list,
integer, dimension(:), intent(in)  io_proc_list,
integer, intent(in)  rearranger,
integer, dimension(:), intent(out)  comp_comm,
integer, intent(out)  io_comm 
)

Initialize the pio subsystem. This is a collective call. Input parameters are read on comp_rank=0 values on other tasks are ignored. This variation of PIO_init sets up a distinct set of tasks to handle IO, these tasks do not return from this call. Instead they go to an internal loop and wait to receive further instructions from the computational tasks.

Parameters
iosystemAn array of type iosystem_desc_t and size component_count
incommA MPI communicator which includes all tasks in the call
procs_per_componentAn integer array of tasks per computational component
comp_proc_listA 2d array of all ranks in incomm for each computational component
io_proc_listAn array of all io ranks in incomm
rearrangerThe rearranger to use (currently only PIO_BOX_REARR)
comp_commOn output the MPI comm for each computational component (MPI_COMM_NULL on tasks not in this component)
io_commOn output the MPI comm for the IO component (MPI_COMM_NULL on tasks not in io component)
Author
Jim Edwards

◆ init_intercom_from_comms()

subroutine piolib_mod::init_intercom_from_comms ( type(iosystem_desc_t), dimension(:), intent(out)  iosystem,
integer, intent(in)  world_comm,
integer, dimension(:), intent(in)  comp_comms,
integer, intent(in)  io_comm,
integer, intent(in)  rearranger 
)

Initialize the pio subsystem. This is a collective call. Input parameters are read on comp_ranks=0 and io_rank=0 values on other tasks are ignored. This variation of PIO_init uses tasks in io_comm to handle IO, these tasks do not return from this call. Instead they go to an internal loop and wait to receive further instructions from the computational tasks.

Parameters
iosystemAn array of type iosystem_desc_t and size component_count
world_commA MPI communicator which includes all tasks in the call
comp_commsOn input the MPI comm for each computational component (MPI_COMM_NULL on tasks not in this component)
io_commOn input the MPI comm for the IO component (MPI_COMM_NULL on tasks not in io component)
rearrangerThe rearranger to use (currently only PIO_BOX_REARR)
Author
Jim Edwards

◆ init_intracom()

subroutine piolib_mod::init_intracom ( integer(i4), intent(in)  comp_rank,
integer(i4), intent(in)  comp_comm,
integer(i4), intent(in)  num_iotasks,
integer(i4), intent(in)  num_aggregator,
integer(i4), intent(in)  stride,
integer(i4), intent(in)  rearr,
type (iosystem_desc_t), intent(out)  iosystem,
integer(i4), intent(in), optional  base,
type (pio_rearr_opt_t), intent(in), optional, target  rearr_opts 
)

Rearranger methods.

Initialize the pio subsystem. This is a collective call. Input parameters are read on comp_rank=0 values on other tasks are ignored. This variation of PIO_init locates the IO tasks on a subset of the compute tasks.

Parameters
comp_rankmpi rank of each participating task,
comp_commthe mpi communicator which defines the collective.
num_iotasksthe number of iotasks to define.
num_aggregatorthe mpi aggregator count
stridethe stride in the mpi rank between io tasks.
rearr- PIO_rearr_none : Do not use any form of rearrangement
  • PIO_rearr_box : Use a PIO internal box rearrangement
  • PIO_rearr_subset : Use a PIO internal subsetting rearrangement
iosystema derived type which can be used in subsequent pio operations (defined in PIO_types).
baseoptional argument can be used to offset the first io task. Since this is an MPI task number, it is zero-based (the first task is 0). The default base is task 0.
rearr_optsthe rearranger options.
Author
Jim Edwards