parallel_obj Derived Type

type, public :: parallel_obj

Utility to handle MPI communications


Inherits

type~~parallel_obj~~InheritsGraph type~parallel_obj parallel_obj MPI_Datatype MPI_Datatype type~parallel_obj->MPI_Datatype REAL_SP, REAL_DP, REAL_WP, COMPLEX_SP, COMPLEX_DP, COMPLEX_WP, INTEGER, INT8, LOGICAL MPI_Info MPI_Info type~parallel_obj->MPI_Info mpi_info type~communicators communicators type~parallel_obj->type~communicators comm type~patch patch type~parallel_obj->type~patch rank MPI_Comm MPI_Comm type~communicators->MPI_Comm w, g

Inherited by

type~~parallel_obj~~InheritedByGraph type~parallel_obj parallel_obj type~bc_set bc_set type~bc_set->type~parallel_obj parallel type~block_obj block_obj type~bc_set->type~block_obj block type~region_obj region_obj type~bc_set->type~region_obj region type~block_obj->type~parallel_obj parallel type~case_obj case_obj type~case_obj->type~parallel_obj parallel type~case_obj->type~block_obj block type~eulerian_obj_base eulerian_obj_base type~eulerian_obj_base->type~parallel_obj parallel type~eulerian_obj_base->type~block_obj block type~eulerian_set eulerian_set type~eulerian_set->type~parallel_obj parallel type~eulerian_set->type~block_obj block type~eulerian_ptr eulerian_ptr type~eulerian_set->type~eulerian_ptr field type~h5hut_obj h5hut_obj type~h5hut_obj->type~parallel_obj parallel type~hdf5_obj hdf5_obj type~hdf5_obj->type~parallel_obj parallel type~hypre_obj hypre_obj type~hypre_obj->type~parallel_obj parallel type~hypre_obj->type~block_obj block type~eulerian_obj_i eulerian_obj_i type~hypre_obj->type~eulerian_obj_i irow type~lagrangian_set lagrangian_set type~lagrangian_set->type~parallel_obj parallel type~lagrangian_set->type~block_obj cblock, block type~monitor_set monitor_set type~monitor_set->type~parallel_obj parallel type~ngadata_obj ngadata_obj type~ngadata_obj->type~parallel_obj parallel type~ngadata_obj->type~block_obj block type~ngapart_obj ngapart_obj type~ngapart_obj->type~parallel_obj parallel type~op_obj op_obj type~op_obj->type~parallel_obj parallel type~op_obj->type~block_obj block type~op_obj->type~eulerian_obj_i mask type~silo_obj silo_obj type~silo_obj->type~parallel_obj parallel type~solid_set solid_set type~solid_set->type~parallel_obj parallel type~solid_set->type~block_obj block type~solid_obj solid_obj type~solid_set->type~solid_obj p type~solver_obj solver_obj type~solver_obj->type~parallel_obj parallel type~cdifs_case_obj cdifs_case_obj type~cdifs_case_obj->type~case_obj type~cdifs_obj cdifs_obj type~cdifs_obj->type~bc_set bcs type~cdifs_obj->type~block_obj block type~cdifs_obj->type~eulerian_set fields type~cdifs_obj->type~hypre_obj hypre type~cdifs_obj->type~monitor_set monitors, pmonitor type~cdifs_obj->type~op_obj op type~cdifs_obj->type~solver_obj type~cdifs_obj->type~cdifs_case_obj case type~cdifs_obj->type~eulerian_obj_i maskV type~eulerian_obj_r eulerian_obj_r type~cdifs_obj->type~eulerian_obj_r V, P, dP, SA, ibVF, ibF, ibN, Vold, resV, rhs, divu, Vm type~marker_set marker_set type~cdifs_obj->type~marker_set IB type~respart_set ResPart_set type~cdifs_obj->type~respart_set RP type~eulerian_obj_i->type~eulerian_obj_base type~eulerian_obj_r->type~eulerian_obj_base type~eulerian_ptr->type~eulerian_obj_base p type~grans_case_obj grans_case_obj type~grans_case_obj->type~case_obj type~grans_obj grans_obj type~grans_obj->type~block_obj block type~grans_obj->type~eulerian_set fields type~grans_obj->type~hypre_obj hypre type~grans_obj->type~monitor_set monitors type~grans_obj->type~solver_obj type~grans_obj->type~eulerian_obj_r ibVF, PVF, SA, Fp type~grans_obj->type~grans_case_obj case type~grans_obj->type~marker_set IB type~particle_set particle_set type~grans_obj->type~particle_set PP type~grans_obj->type~respart_set RP type~marker_set->type~lagrangian_set type~marker_set->type~monitor_set monitors type~marker_set->type~op_obj op type~particle_set->type~lagrangian_set type~region_obj->type~block_obj region type~respart_set->type~lagrangian_set type~respart_set->type~monitor_set monitors type~respart_set->type~op_obj op type~respart_set->type~marker_set ib type~solid_obj->type~marker_set

