Aleksandar Donev writes:
>
> Another compiler compiled well and gave the following result (which I
> believe is correct--and also shows that a copy overhead is generated if
> array pointers are used):
>
> Enter stride:
> 3
> A:
> -->Passing (1:2):
> 1.00000000 2.00000000 3.98816581E-34
> -->Passing Cray pointer:
> 1.00000000 2.00000000 3.00000000
> B:
> -->Passing (1:2):
> 1.00000000 3.00000000 3.98816581E-34
> -->Passing Cray pointer:
> 1.00000000 2.00000000 3.00000000
> C:
> -->Passing (1:2):
> 1.00000000 4.00000000 3.98816581E-34
> -->Passing Cray pointer:
> 1.00000000 2.00000000 3.00000000
A desirable compiler should produce this result:
Enter stride:
3
A:
-->Passing (1:2):
1., 2., 3. <------
-->Passing Cray pointer:
1., 2., 3.
B:
-->Passing (1:2):
1., 3., 0.E+0
-->Passing Cray pointer:
1., 2., 3.
C:
-->Passing (1:2):
1., 4., 0.E+0
-->Passing Cray pointer:
1., 2., 3.
where A%P(1:2) is not passed as a copy.
I was lucky!
Cheers,
Jing
--
________________________________ _-__-_-_ _-___---
Jing Guo, [log in to unmask], (301)614-6172(o), (301)614-6297(fx)
Data Assimilation Office, Code 910.3, NASA/GSFC, Greenbelt, MD 20771
|