mirror of
https://github.com/cp2k/cp2k.git
synced 2026-07-27 05:35:28 -04:00
DBCSR-Tensor: Make consistent release of the MPI comm within the DBCSR library
svn-origin-rev: 18587
This commit is contained in:
parent
52242e0084
commit
400f96bdbb
3 changed files with 17 additions and 3 deletions
|
|
@ -30,6 +30,7 @@ MODULE dbcsr_tensor_api
|
|||
dbcsr_t_distribution_new,&
|
||||
dbcsr_t_distribution_type,&
|
||||
dbcsr_t_nd_mp_comm,&
|
||||
dbcsr_t_nd_mp_free,&
|
||||
dbcsr_t_type
|
||||
|
||||
IMPLICIT NONE
|
||||
|
|
@ -49,6 +50,7 @@ MODULE dbcsr_tensor_api
|
|||
PUBLIC :: dbcsr_t_distribution_new
|
||||
PUBLIC :: dbcsr_t_distribution_type
|
||||
PUBLIC :: dbcsr_t_nd_mp_comm
|
||||
PUBLIC :: dbcsr_t_nd_mp_free
|
||||
PUBLIC :: dbcsr_t_type
|
||||
PUBLIC :: dbcsr_t_iterator_next_block
|
||||
PUBLIC :: dbcsr_t_iterator_blocks_left
|
||||
|
|
|
|||
|
|
@ -54,6 +54,7 @@ MODULE dbcsr_tensor_types
|
|||
dbcsr_t_distribution_type, &
|
||||
dbcsr_t_get_data_type, &
|
||||
dbcsr_t_nd_mp_comm, &
|
||||
dbcsr_t_nd_mp_free, &
|
||||
dbcsr_t_type, &
|
||||
dims_tensor, &
|
||||
ndims_tensor, &
|
||||
|
|
@ -129,6 +130,16 @@ CONTAINS
|
|||
|
||||
END FUNCTION
|
||||
|
||||
! **************************************************************************************************
|
||||
!> \brief Release the MPI communicator.
|
||||
!>
|
||||
! **************************************************************************************************
|
||||
SUBROUTINE dbcsr_t_nd_mp_free(mp_comm)
|
||||
INTEGER, INTENT(INOUT) :: mp_comm
|
||||
|
||||
CALL mp_comm_free(mp_comm)
|
||||
END SUBROUTINE dbcsr_t_nd_mp_free
|
||||
|
||||
! **************************************************************************************************
|
||||
!> \brief Create a tensor distribution.
|
||||
!>
|
||||
|
|
|
|||
|
|
@ -69,7 +69,8 @@ MODULE mp2_ri_gpw
|
|||
dbcsr_t_distribution_new, dbcsr_t_distribution_type, dbcsr_t_get_block, &
|
||||
dbcsr_t_get_stored_coordinates, dbcsr_t_iterator_blocks_left, dbcsr_t_iterator_next_block, &
|
||||
dbcsr_t_iterator_start, dbcsr_t_iterator_stop, dbcsr_t_iterator_type, dbcsr_t_nd_mp_comm, &
|
||||
dbcsr_t_put_block, dbcsr_t_reserve_blocks, dbcsr_t_split_blocks, dbcsr_t_type
|
||||
dbcsr_t_nd_mp_free, dbcsr_t_put_block, dbcsr_t_reserve_blocks, dbcsr_t_split_blocks, &
|
||||
dbcsr_t_type
|
||||
USE gaussian_gridlevels, ONLY: gaussian_gridlevel
|
||||
USE input_constants, ONLY: do_eri_gpw,&
|
||||
do_eri_mme,&
|
||||
|
|
@ -1151,8 +1152,8 @@ CONTAINS
|
|||
CALL dbcsr_t_distribution_destroy(dist_B)
|
||||
CALL dbcsr_t_distribution_destroy(dist_L)
|
||||
|
||||
CALL mp_comm_free(mp_comm_B)
|
||||
CALL mp_comm_free(mp_comm_L)
|
||||
CALL dbcsr_t_nd_mp_free(mp_comm_B)
|
||||
CALL dbcsr_t_nd_mp_free(mp_comm_L)
|
||||
|
||||
END SUBROUTINE
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue