GBTOlib: library for evaluation of molecular integrals in mixed Gaussian / B-spline basis  111
Data Types | Functions/Subroutines | Variables
mpi_memory_gbl Module Reference

Local and shared memory allocation and deallocation routines. More...

Data Types

interface  mpi_memory_allocate_integer
 
interface  mpi_memory_allocate_integer_2dim
 
interface  mpi_memory_allocate_real
 
interface  mpi_memory_allocate_real_2dim
 
interface  mpi_memory_deallocate_integer
 
interface  mpi_memory_deallocate_integer_2dim
 
interface  mpi_memory_deallocate_real
 
interface  mpi_memory_deallocate_real_2dim
 

Functions/Subroutines

subroutine mpi_memory_setup
 Dummy initialization routine. More...
 
integer function mpi_memory_allocate_integer_alc (array, nelem, comm)
 Allocate 1D allocatable integer array. More...
 
integer function mpi_memory_allocate_int32_2dim_alc (array, nelem1, nelem2, comm)
 Allocate 2D allocatable 32-bit integer array. More...
 
integer function mpi_memory_allocate_int64_2dim_alc (array, nelem1, nelem2, comm)
 Allocate 2D allocatable 64-bit integer array. More...
 
integer function mpi_memory_allocate_real_wp_alc (array, nelem, comm)
 Allocate 1D allocatable real(wp) array. More...
 
integer function mpi_memory_allocate_real_ep_alc (array, nelem, comm)
 Allocate 1D allocatable real(ep) array. More...
 
integer function mpi_memory_allocate_real_2dim_wp_alc (array, nelem1, nelem2, comm)
 Allocate 2D allocatable real(wp) array. More...
 
integer function mpi_memory_allocate_real_2dim_ep_alc (array, nelem1, nelem2, comm)
 Allocate 2D allocatable real(ep) array. More...
 
subroutine mpi_memory_deallocate_real_wp_alc (array, nelem, window, comm)
 Deallocate 1D allocatable real(wp) array. More...
 
subroutine mpi_memory_deallocate_real_ep_alc (array, nelem, window, comm)
 Deallocate 1D allocatable real(wp) array. More...
 
subroutine mpi_memory_deallocate_int32_2dim_alc (array, nelem, window, comm)
 Deallocate 2D allocatable 32-bit integer array. More...
 
subroutine mpi_memory_deallocate_int64_2dim_alc (array, nelem, window, comm)
 Deallocate 2D allocatable 64-bit integer array. More...
 
subroutine mpi_memory_deallocate_integer_alc (array, nelem, window, comm)
 Deallocate 1D allocatable default integer array. More...
 
subroutine mpi_memory_deallocate_real_2dim_wp_alc (array, nelem, window, comm)
 Deallocate 2D allocatable real(wp) array. More...
 
subroutine mpi_memory_deallocate_real_2dim_ep_alc (array, nelem, window, comm)
 Deallocate 2D allocatable real(ep) array. More...
 
subroutine mpi_memory_allocate_shared_bytes (alloc_size, groupcomm, baseptr, win)
 Shared part of the shared memory allocation routines. More...
 
integer function mpi_memory_allocate_integer_ptr (array, nelem, comm)
 Deallocate 1D shared MPI default integer array pointer. More...
 
integer function mpi_memory_allocate_int32_2dim_ptr (array, nelem1, nelem2, comm)
 Allocate 2D shared MPI default integer array pointer. More...
 
integer function mpi_memory_allocate_int64_2dim_ptr (array, nelem1, nelem2, comm)
 Allocate 2D shared MPI 64-bit integer array pointer. More...
 
integer function mpi_memory_allocate_real_wp_ptr (array, nelem, comm)
 Allocate 1D shared MPI real(wp) array pointer. More...
 
integer function mpi_memory_allocate_real_ep_ptr (array, nelem, comm)
 Allocate 1D shared MPI real(ep) array pointer. More...
 
integer function mpi_memory_allocate_real_2dim_wp_ptr (array, nelem1, nelem2, comm)
 Allocate 2D shared MPI real(wp) array pointer. More...
 
integer function mpi_memory_allocate_real_2dim_ep_ptr (array, nelem1, nelem2, comm)
 Allocate 2D shared MPI real(ep) array pointer. More...
 
subroutine mpi_memory_deallocate_real_wp_ptr (array, nelem, window, comm)
 Deallocate 1D shared MPI real(wp) array pointer. More...
 
subroutine mpi_memory_deallocate_real_ep_ptr (array, nelem, window, comm)
 Deallocate 1D shared MPI real(ep) array pointer. More...
 
