Deallocates special parallel memory
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
real(kind=real_4), | DIMENSION(:), POINTER, CONTIGUOUS | :: | DATA |
pointer to special memory to deallocate |
||
integer, | intent(out), | optional | :: | stat |
SUBROUTINE mp_deallocate_r (DATA, stat) !! Deallocates special parallel memory REAL(kind=real_4), DIMENSION(:), POINTER, CONTIGUOUS :: DATA !! pointer to special memory to deallocate INTEGER, INTENT(OUT), OPTIONAL :: stat CHARACTER(LEN=*), PARAMETER :: routineN = 'mp_deallocate_r' 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_r