Deallocate memory contained in mempools
SUBROUTINE dbcsr_multiply_clear_mempools()
!! Deallocate memory contained in mempools
INTEGER :: ithread
ithread = 0
!$ ithread = omp_get_thread_num()
! Each thread has its own working-matrix and its own mempool
IF (ASSOCIATED(memtype_product_wm(ithread)%p%pool)) &
CALL dbcsr_mempool_clear(memtype_product_wm(ithread)%p%pool)
!$OMP MASTER
IF (ASSOCIATED(memtype_trsbuffer_1%pool)) &
CALL dbcsr_mempool_clear(memtype_trsbuffer_1%pool)
IF (ASSOCIATED(memtype_trsbuffer_2%pool)) &
CALL dbcsr_mempool_clear(memtype_trsbuffer_2%pool)
IF (ASSOCIATED(memtype_abpanel_1%pool)) &
CALL dbcsr_mempool_clear(memtype_abpanel_1%pool)
IF (ASSOCIATED(memtype_abpanel_2%pool)) &
CALL dbcsr_mempool_clear(memtype_abpanel_2%pool)
!$OMP END MASTER
END SUBROUTINE dbcsr_multiply_clear_mempools