dbcsr_mp_release Subroutine

public subroutine dbcsr_mp_release(mp_env)

Releases and potentially destroys an mp_env

Arguments

TypeIntentOptionalAttributesName
type(dbcsr_mp_obj), intent(inout) :: mp_env

multiprocessor environment


Contents

Source Code


Source Code

   SUBROUTINE dbcsr_mp_release(mp_env)
      !! Releases and potentially destroys an mp_env

      TYPE(dbcsr_mp_obj), INTENT(INOUT)                  :: mp_env
         !! multiprocessor environment

!   ---------------------------------------------------------------------------

      IF (ASSOCIATED(mp_env%mp)) THEN
         mp_env%mp%refcount = mp_env%mp%refcount - 1
         IF (mp_env%mp%refcount .LE. 0) THEN
            CALL dbcsr_mp_grid_remove(mp_env)
            DEALLOCATE (mp_env%mp%pgrid)
            DEALLOCATE (mp_env%mp)
         END IF
      END IF
   END SUBROUTINE dbcsr_mp_release