dbcsr_mempool_create Subroutine

private subroutine dbcsr_mempool_create(pool)

Creates a memory pool.

Arguments

Type IntentOptional Attributes Name
type(dbcsr_mempool_type), POINTER :: pool

Source Code

   SUBROUTINE dbcsr_mempool_create(pool)
      !! Creates a memory pool.
      TYPE(dbcsr_mempool_type), POINTER                  :: pool

      IF (ASSOCIATED(pool)) DBCSR_ABORT("pool already allocated")
      ALLOCATE (pool)
!$    CALL OMP_INIT_LOCK(pool%lock)
      ALLOCATE (pool%root) !root always allocated, but unused. Simplifies looping.
   END SUBROUTINE dbcsr_mempool_create