Deallocates special parallel memory
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
complex(kind=real_4), | DIMENSION(:), POINTER, CONTIGUOUS | :: | DATA |
pointer to special memory to deallocate |
||
integer, | intent(out), | optional | :: | stat |
SUBROUTINE mp_deallocate_c (DATA, stat)
!! Deallocates special parallel memory
COMPLEX(kind=real_4), DIMENSION(:), POINTER, CONTIGUOUS :: DATA
!! pointer to special memory to deallocate
INTEGER, INTENT(OUT), OPTIONAL :: stat
CHARACTER(LEN=*), PARAMETER :: routineN = 'mp_deallocate_c'
INTEGER :: ierr, handle
CALL timeset(routineN, handle)
ierr = 0
#if defined(__parallel)
CALL mp_free_mem(DATA, ierr)
IF (PRESENT(stat)) THEN
stat = ierr
ELSE
IF (ierr /= 0) CALL mp_stop(ierr, "mpi_free_mem @ "//routineN)
END IF
NULLIFY (DATA)
#else
DEALLOCATE (DATA)
IF (PRESENT(stat)) stat = 0
#endif
CALL timestop(handle)
END SUBROUTINE mp_deallocate_c