subroutine mpi_memory_deallocate_int32_2dim_ptr (array, nelem, window, comm)
 Deallocate 2D shared MPI 32-bit integer array pointer. More...
 
subroutine mpi_memory_deallocate_int64_2dim_ptr (array, nelem, window, comm)
 Deallocate 2D shared MPI 64-bit integer array pointer. More...
 
subroutine mpi_memory_deallocate_integer_ptr (array, nelem, window, comm)
 Deallocate 1D shared MPI integer array pointer. More...
 
subroutine mpi_memory_deallocate_real_2dim_wp_ptr (array, nelem, window, comm)
 Deallocate 2D shared MPI real(wp) array pointer. More...
 
subroutine mpi_memory_deallocate_real_2dim_ep_ptr (array, nelem, window, comm)
 Deallocate 2D shared MPI real(ep) array pointer. More...
 
subroutine mpi_memory_synchronize (window, comm)
 MPI shared memory barrier. More...
 
subroutine mpi_memory_win_free (window, ierror)
 MPI shared memory deallocation. More...
 

Variables

integer(kind=mpiint), parameter local_master = 0
 

Detailed Description

Local and shared memory allocation and deallocation routines.

Authors
Z Masin, J Benda
Date
2017 - 2019

This module provides convenience wrappers around memory allocation calls. All interfaces support three scenarios:

  1. The parameter is an allocatable array. The (de)allocation will then use the standard Fortran statement (DE)ALLOCATE. The (de)allocated array is local to every process that calls the interface.
  2. The parameter is a pointer to array and shared_enabled is .false.. This will have the same effect as above.
  3. The parameter is a pointer to array and shared_enabled is .true.. This will (de)allocate a single chunk of memory shared by all processes that call the interface.
Warning
This module is also used by SCATCI but always in DOUBLE PRECISION. However, SCATCI must always be linked to the integral library of precision used to calculate the integrals file. Therefore, in order to ensure correct functionality of SCATCI we need to ensure this module supports calls to both DOUBLE and QUAD precision MPI routines within the same program run. This is achieved by interfacing all routines manipulating floating point variables for both wp and ep precisions.
Note
05/02/2019 - Jakub Benda: Split subroutines into generic pairs (ALLOCATABLE/POINTER). This is to allow allocation of both types with this module and hence support both local (ALLOCATABLE) and shared (POINTER) arrays.
24/02/2019 - Jakub Benda: Allow operation on user-provided MPI communicators.

Function/Subroutine Documentation

◆ mpi_memory_allocate_int32_2dim_alc()

integer function mpi_memory_gbl::mpi_memory_allocate_int32_2dim_alc ( integer(int32), dimension(:,:), intent(inout), allocatable  array,
integer, intent(in)  nelem1,
integer, intent(in)  nelem2,
integer(mpiint), intent(in), optional  comm 
)

Allocate 2D allocatable 32-bit integer array.

Author
Z Masin, J Benda
Date
2017 - 2020
Here is the call graph for this function:

◆ mpi_memory_allocate_int32_2dim_ptr()

integer function mpi_memory_gbl::mpi_memory_allocate_int32_2dim_ptr ( integer(int32), dimension(:,:), intent(inout), pointer  array,
integer, intent(in)  nelem1,
integer, intent(in)  nelem2,
integer(mpiint), intent(in), optional  comm 
)

Allocate 2D shared MPI default integer array pointer.

Author
Z Masin, J Benda
Date
2017 - 2019

If the sub-group communicator 'comm' is not given, then the memory will be allocated on 'shared_communicator', which is set up by mpi_mod.

Here is the call graph for this function:

◆ mpi_memory_allocate_int64_2dim_alc()

integer function mpi_memory_gbl::mpi_memory_allocate_int64_2dim_alc ( integer(int64), dimension(:,:), intent(inout), allocatable  array,
integer, intent(in)  nelem1,
integer, intent(in)  nelem2,
integer(mpiint), intent(in), optional  comm 
)

Allocate 2D allocatable 64-bit integer array.

Author
J Benda
Date
2020
Here is the call graph for this function:

◆ mpi_memory_allocate_int64_2dim_ptr()

integer function mpi_memory_gbl::mpi_memory_allocate_int64_2dim_ptr ( integer(int64), dimension(:,:), intent(inout), pointer  array,
integer, intent(in)  nelem1,
integer, intent(in)  nelem2,
integer(mpiint), intent(in), optional  comm 
)

