Hi Thomas,
On 10/15/19 3:07 PM, Thomas Schwinge wrote:
(Of cause, it is also run-time checkable
OK, I was about to ask for that, if that makes sense to do.
The question is for what. One could add it for run-time checking (e.g.
for gfortran "-fcheck=…). Or for actions like "omp update", which
permits strides/noncontiguous memory.
But for "omp update" with noncontiguous memory, it is not clear what's
faster:
* Simply updating one contiguous memory block, enclosing the gaps
* Doing multiple updates of contiguous memory to take advantage of
memory gaps.
Depending how large the gaps between the (contiguous) chunks are, one
method or the other is faster. Thus, I don't think we do need this any
time soon. At least for the OpenMP code I have seen, some additional
compile-time checks make more sense before adding a run-time check. [No
idea about the OpenACC FE code, yet.]
Is there any point in adding a test case for such constructs, in
particular, which the current code would've (erroneously) flagged
as"Noncontiguous deferred shape array", to codify/document that this
is supported?
My feeling is no – but if you think it makes sense. A simple example is
the following:
integer, target :: A(100)
integer, pointer :: ptr(:)
ptr => A
!$acc data copy(ptr)
ptr(1) = ptr(2)
!$acc end data
end
Before, it failed with:
4 | !$acc data copy(ptr)
| 1
Error: Noncontiguous deferred shape array ‘ptr’ in MAP clause at (1)
I will now commit it as is, i.e. without a test case. If needed, one can
still add it as additional commit.
Tobias