Components

Type Visibility Attributes Name Initial
type(MPI_Datatype), public :: COMPLEX_DP
type(MPI_Datatype), public :: COMPLEX_SP
type(MPI_Datatype), public :: COMPLEX_WP
type(MPI_Datatype), public :: INT8
type(MPI_Datatype), public :: INTEGER
type(MPI_Datatype), public :: LOGICAL
type(MPI_Datatype), public :: REAL_DP
type(MPI_Datatype), public :: REAL_SP
type(MPI_Datatype), public :: REAL_WP
type(communicators), public :: comm

Communicators

type(MPI_Info), public :: mpi_info
character(len=str8), public :: mpiiofs
integer, public :: np(3)

Number of ranks in each direction

integer, public :: nproc

Total number of ranks

integer, public :: npx

Number of ranks in the x direction

integer, public :: npy

Number of ranks in the y direction

integer, public :: npz

Number of ranks in the z direction

type(patch), public :: rank

Rank and grid decompostion info


Type-Bound Procedures

procedure, public, nopass :: Finalize => parallel_obj_final

  • private subroutine parallel_obj_final()

    Finalize MPI and the parallel environment

    Arguments

    None

procedure, public :: Initialize => parallel_obj_init

  • private subroutine parallel_obj_init(this)

    Initialize the parallel environement

    Arguments

    Type IntentOptional Attributes Name
    class(parallel_obj), intent(inout) :: this

    Parallel object

procedure, public :: SetMPIFSHints => parallel_obj_SetMPIFSHints

procedure, public :: Stop => parallel_obj_stop

  • private subroutine parallel_obj_stop(this, msg)

    Subroutine to gracefully stop the execution with an optional error message.

    Arguments

    Type IntentOptional Attributes Name
    class(parallel_obj), intent(inout) :: this

    Parallel object

    character(len=*), intent(in), optional :: msg

    Error message

procedure, public, nopass :: Time => parallel_obj_time

  • private function parallel_obj_time() result(wtime)

    Returns the elapsed time since an arbitrary origin. Note that different ranks return different WTIMEs

    Arguments

    None

    Return Value real(kind=WP)

procedure, public :: Topology => parallel_obj_topology

  • private subroutine parallel_obj_topology(this, is_periodic, Ng, Nb)

    Builds a Cartesian topolgy with MPI

    Arguments

    Type IntentOptional Attributes Name
    class(parallel_obj), intent(inout) :: this

    Parallel object

    logical, intent(in) :: is_periodic(3)

    Periodicity

    integer, intent(in) :: Ng(3) Read more…
    integer, intent(in), optional :: Nb(3)

    Explicit block decomposition

Broadcast to all ranks

  • private subroutine parallel_obj_bcast_int_0d(this, A)

    Arguments

    Type IntentOptional Attributes Name
    class(parallel_obj), intent(inout) :: this

    Parallel object

    integer, intent(in) :: A
  • private subroutine parallel_obj_bcast_int_1d(this, A)

    Arguments

    Type IntentOptional Attributes Name
    class(parallel_obj), intent(inout) :: this

    Parallel object

    integer, intent(in), dimension(:) :: A
  • private subroutine parallel_obj_bcast_int_2d(this, A)

    Arguments

    Type IntentOptional Attributes Name
    class(parallel_obj), intent(inout) :: this

    Parallel object

    integer, intent(in), dimension(:,:) :: A
  • private subroutine parallel_obj_bcast_int_3d(this, A)

    Arguments

    Type IntentOptional Attributes Name
    class(parallel_obj), intent(inout) :: this

    Parallel object

    integer, intent(in), dimension(:,:,:) :: A
  • private subroutine parallel_obj_bcast_real_0d(this, A)

    Arguments

    Type IntentOptional Attributes Name
    class(parallel_obj), intent(inout) :: this

    Parallel object

    real(kind=WP), intent(in) :: A
  • private subroutine parallel_obj_bcast_real_1d(this, A)

    Arguments

    Type IntentOptional Attributes Name
    class(parallel_obj), intent(inout) :: this

    Parallel object

    real(kind=WP), intent(in), dimension(:) :: A
  • private subroutine parallel_obj_bcast_real_2d(this, A)

    Arguments

    Type IntentOptional Attributes Name
    class(parallel_obj), intent(inout) :: this

    Parallel object

    real(kind=WP), dimension(:,:) :: A
  • private subroutine parallel_obj_bcast_real_3d(this, A)

    Arguments

    Type IntentOptional Attributes Name
    class(parallel_obj), intent(inout) :: this

    Parallel object

    real(kind=WP), intent(in), dimension(:,:,:) :: A
  • private subroutine parallel_obj_bcast_char(this, A)

    Arguments

    Type IntentOptional Attributes Name
    class(parallel_obj), intent(inout) :: this

    Parallel object

    character(len=*), intent(in) :: A

