Checks for successful (de)allocation. Stops the code.
Use this after an allocate/deallocate statement allocate(x(nz,ny,nx), stat=istat); call mErr(istat,'x',1) deallocate(x, stat=istat); call mErr(istat,'x',2)
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| integer(kind=i32), | intent(in) | :: | istat | results of stat=istat in (de)allocate |
||
| character(len=*), | intent(in) | :: | aMsg | Message associated with the (de)allocate |
||
| integer(kind=i32), | intent(in) | :: | alloc | 1 = allocate, 2 = deallocate |
||
| integer(kind=i32), | intent(in), | optional | :: | iunit | Optional file id to write the message to |
Nodes of different colours represent the following:
Solid arrows point from a procedure to one which it calls. Dashed arrows point from an interface to procedures which implement that interface. This could include the module procedures in a generic interface or the implementation in a submodule of an interface in a parent module.