Allocate 2D shared MPI 64-bit integer array pointer.

Author
J Benda
Date
2020

If the sub-group communicator 'comm' is not given, then the memory will be allocated on 'shared_communicator', which is set up by mpi_mod.

Here is the call graph for this function:

◆ mpi_memory_allocate_integer_alc()

integer function mpi_memory_gbl::mpi_memory_allocate_integer_alc ( integer, dimension(:), intent(inout), allocatable  array,
integer, intent(in)  nelem,
integer(mpiint), intent(in), optional  comm 
)

Allocate 1D allocatable integer array.

Author
Z Masin
Date
2017
Here is the call graph for this function:

◆ mpi_memory_allocate_integer_ptr()

integer function mpi_memory_gbl::mpi_memory_allocate_integer_ptr ( integer, dimension(:), intent(inout), pointer  array,
integer, intent(in)  nelem,
integer(mpiint), intent(in), optional  comm 
)

Deallocate 1D shared MPI default integer array pointer.

Authors
Z Masin, J Benda
Date
2017 - 2019

If the sub-group communicator 'comm' is not given, then the memory will be allocated on 'shared_communicator', which is set up by mpi_mod.

Here is the call graph for this function:

◆ mpi_memory_allocate_real_2dim_ep_alc()

integer function mpi_memory_gbl::mpi_memory_allocate_real_2dim_ep_alc ( real(ep), dimension(:,:), intent(inout), allocatable  array,
integer, intent(in)  nelem1,
integer, intent(in)  nelem2,
integer(mpiint), intent(in), optional  comm 
)

Allocate 2D allocatable real(ep) array.

Author
Z Masin, J Benda
Date
2017 - 2019
Here is the call graph for this function:

◆ mpi_memory_allocate_real_2dim_ep_ptr()

integer function mpi_memory_gbl::mpi_memory_allocate_real_2dim_ep_ptr ( real(ep), dimension(:,:), intent(inout), pointer  array,
integer, intent(in)  nelem1,
integer, intent(in)  nelem2,
integer(mpiint), intent(in), optional  comm 
)

Allocate 2D shared MPI real(ep) array pointer.

Author
Z Masin, J Benda
Date
2017 - 2019

If the sub-group communicator 'comm' is not given, then the memory will be allocated on 'shared_communicator', which is set up by mpi_mod.

Here is the call graph for this function:

◆ mpi_memory_allocate_real_2dim_wp_alc()

integer function mpi_memory_gbl::mpi_memory_allocate_real_2dim_wp_alc ( real(wp), dimension(:,:), intent(inout), allocatable  array,
integer, intent(in)  nelem1,
integer, intent(in)  nelem2,
integer(mpiint), intent(in), optional  comm 
)

Allocate 2D allocatable real(wp) array.

Author
Z Masin, J Benda
Date
2017 - 2019
Here is the call graph for this function:

◆ mpi_memory_allocate_real_2dim_wp_ptr()

integer function mpi_memory_gbl::mpi_memory_allocate_real_2dim_wp_ptr ( real(wp), dimension(:,:), intent(inout), pointer  array,
integer, intent(in)  nelem1,
integer, intent(in)  nelem2,
integer(mpiint), intent(in), optional  comm 
)

Allocate 2D shared MPI real(wp) array pointer.

Author
Z Masin, J Benda
Date
2017 - 2019

If the sub-group communicator 'comm' is not given, then the memory will be allocated on 'shared_communicator', which is set up by mpi_mod.

Here is the call graph for this function:

◆ mpi_memory_allocate_real_ep_alc()

integer function mpi_memory_gbl::mpi_memory_allocate_real_ep_alc ( real(ep), dimension(:), intent(inout), allocatable  array,
integer, intent(in)  nelem,
integer(mpiint), intent(in), optional  comm 
)

Allocate 1D allocatable real(ep) array.

Author
Z Masin, J Benda
Date
2017 - 2019
Here is the call graph for this function:

◆ mpi_memory_allocate_real_ep_ptr()

integer function mpi_memory_gbl::mpi_memory_allocate_real_ep_ptr ( real(ep), dimension(:), intent(inout), pointer  array,
integer, intent(in)  nelem,
integer(mpiint), intent(in), optional  comm 
)

Allocate 1D shared MPI real(ep) array pointer.

Author
Z Masin, J Benda
Date
2017 - 2019

If the sub-group communicator 'comm' is not given, then the memory will be allocated on 'shared_communicator', which is set up by mpi_mod.

Here is the call graph for this function:

◆ mpi_memory_allocate_real_wp_alc()