Compute the maximum across all ranks

  • private subroutine parallel_obj_max_int_0d(this, A, B)

    Arguments

    Type IntentOptional Attributes Name
    class(parallel_obj), intent(inout) :: this

    Parallel object

    integer, intent(in) :: A
    integer, intent(out) :: B
  • private subroutine parallel_obj_max_int_1d(this, A, B)

    Arguments

    Type IntentOptional Attributes Name
    class(parallel_obj), intent(inout) :: this

    Parallel object

    integer, intent(in), dimension(:) :: A
    integer, intent(out), dimension(:) :: B
  • private subroutine parallel_obj_max_real_0d(this, A, B)

    Arguments

    Type IntentOptional Attributes Name
    class(parallel_obj), intent(inout) :: this

    Parallel object

    real(kind=WP), intent(in) :: A
    real(kind=WP), intent(out) :: B
  • private subroutine parallel_obj_max_real_1d(this, A, B)

    Arguments

    Type IntentOptional Attributes Name
    class(parallel_obj), intent(inout) :: this

    Parallel object

    real(kind=wp), intent(in), dimension(:) :: A
    real(kind=wp), intent(out), dimension(:) :: B

Compute the minimum across all ranks

  • private subroutine parallel_obj_min_int_0d(this, A, B)

    Arguments

    Type IntentOptional Attributes Name
    class(parallel_obj), intent(inout) :: this

    Parallel object

    integer, intent(in) :: A
    integer, intent(out) :: B
  • private subroutine parallel_obj_min_int_1d(this, A, B)

    Arguments

    Type IntentOptional Attributes Name
    class(parallel_obj), intent(inout) :: this

    Parallel object

    integer, intent(in), dimension(:) :: A
    integer, intent(out), dimension(:) :: B
  • private subroutine parallel_obj_min_real_0d(this, A, B)

    Arguments

    Type IntentOptional Attributes Name
    class(parallel_obj), intent(inout) :: this

    Parallel object

    real(kind=WP), intent(in) :: A
    real(kind=WP), intent(out) :: B
  • private subroutine parallel_obj_min_real_1d(this, A, B)

    Arguments

    Type IntentOptional Attributes Name
    class(parallel_obj), intent(inout) :: this

    Parallel object

    real(kind=wp), intent(in), dimension(:) :: A
    real(kind=wp), intent(out), dimension(:) :: B

Sum across all ranks

  • private subroutine parallel_obj_sum_int_0d(this, A, B)

    Arguments

    Type IntentOptional Attributes Name
    class(parallel_obj), intent(inout) :: this

    Parallel object

    integer, intent(in) :: A
    integer, intent(out) :: B
  • private subroutine parallel_obj_sum_int_1d(this, A, B)

    Arguments

    Type IntentOptional Attributes Name
    class(parallel_obj), intent(inout) :: this

    Parallel object

    integer, intent(in), dimension(:) :: A
    integer, intent(out), dimension(:) :: B
  • private subroutine parallel_obj_sum_int_2d(this, A, B)

    Arguments

    Type IntentOptional Attributes Name
    class(parallel_obj), intent(inout) :: this

    Parallel object

    integer, intent(in), dimension(:,:) :: A
    integer, intent(out), dimension(:,:) :: B
  • private subroutine parallel_obj_sum_int_3d(this, A, B)

    Arguments

    Type IntentOptional Attributes Name
    class(parallel_obj), intent(inout) :: this

    Parallel object

    integer, intent(in), dimension(:,:,:) :: A
    integer, intent(out), dimension(:,:,:) :: B
  • private subroutine parallel_obj_sum_real_0d(this, A, B)

    Arguments

    Type IntentOptional Attributes Name
    class(parallel_obj), intent(inout) :: this

    Parallel object

    real(kind=WP), intent(in) :: A
    real(kind=WP), intent(out) :: B
  • private subroutine parallel_obj_sum_real_1d(this, A, B)

    Arguments

    Type IntentOptional Attributes Name
    class(parallel_obj), intent(inout) :: this

    Parallel object

    real(kind=WP), intent(in), dimension(:) :: A
    real(kind=WP), intent(out), dimension(:) :: B
  • private subroutine parallel_obj_sum_real_2d(this, A, B)

    Arguments

    Type IntentOptional Attributes Name
    class(parallel_obj), intent(inout) :: this

    Parallel object

    real(kind=WP), intent(in), dimension(:,:) :: A
    real(kind=WP), intent(out), dimension(:,:) :: B
  • private subroutine parallel_obj_sum_real_3d(this, A, B)

    Arguments

    Type IntentOptional Attributes Name
    class(parallel_obj), intent(inout) :: this

    Parallel object

    real(kind=WP), intent(in), dimension(:,:,:) :: A
    real(kind=WP), intent(out), dimension(:,:,:) :: B

