shared_array Module



Derived Types

type, public ::  shared_array_real_t

Components

Type Visibility Attributes Name Initial
real(kind=dp), public, pointer :: ptr(:) => null()
type(MPI_Win), public :: win
integer(kind=TagIntType), public :: tag = 0

Type-Bound Procedures

procedure, public :: shared_alloc => safe_shared_memory_alloc_real
procedure, public :: shared_dealloc => safe_shared_memory_dealloc_real
procedure, public :: sync => sync_real
procedure, public :: get_memory_demand => get_memory_demand_real

type, public ::  shared_array_int64_t

Components

Type Visibility Attributes Name Initial
integer(kind=int64), public, pointer :: ptr(:) => null()
type(MPI_Win), public :: win
integer(kind=TagIntType), public :: tag = 0

Type-Bound Procedures

procedure, public :: shared_alloc => safe_shared_memory_alloc_int64
procedure, public :: shared_dealloc => safe_shared_memory_dealloc_int64
procedure, public :: sync => sync_int64
procedure, public :: get_memory_demand => get_memory_demand_int64

type, public ::  shared_array_int32_t

Components

Type Visibility Attributes Name Initial
integer(kind=int32), public, pointer :: ptr(:) => null()
type(MPI_Win), public :: win
integer(kind=TagIntType), public :: tag = 0

Type-Bound Procedures

procedure, public :: shared_alloc => safe_shared_memory_alloc_int32
procedure, public :: shared_dealloc => safe_shared_memory_dealloc_int32
procedure, public :: sync => sync_int32
procedure, public :: get_memory_demand => get_memory_demand_int32

type, public ::  shared_array_cmplx_t

Components

Type Visibility Attributes Name Initial
complex(kind=dp), public, pointer :: ptr(:) => null()
type(MPI_Win), public :: win
integer(kind=TagIntType), public :: tag = 0

Type-Bound Procedures

procedure, public :: shared_alloc => safe_shared_memory_alloc_cmplx
procedure, public :: shared_dealloc => safe_shared_memory_dealloc_cmplx
procedure, public :: sync => sync_cmplx
procedure, public :: get_memory_demand => get_memory_demand_cmplx

type, public ::  shared_array_bool_t

Components

Type Visibility Attributes Name Initial
logical, public, pointer :: ptr(:) => null()
type(MPI_Win), public :: win
integer(kind=TagIntType), public :: tag = 0

Type-Bound Procedures

procedure, public :: shared_alloc => safe_shared_memory_alloc_bool
procedure, public :: shared_dealloc => safe_shared_memory_dealloc_bool
procedure, public :: sync => sync_bool
procedure, public :: get_memory_demand => get_memory_demand_bool

Functions

private elemental function get_memory_demand_real(this) result(res)

Arguments

Type IntentOptional Attributes Name
class(shared_array_real_t), intent(in) :: this

Return Value type(ByteSize_t)

private elemental function get_memory_demand_int64(this) result(res)

Arguments

Type IntentOptional Attributes Name
class(shared_array_int64_t), intent(in) :: this

Return Value type(ByteSize_t)

private elemental function get_memory_demand_int32(this) result(res)

Arguments

Type IntentOptional Attributes Name
class(shared_array_int32_t), intent(in) :: this

Return Value type(ByteSize_t)

private elemental function get_memory_demand_cmplx(this) result(res)

Arguments

Type IntentOptional Attributes Name
class(shared_array_cmplx_t), intent(in) :: this

Return Value type(ByteSize_t)

private elemental function get_memory_demand_bool(this) result(res)

Arguments

Type IntentOptional Attributes Name
class(shared_array_bool_t), intent(in) :: this

Return Value type(ByteSize_t)


Subroutines

private subroutine safe_shared_memory_alloc_real(this, size, name)

Wrapper for shared_allocate_mpi that tests if the pointer is associated

Arguments

Type IntentOptional Attributes Name
class(shared_array_real_t), intent(inout) :: this
integer(kind=int64), intent(in) :: size

size of the memory segment to be allocated

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

private subroutine safe_shared_memory_dealloc_real(this)

wrapper for shared_deallocate_mpi that tests if the pointer is associated

Arguments

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

private subroutine sync_real(this)

callls MPI_Win_Sync on the array’s shared memory window to sync rma This has to be called between read/write epochs to ensure all tasks of a node are looking at the same shared data

Arguments

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

private subroutine safe_shared_memory_alloc_int64(this, size, name)

Wrapper for shared_allocate_mpi that tests if the pointer is associated

Arguments

Type IntentOptional Attributes Name
class(shared_array_int64_t), intent(inout) :: this
integer(kind=int64), intent(in) :: size

size of the memory segment to be allocated

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

private subroutine safe_shared_memory_dealloc_int64(this)

wrapper for shared_deallocate_mpi that tests if the pointer is associated

Arguments

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

private subroutine sync_int64(this)

callls MPI_Win_Sync on the array’s shared memory window to sync rma This has to be called between read/write epochs to ensure all tasks of a node are looking at the same shared data

Arguments

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

private subroutine safe_shared_memory_alloc_int32(this, size, name)

Wrapper for shared_allocate_mpi that tests if the pointer is associated

Arguments

Type IntentOptional Attributes Name
class(shared_array_int32_t), intent(inout) :: this
integer(kind=int64), intent(in) :: size

size of the memory segment to be allocated

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

private subroutine safe_shared_memory_dealloc_int32(this)

wrapper for shared_deallocate_mpi that tests if the pointer is associated

Arguments

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

private subroutine sync_int32(this)

callls MPI_Win_Sync on the array’s shared memory window to sync rma This has to be called between read/write epochs to ensure all tasks of a node are looking at the same shared data

Arguments

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

private subroutine safe_shared_memory_alloc_cmplx(this, size, name)

Wrapper for shared_allocate_mpi that tests if the pointer is associated

Arguments

Type IntentOptional Attributes Name
class(shared_array_cmplx_t), intent(inout) :: this
integer(kind=int64), intent(in) :: size

size of the memory segment to be allocated

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

private subroutine safe_shared_memory_dealloc_cmplx(this)

wrapper for shared_deallocate_mpi that tests if the pointer is associated

Arguments

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

private subroutine sync_cmplx(this)

callls MPI_Win_Sync on the array’s shared memory window to sync rma This has to be called between read/write epochs to ensure all tasks of a node are looking at the same shared data

Arguments

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

private subroutine safe_shared_memory_alloc_bool(this, size, name)

Wrapper for shared_allocate_mpi that tests if the pointer is associated

Arguments

Type IntentOptional Attributes Name
class(shared_array_bool_t), intent(inout) :: this
integer(kind=int64), intent(in) :: size

size of the memory segment to be allocated

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

private subroutine safe_shared_memory_dealloc_bool(this)

wrapper for shared_deallocate_mpi that tests if the pointer is associated

Arguments

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

private subroutine sync_bool(this)

callls MPI_Win_Sync on the array’s shared memory window to sync rma This has to be called between read/write epochs to ensure all tasks of a node are looking at the same shared data

Arguments

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