3 ! From the HPCTools Group of University of Houston
5 ! For a coindexed object, its cosubscript list determines the image
6 ! index in the same way that a subscript list determines the subscript
7 ! order value for an array element
9 ! Run at least with 3 images for the normal checking code
10 ! Modified to also accept a single or two images
11 program cosubscript_test
14 integer, parameter :: X
= 3, Y
= 2
15 integer, parameter :: P
= 1, Q
= -1
19 integer :: scalar
[0:P
, -1:Q
, *]
21 integer :: dim3_max
, counter
27 dim3_max
= num_images() / ( (P
+1)*(Q
+2) )
31 if (num_images() == 1) then
35 if (scalar
[i
,j
,k
] /= this_image()) STOP 1
37 else if (num_images() == 2) then
43 if (counter
/= scalar
[i
,j
,k
]) STOP 1
48 ! ******* SCALAR ***********
54 if (counter
/= scalar
[i
,j
,k
]) then
55 print * , "Error in cosubscript translation scalar"
56 print * , "[", i
,",",j
,",",k
,"] = ",scalar
[i
,j
,k
],"/=",counter
66 end program cosubscript_test