integer function mpi_memory_gbl::mpi_memory_allocate_real_wp_alc ( real(wp), dimension(:), intent(inout), allocatable  array,
integer, intent(in)  nelem,
integer(mpiint), intent(in), optional  comm 
)

Allocate 1D allocatable real(wp) array.

Author
Z Masin, J Benda
Date
2017 - 2019
Here is the call graph for this function:

◆ mpi_memory_allocate_real_wp_ptr()

integer function mpi_memory_gbl::mpi_memory_allocate_real_wp_ptr ( real(wp), dimension(:), intent(inout), pointer  array,
integer, intent(in)  nelem,
integer(mpiint), intent(in), optional  comm 
)

Allocate 1D shared MPI real(wp) array pointer.

Author
Z Masin, J Benda
Date
2017 - 2019

If the sub-group communicator 'comm' is not given, then the memory will be allocated on 'shared_communicator', which is set up by mpi_mod.

Here is the call graph for this function:

◆ mpi_memory_allocate_shared_bytes()

subroutine mpi_memory_gbl::mpi_memory_allocate_shared_bytes ( integer(mpiaddr), intent(in)  alloc_size,
integer(mpiint), intent(in)  groupcomm,
type(c_ptr), intent(out)  baseptr,
integer(mpiint), intent(out)  win 
)

Shared part of the shared memory allocation routines.

Authors
Z Masin, J Benda
Date
2017 - 2019

