On 22.09.2014 17:31, Tobias Burnus wrote:
In case of OpenACC, the OpenACC semantics require that the argument is contiguous. If users gets it wrong, it will be wrong either way: If the variable is not packed and when it is packed (and the temporary removed after the function call).
Post script: Actually, in some cases, the copy-in/copy-out using a temporary will actually work: Namely, if one only needs to transfer the memory once, such that the pointer address does not matter (e.g. only acc_copyin w/o later copyout or update). Thus, while copy-in/out with a temporary is bad, passing the unpacked array is worse as it will also use the wrong values in this special case. – That's another argument for using CONTIGUOUS also in the INTERFACE block.
Tobias