assign_allocatable_R16P_7D Subroutine

private subroutine assign_allocatable_R16P_7D(lhs, rhs, msg, verbose)

Assign CPU variable with memory checking (kind R16P, rank 7). Variable is returned not allocated if right hand side is not allocated.

 use penf
 real(R16P), allocatable :: a(:,:,:,:,:,:,:), b(:,:,:,:,:,:,:)
 allocate(b(1:1,1:2,1:3,1:4,1:5,1:6,1:7))
 call assign_allocatable(a, b)
 print*, allocated(a)

Arguments

Type IntentOptional Attributes Name
real(kind=R16P), intent(inout), allocatable :: lhs(:,:,:,:,:,:,:)

Left hand side of assignement.

real(kind=R16P), intent(in), allocatable :: rhs(:,:,:,:,:,:,:)

Right hand side of assignement.

character(len=*), intent(in), optional :: msg

Message to be printed in verbose mode.

logical, intent(in), optional :: verbose

Flag to activate verbose mode.


Calls

proc~~assign_allocatable_r16p_7d~~CallsGraph proc~assign_allocatable_r16p_7d assign_allocatable_R16P_7D interface~allocate_variable allocate_variable proc~assign_allocatable_r16p_7d->interface~allocate_variable proc~alloc_var_i1p_1d alloc_var_I1P_1D interface~allocate_variable->proc~alloc_var_i1p_1d proc~alloc_var_i1p_2d alloc_var_I1P_2D interface~allocate_variable->proc~alloc_var_i1p_2d proc~alloc_var_i1p_3d alloc_var_I1P_3D interface~allocate_variable->proc~alloc_var_i1p_3d proc~alloc_var_i1p_4d alloc_var_I1P_4D interface~allocate_variable->proc~alloc_var_i1p_4d proc~alloc_var_i1p_5d alloc_var_I1P_5D interface~allocate_variable->proc~alloc_var_i1p_5d proc~alloc_var_i1p_6d alloc_var_I1P_6D interface~allocate_variable->proc~alloc_var_i1p_6d proc~alloc_var_i1p_7d alloc_var_I1P_7D interface~allocate_variable->proc~alloc_var_i1p_7d proc~alloc_var_i2p_1d alloc_var_I2P_1D interface~allocate_variable->proc~alloc_var_i2p_1d proc~alloc_var_i2p_2d alloc_var_I2P_2D interface~allocate_variable->proc~alloc_var_i2p_2d proc~alloc_var_i2p_3d alloc_var_I2P_3D interface~allocate_variable->proc~alloc_var_i2p_3d proc~alloc_var_i2p_4d alloc_var_I2P_4D interface~allocate_variable->proc~alloc_var_i2p_4d proc~alloc_var_i2p_5d alloc_var_I2P_5D interface~allocate_variable->proc~alloc_var_i2p_5d proc~alloc_var_i2p_6d alloc_var_I2P_6D interface~allocate_variable->proc~alloc_var_i2p_6d proc~alloc_var_i2p_7d alloc_var_I2P_7D interface~allocate_variable->proc~alloc_var_i2p_7d proc~alloc_var_i4p_1d alloc_var_I4P_1D interface~allocate_variable->proc~alloc_var_i4p_1d proc~alloc_var_i4p_2d alloc_var_I4P_2D interface~allocate_variable->proc~alloc_var_i4p_2d proc~alloc_var_i4p_3d alloc_var_I4P_3D interface~allocate_variable->proc~alloc_var_i4p_3d proc~alloc_var_i4p_4d alloc_var_I4P_4D interface~allocate_variable->proc~alloc_var_i4p_4d proc~alloc_var_i4p_5d alloc_var_I4P_5D interface~allocate_variable->proc~alloc_var_i4p_5d proc~alloc_var_i4p_6d alloc_var_I4P_6D interface~allocate_variable->proc~alloc_var_i4p_6d proc~alloc_var_i4p_7d alloc_var_I4P_7D interface~allocate_variable->proc~alloc_var_i4p_7d proc~alloc_var_i8p_1d alloc_var_I8P_1D interface~allocate_variable->proc~alloc_var_i8p_1d proc~alloc_var_i8p_2d alloc_var_I8P_2D interface~allocate_variable->proc~alloc_var_i8p_2d proc~alloc_var_i8p_3d alloc_var_I8P_3D interface~allocate_variable->proc~alloc_var_i8p_3d proc~alloc_var_i8p_4d alloc_var_I8P_4D interface~allocate_variable->proc~alloc_var_i8p_4d proc~alloc_var_i8p_5d alloc_var_I8P_5D interface~allocate_variable->proc~alloc_var_i8p_5d proc~alloc_var_i8p_6d alloc_var_I8P_6D interface~allocate_variable->proc~alloc_var_i8p_6d proc~alloc_var_i8p_7d alloc_var_I8P_7D interface~allocate_variable->proc~alloc_var_i8p_7d proc~alloc_var_r4p_1d alloc_var_R4P_1D interface~allocate_variable->proc~alloc_var_r4p_1d proc~alloc_var_r4p_2d alloc_var_R4P_2D interface~allocate_variable->proc~alloc_var_r4p_2d proc~alloc_var_r4p_3d alloc_var_R4P_3D interface~allocate_variable->proc~alloc_var_r4p_3d proc~alloc_var_r4p_4d alloc_var_R4P_4D interface~allocate_variable->proc~alloc_var_r4p_4d proc~alloc_var_r4p_5d alloc_var_R4P_5D interface~allocate_variable->proc~alloc_var_r4p_5d proc~alloc_var_r4p_6d alloc_var_R4P_6D interface~allocate_variable->proc~alloc_var_r4p_6d proc~alloc_var_r4p_7d alloc_var_R4P_7D interface~allocate_variable->proc~alloc_var_r4p_7d proc~alloc_var_r8p_1d alloc_var_R8P_1D interface~allocate_variable->proc~alloc_var_r8p_1d proc~alloc_var_r8p_2d alloc_var_R8P_2D interface~allocate_variable->proc~alloc_var_r8p_2d proc~alloc_var_r8p_3d alloc_var_R8P_3D interface~allocate_variable->proc~alloc_var_r8p_3d proc~alloc_var_r8p_4d alloc_var_R8P_4D interface~allocate_variable->proc~alloc_var_r8p_4d proc~alloc_var_r8p_5d alloc_var_R8P_5D interface~allocate_variable->proc~alloc_var_r8p_5d proc~alloc_var_r8p_6d alloc_var_R8P_6D interface~allocate_variable->proc~alloc_var_r8p_6d proc~alloc_var_r8p_7d alloc_var_R8P_7D interface~allocate_variable->proc~alloc_var_r8p_7d interface~str str proc~alloc_var_i1p_1d->interface~str proc~get_memory_info get_memory_info proc~alloc_var_i1p_1d->proc~get_memory_info proc~alloc_var_i1p_2d->interface~str proc~alloc_var_i1p_2d->proc~get_memory_info proc~alloc_var_i1p_3d->interface~str proc~alloc_var_i1p_3d->proc~get_memory_info proc~alloc_var_i1p_4d->interface~str proc~alloc_var_i1p_4d->proc~get_memory_info proc~alloc_var_i1p_5d->interface~str proc~alloc_var_i1p_5d->proc~get_memory_info proc~alloc_var_i1p_6d->interface~str proc~alloc_var_i1p_6d->proc~get_memory_info proc~alloc_var_i1p_7d->interface~str proc~alloc_var_i1p_7d->proc~get_memory_info proc~alloc_var_i2p_1d->interface~str proc~alloc_var_i2p_1d->proc~get_memory_info proc~alloc_var_i2p_2d->interface~str proc~alloc_var_i2p_2d->proc~get_memory_info proc~alloc_var_i2p_3d->interface~str proc~alloc_var_i2p_3d->proc~get_memory_info proc~alloc_var_i2p_4d->interface~str proc~alloc_var_i2p_4d->proc~get_memory_info proc~alloc_var_i2p_5d->interface~str proc~alloc_var_i2p_5d->proc~get_memory_info proc~alloc_var_i2p_6d->interface~str proc~alloc_var_i2p_6d->proc~get_memory_info proc~alloc_var_i2p_7d->interface~str proc~alloc_var_i2p_7d->proc~get_memory_info proc~alloc_var_i4p_1d->interface~str proc~alloc_var_i4p_1d->proc~get_memory_info proc~alloc_var_i4p_2d->interface~str proc~alloc_var_i4p_2d->proc~get_memory_info proc~alloc_var_i4p_3d->interface~str proc~alloc_var_i4p_3d->proc~get_memory_info proc~alloc_var_i4p_4d->interface~str proc~alloc_var_i4p_4d->proc~get_memory_info proc~alloc_var_i4p_5d->interface~str proc~alloc_var_i4p_5d->proc~get_memory_info proc~alloc_var_i4p_6d->interface~str proc~alloc_var_i4p_6d->proc~get_memory_info proc~alloc_var_i4p_7d->interface~str proc~alloc_var_i4p_7d->proc~get_memory_info proc~alloc_var_i8p_1d->interface~str proc~alloc_var_i8p_1d->proc~get_memory_info proc~alloc_var_i8p_2d->interface~str proc~alloc_var_i8p_2d->proc~get_memory_info proc~alloc_var_i8p_3d->interface~str proc~alloc_var_i8p_3d->proc~get_memory_info proc~alloc_var_i8p_4d->interface~str proc~alloc_var_i8p_4d->proc~get_memory_info proc~alloc_var_i8p_5d->interface~str proc~alloc_var_i8p_5d->proc~get_memory_info proc~alloc_var_i8p_6d->interface~str proc~alloc_var_i8p_6d->proc~get_memory_info proc~alloc_var_i8p_7d->interface~str proc~alloc_var_i8p_7d->proc~get_memory_info proc~alloc_var_r4p_1d->interface~str proc~alloc_var_r4p_1d->proc~get_memory_info proc~alloc_var_r4p_2d->interface~str proc~alloc_var_r4p_2d->proc~get_memory_info proc~alloc_var_r4p_3d->interface~str proc~alloc_var_r4p_3d->proc~get_memory_info proc~alloc_var_r4p_4d->interface~str proc~alloc_var_r4p_4d->proc~get_memory_info proc~alloc_var_r4p_5d->interface~str proc~alloc_var_r4p_5d->proc~get_memory_info proc~alloc_var_r4p_6d->interface~str proc~alloc_var_r4p_6d->proc~get_memory_info proc~alloc_var_r4p_7d->interface~str proc~alloc_var_r4p_7d->proc~get_memory_info proc~alloc_var_r8p_1d->interface~str proc~alloc_var_r8p_1d->proc~get_memory_info proc~alloc_var_r8p_2d->interface~str proc~alloc_var_r8p_2d->proc~get_memory_info proc~alloc_var_r8p_3d->interface~str proc~alloc_var_r8p_3d->proc~get_memory_info proc~alloc_var_r8p_4d->interface~str proc~alloc_var_r8p_4d->proc~get_memory_info proc~alloc_var_r8p_5d->interface~str proc~alloc_var_r8p_5d->proc~get_memory_info proc~alloc_var_r8p_6d->interface~str proc~alloc_var_r8p_6d->proc~get_memory_info proc~alloc_var_r8p_7d->interface~str proc~alloc_var_r8p_7d->proc~get_memory_info proc~str_a_i1p str_a_I1P interface~str->proc~str_a_i1p proc~str_a_i2p str_a_I2P interface~str->proc~str_a_i2p proc~str_a_i4p str_a_I4P interface~str->proc~str_a_i4p proc~str_a_i8p str_a_I8P interface~str->proc~str_a_i8p proc~str_a_r4p str_a_R4P interface~str->proc~str_a_r4p proc~str_a_r8p str_a_R8P interface~str->proc~str_a_r8p proc~str_bol str_bol interface~str->proc~str_bol proc~str_i1p str_I1P interface~str->proc~str_i1p proc~str_i2p str_I2P interface~str->proc~str_i2p proc~str_i4p str_I4P interface~str->proc~str_i4p proc~str_i8p str_I8P interface~str->proc~str_i8p proc~str_r4p str_R4P interface~str->proc~str_r4p proc~str_r8p str_R8P interface~str->proc~str_r8p proc~strf_i1p strf_I1P interface~str->proc~strf_i1p proc~strf_i2p strf_I2P interface~str->proc~strf_i2p proc~strf_i4p strf_I4P interface~str->proc~strf_i4p proc~strf_i8p strf_I8P interface~str->proc~strf_i8p proc~strf_r4p strf_R4P interface~str->proc~strf_r4p proc~strf_r8p strf_R8P interface~str->proc~strf_r8p interface~cton cton proc~get_memory_info->interface~cton proc~ctoi_i1p ctoi_I1P interface~cton->proc~ctoi_i1p proc~ctoi_i2p ctoi_I2P interface~cton->proc~ctoi_i2p proc~ctoi_i4p ctoi_I4P interface~cton->proc~ctoi_i4p proc~ctoi_i8p ctoi_I8P interface~cton->proc~ctoi_i8p proc~ctor_r4p ctor_R4P interface~cton->proc~ctor_r4p proc~ctor_r8p ctor_R8P interface~cton->proc~ctor_r8p proc~str_a_i1p->proc~str_i1p proc~str_a_i2p->proc~str_i2p proc~str_a_i4p->proc~str_i4p proc~str_a_i8p->proc~str_i8p proc~str_a_r4p->proc~str_r4p proc~str_a_r8p->proc~str_r8p proc~compact_real_string compact_real_string proc~str_r4p->proc~compact_real_string proc~str_r8p->proc~compact_real_string