procedure, private :: parallel_obj_bcast_char

  • private subroutine parallel_obj_bcast_char(this, A)

    Arguments

    Type IntentOptional Attributes Name
    class(parallel_obj), intent(inout) :: this

    Parallel object

    character(len=*), intent(in) :: A

procedure, private :: parallel_obj_bcast_int_0d

  • private subroutine parallel_obj_bcast_int_0d(this, A)

    Arguments

    Type IntentOptional Attributes Name
    class(parallel_obj), intent(inout) :: this

    Parallel object

    integer, intent(in) :: A

procedure, private :: parallel_obj_bcast_int_1d

  • private subroutine parallel_obj_bcast_int_1d(this, A)

    Arguments

    Type IntentOptional Attributes Name
    class(parallel_obj), intent(inout) :: this

    Parallel object

    integer, intent(in), dimension(:) :: A

procedure, private :: parallel_obj_bcast_int_2d

  • private subroutine parallel_obj_bcast_int_2d(this, A)

    Arguments

    Type IntentOptional Attributes Name
    class(parallel_obj), intent(inout) :: this

    Parallel object

    integer, intent(in), dimension(:,:) :: A

procedure, private :: parallel_obj_bcast_int_3d

  • private subroutine parallel_obj_bcast_int_3d(this, A)

    Arguments

    Type IntentOptional Attributes Name
    class(parallel_obj), intent(inout) :: this

    Parallel object

    integer, intent(in), dimension(:,:,:) :: A

procedure, private :: parallel_obj_bcast_real_0d

  • private subroutine parallel_obj_bcast_real_0d(this, A)

    Arguments

    Type IntentOptional Attributes Name
    class(parallel_obj), intent(inout) :: this

    Parallel object

    real(kind=WP), intent(in) :: A

procedure, private :: parallel_obj_bcast_real_1d

  • private subroutine parallel_obj_bcast_real_1d(this, A)

    Arguments

    Type IntentOptional Attributes Name
    class(parallel_obj), intent(inout) :: this

    Parallel object

    real(kind=WP), intent(in), dimension(:) :: A

procedure, private :: parallel_obj_bcast_real_2d

  • private subroutine parallel_obj_bcast_real_2d(this, A)

    Arguments

    Type IntentOptional Attributes Name
    class(parallel_obj), intent(inout) :: this

    Parallel object

    real(kind=WP), dimension(:,:) :: A

procedure, private :: parallel_obj_bcast_real_3d

  • private subroutine parallel_obj_bcast_real_3d(this, A)

    Arguments

    Type IntentOptional Attributes Name
    class(parallel_obj), intent(inout) :: this

    Parallel object

    real(kind=WP), intent(in), dimension(:,:,:) :: A

procedure, private :: parallel_obj_max_int_0d

  • private subroutine parallel_obj_max_int_0d(this, A, B)

    Arguments

    Type IntentOptional Attributes Name
    class(parallel_obj), intent(inout) :: this

    Parallel object

    integer, intent(in) :: A
    integer, intent(out) :: B

procedure, private :: parallel_obj_max_int_1d

  • private subroutine parallel_obj_max_int_1d(this, A, B)

    Arguments

    Type IntentOptional Attributes Name
    class(parallel_obj), intent(inout) :: this

    Parallel object

    integer, intent(in), dimension(:) :: A
    integer, intent(out), dimension(:) :: B

procedure, private :: parallel_obj_max_real_0d

  • private subroutine parallel_obj_max_real_0d(this, A, B)

    Arguments

    Type IntentOptional Attributes Name
    class(parallel_obj), intent(inout) :: this

    Parallel object

    real(kind=WP), intent(in) :: A
    real(kind=WP), intent(out) :: B