Allocates the given amount of bytes in the MPI shared memory and retrieves the (local master's) pointer to the beginning of the allocated chunk for all processes (rather than pointers to sections associated with them).

Here is the call graph for this function:

◆ mpi_memory_deallocate_int32_2dim_alc()

subroutine mpi_memory_gbl::mpi_memory_deallocate_int32_2dim_alc ( integer(int32), dimension(:,:), intent(inout), allocatable  array,
integer, intent(in)  nelem,
integer, intent(in)  window,
integer(mpiint), intent(in), optional  comm 
)

Deallocate 2D allocatable 32-bit integer array.

Author
Z Masin, J Benda
Date
2017 - 2020

◆ mpi_memory_deallocate_int32_2dim_ptr()

subroutine mpi_memory_gbl::mpi_memory_deallocate_int32_2dim_ptr ( integer(int32), dimension(:,:), intent(inout), pointer  array,
integer, intent(in)  nelem,
integer, intent(in)  window,
integer(mpiint), intent(in), optional  comm 
)

Deallocate 2D shared MPI 32-bit integer array pointer.

Author
Z Masin, J Benda
Date
2017 - 2020
Here is the call graph for this function:

◆ mpi_memory_deallocate_int64_2dim_alc()

subroutine mpi_memory_gbl::mpi_memory_deallocate_int64_2dim_alc ( integer(int64), dimension(:,:), intent(inout), allocatable  array,
integer, intent(in)  nelem,
integer, intent(in)  window,
integer(mpiint), intent(in), optional  comm 
)

Deallocate 2D allocatable 64-bit integer array.

Author
J Benda
Date
2020

◆ mpi_memory_deallocate_int64_2dim_ptr()

subroutine mpi_memory_gbl::mpi_memory_deallocate_int64_2dim_ptr ( integer(int64), dimension(:,:), intent(inout), pointer  array,
integer, intent(in)  nelem,
integer, intent(in)  window,
integer(mpiint), intent(in), optional  comm 
)

Deallocate 2D shared MPI 64-bit integer array pointer.

Author
J Benda
Date
2020
Here is the call graph for this function:

◆ mpi_memory_deallocate_integer_alc()

subroutine mpi_memory_gbl::mpi_memory_deallocate_integer_alc ( integer, dimension(:), intent(inout), allocatable  array,
integer, intent(in)  nelem,
integer, intent(in)  window,
integer(mpiint), intent(in), optional  comm 
)

Deallocate 1D allocatable default integer array.

Author
Z Masin
Date
2017

◆ mpi_memory_deallocate_integer_ptr()

subroutine mpi_memory_gbl::mpi_memory_deallocate_integer_ptr ( integer, dimension(:), intent(inout), pointer  array,
integer, intent(in)  nelem,
integer, intent(in)  window,
integer(mpiint), intent(in), optional  comm 
)

Deallocate 1D shared MPI integer array pointer.

Author
Z Masin
Date
2017
Here is the call graph for this function:

◆ mpi_memory_deallocate_real_2dim_ep_alc()

subroutine mpi_memory_gbl::mpi_memory_deallocate_real_2dim_ep_alc ( real(ep), dimension(:,:), intent(inout), allocatable  array,
integer, intent(in)  nelem,
integer, intent(in)  window,
integer(mpiint), intent(in), optional  comm 
)

Deallocate 2D allocatable real(ep) array.

Author
Z Masin
Date
2017

◆ mpi_memory_deallocate_real_2dim_ep_ptr()

subroutine mpi_memory_gbl::mpi_memory_deallocate_real_2dim_ep_ptr ( real(ep), dimension(:,:), intent(inout), pointer  array,
integer, intent(in)  nelem,
integer, intent(in)  window,
integer(mpiint), intent(in), optional  comm 
)

Deallocate 2D shared MPI real(ep) array pointer.

Author
Z Masin
Date
2017
Here is the call graph for this function:

◆ mpi_memory_deallocate_real_2dim_wp_alc()

subroutine mpi_memory_gbl::mpi_memory_deallocate_real_2dim_wp_alc ( real(wp), dimension(:,:), intent(inout), allocatable  array,
integer, intent(in)  nelem,
integer, intent(in)  window,
integer(mpiint), intent(in), optional  comm 
)

Deallocate 2D allocatable real(wp) array.

Author
Z Masin
Date
2017

◆ mpi_memory_deallocate_real_2dim_wp_ptr()

subroutine mpi_memory_gbl::mpi_memory_deallocate_real_2dim_wp_ptr ( real(wp), dimension(:,:), intent(inout), pointer  array,
integer, intent(in)  nelem,
integer, intent(in)  window,
integer(mpiint), intent(in), optional  comm 
)

Deallocate 2D shared MPI real(wp) array pointer.

Author
Z Masin
Date
2017
Here is the call graph for this function:

◆ mpi_memory_deallocate_real_ep_alc()

subroutine mpi_memory_gbl::mpi_memory_deallocate_real_ep_alc ( real(ep), dimension(:), intent(inout), allocatable  array,
integer, intent(in)  nelem,
integer, intent(in)  window,
integer(mpiint), intent(in), optional  comm 
)

Deallocate 1D allocatable real(wp) array.

Author
Z Masin
Date
2017

◆ mpi_memory_deallocate_real_ep_ptr()

subroutine mpi_memory_gbl::mpi_memory_deallocate_real_ep_ptr ( real(ep), dimension(:), intent(inout), pointer  array,
integer, intent(in)  nelem,
integer, intent(in)  window,
integer(mpiint), intent(in), optional  comm 
)

Deallocate 1D shared MPI real(ep) array pointer.

Author
Z Masin
Date
2017
Here is the call graph for this function:

◆ mpi_memory_deallocate_real_wp_alc()

subroutine mpi_memory_gbl::mpi_memory_deallocate_real_wp_alc ( real(wp), dimension(:), intent(inout), allocatable  array,
integer, intent(in)  nelem,
integer, intent(in)  window,
integer(mpiint), intent(in), optional  comm 
)

Deallocate 1D allocatable real(wp) array.

Author
Z Masin
Date
2017

◆ mpi_memory_deallocate_real_wp_ptr()

subroutine mpi_memory_gbl::mpi_memory_deallocate_real_wp_ptr ( real(wp), dimension(:), intent(inout), pointer  array,
integer, intent(in)  nelem,
integer, intent(in)  window,
integer(mpiint), intent(in), optional  comm 
)

Deallocate 1D shared MPI real(wp) array pointer.

Author
Z Masin
Date
2017
Here is the call graph for this function:

◆ mpi_memory_setup()

subroutine mpi_memory_gbl::mpi_memory_setup

Dummy initialization routine.

Author
Z Masin
Date
2017

Has no effect at the moment.

◆ mpi_memory_synchronize()

subroutine mpi_memory_gbl::mpi_memory_synchronize ( integer, intent(in)  window,
integer(mpiint), intent(in), optional  comm 
)

MPI shared memory barrier.

Author
Z Masin, J Benda
Date
2017 - 2019

If the sub-group communicator 'comm' is not given, then the memory will be synchronized on 'shared_communicator', which is set up by mpi_mod.

◆ mpi_memory_win_free()

subroutine mpi_memory_gbl::mpi_memory_win_free ( integer, intent(in)  window,
integer(mpiint), intent(inout)  ierror 
)

MPI shared memory deallocation.

Author
Z Masin, J Benda
Date
2017 - 2019

Variable Documentation

◆ local_master

integer(kind=mpiint), parameter mpi_memory_gbl::local_master = 0