4 integer, allocatable
:: A
[:], B
[:,:]
7 if (allocated (a
)) call abort ()
8 if (allocated (b
)) call abort ()
12 if (a
[this_image ()] /= 5 + this_image ()) call abort
14 a
[this_image ()] = 8 - 2*this_image ()
15 if (a
[this_image ()] /= 8 - 2*this_image ()) call abort
17 if (lcobound(a
, dim
=1) /= 1 .or
. ucobound(a
,dim
=1) /= num_images()) &
22 a
[this_image ()] = 8 - 2*this_image ()
24 if (lcobound(a
, dim
=1) /= 4 .or
. ucobound(a
,dim
=1) /= 3 + num_images()) &
30 allocate (B
[n1
:n2
, n3
:*])
31 if (any (lcobound(b
) /= [-1, 3]) .or
. lcobound(B
, dim
=2) /= n3
) &
35 if (allocated (a
)) call abort ()
36 if (.not
.allocated (b
)) call abort ()
41 ! automatically deallocate "B"
44 integer, allocatable
:: x
[:], y
[:,:]
46 if (any (lcobound(y
) /= [-1, 3]) .or
. lcobound(y
, dim
=2) /= n3
) &
48 if (lcobound(x
, dim
=1) /= 4 .or
. ucobound(x
,dim
=1) /= 3 + num_images()) &
50 if (x
[this_image ()] /= 8 - 2*this_image ()) call abort
55 logical, intent(in
) :: init
56 integer, allocatable
, SAVE :: a
[:]
59 if (allocated(a
)) call abort()
63 if (.not
. allocated(a
)) call abort()
64 if (a
/= 45) call abort()