Source Code

   subroutine assign_allocatable_R16P_7D(lhs, rhs, msg, verbose)
   !< Assign CPU variable with memory checking (kind R16P, rank 7).
   !< Variable is returned not allocated if right hand side is not allocated.
   !<
   !<```fortran
   !< use penf
   !< real(R16P), allocatable :: a(:,:,:,:,:,:,:), b(:,:,:,:,:,:,:)
   !< allocate(b(1:1,1:2,1:3,1:4,1:5,1:6,1:7))
   !< call assign_allocatable(a, b)
   !< print*, allocated(a)
   !<```
   !=> T <<<
   real(R16P), allocatable, intent(inout)        :: lhs(:,:,:,:,:,:,:) !< Left hand side of assignement.
   real(R16P), allocatable, intent(in)           :: rhs(:,:,:,:,:,:,:) !< Right hand side of assignement.
   character(*),            intent(in), optional :: msg                !< Message to be printed in verbose mode.
   logical,                 intent(in), optional :: verbose            !< Flag to activate verbose mode.

   if (allocated(lhs)) deallocate(lhs)
   if (allocated(rhs)) then
      if (size(rhs,dim=1)*size(rhs,dim=2)*size(rhs,dim=3)*size(rhs,dim=4)*size(rhs,dim=5)*size(rhs,dim=6)*size(rhs,dim=7)>0) then
         call allocate_variable(var=lhs,                                                  &
                                ulb=reshape([lbound(rhs,dim=1),ubound(rhs,dim=1),         &
                                             lbound(rhs,dim=2),ubound(rhs,dim=2),         &
                                             lbound(rhs,dim=3),ubound(rhs,dim=3),         &
                                             lbound(rhs,dim=4),ubound(rhs,dim=4),         &
                                             lbound(rhs,dim=5),ubound(rhs,dim=5),         &
                                             lbound(rhs,dim=6),ubound(rhs,dim=6),         &
                                             lbound(rhs,dim=7),ubound(rhs,dim=7)],[2,7]), &
                                msg=msg, verbose=verbose)
         lhs = rhs
      endif
   endif
   endsubroutine assign_allocatable_R16P_7D