procedure, private :: parallel_obj_max_real_1d

  • private subroutine parallel_obj_max_real_1d(this, A, B)

    Arguments

    Type IntentOptional Attributes Name
    class(parallel_obj), intent(inout) :: this

    Parallel object

    real(kind=wp), intent(in), dimension(:) :: A
    real(kind=wp), intent(out), dimension(:) :: B

procedure, private :: parallel_obj_min_int_0d

  • private subroutine parallel_obj_min_int_0d(this, A, B)

    Arguments

    Type IntentOptional Attributes Name
    class(parallel_obj), intent(inout) :: this

    Parallel object

    integer, intent(in) :: A
    integer, intent(out) :: B

procedure, private :: parallel_obj_min_int_1d

  • private subroutine parallel_obj_min_int_1d(this, A, B)

    Arguments

    Type IntentOptional Attributes Name
    class(parallel_obj), intent(inout) :: this

    Parallel object

    integer, intent(in), dimension(:) :: A
    integer, intent(out), dimension(:) :: B

procedure, private :: parallel_obj_min_real_0d

  • private subroutine parallel_obj_min_real_0d(this, A, B)

    Arguments

    Type IntentOptional Attributes Name
    class(parallel_obj), intent(inout) :: this

    Parallel object

    real(kind=WP), intent(in) :: A
    real(kind=WP), intent(out) :: B

procedure, private :: parallel_obj_min_real_1d

  • private subroutine parallel_obj_min_real_1d(this, A, B)

    Arguments

    Type IntentOptional Attributes Name
    class(parallel_obj), intent(inout) :: this

    Parallel object

    real(kind=wp), intent(in), dimension(:) :: A
    real(kind=wp), intent(out), dimension(:) :: B

procedure, private :: parallel_obj_sum_int_0d

  • private subroutine parallel_obj_sum_int_0d(this, A, B)

    Arguments

    Type IntentOptional Attributes Name
    class(parallel_obj), intent(inout) :: this

    Parallel object

    integer, intent(in) :: A
    integer, intent(out) :: B

procedure, private :: parallel_obj_sum_int_1d

  • private subroutine parallel_obj_sum_int_1d(this, A, B)

    Arguments

    Type IntentOptional Attributes Name
    class(parallel_obj), intent(inout) :: this

    Parallel object

    integer, intent(in), dimension(:) :: A
    integer, intent(out), dimension(:) :: B

procedure, private :: parallel_obj_sum_int_2d

  • private subroutine parallel_obj_sum_int_2d(this, A, B)

    Arguments

    Type IntentOptional Attributes Name
    class(parallel_obj), intent(inout) :: this

    Parallel object

    integer, intent(in), dimension(:,:) :: A
    integer, intent(out), dimension(:,:) :: B

procedure, private :: parallel_obj_sum_int_3d

  • private subroutine parallel_obj_sum_int_3d(this, A, B)

    Arguments

    Type IntentOptional Attributes Name
    class(parallel_obj), intent(inout) :: this

    Parallel object

    integer, intent(in), dimension(:,:,:) :: A
    integer, intent(out), dimension(:,:,:) :: B

procedure, private :: parallel_obj_sum_real_0d

  • private subroutine parallel_obj_sum_real_0d(this, A, B)

    Arguments

    Type IntentOptional Attributes Name
    class(parallel_obj), intent(inout) :: this

    Parallel object

    real(kind=WP), intent(in) :: A
    real(kind=WP), intent(out) :: B

procedure, private :: parallel_obj_sum_real_1d

  • private subroutine parallel_obj_sum_real_1d(this, A, B)

    Arguments

    Type IntentOptional Attributes Name
    class(parallel_obj), intent(inout) :: this

    Parallel object

    real(kind=WP), intent(in), dimension(:) :: A
    real(kind=WP), intent(out), dimension(:) :: B

procedure, private :: parallel_obj_sum_real_2d

  • private subroutine parallel_obj_sum_real_2d(this, A, B)

    Arguments

    Type IntentOptional Attributes Name
    class(parallel_obj), intent(inout) :: this

    Parallel object

    real(kind=WP), intent(in), dimension(:,:) :: A
    real(kind=WP), intent(out), dimension(:,:) :: B

procedure, private :: parallel_obj_sum_real_3d

  • private subroutine parallel_obj_sum_real_3d(this, A, B)

    Arguments

    Type IntentOptional Attributes Name
    class(parallel_obj), intent(inout) :: this

    Parallel object

    real(kind=WP), intent(in), dimension(:,:,:) :: A
    real(kind=WP), intent(out), dimension(:,:,:) :: B