On 2021/7/23 7:01 PM, Tobias Burnus wrote:
I personally prefer having:
int initial_dev;
and inside 'omp target' (with 'map(from:initial_dev)'):
initial_device = omp_is_initial_device();
Then the check would be:
if (initial_device && host_device_num != device_num)
abort();
i
On 23.07.21 12:21, Chung-Lin Tang wrote:
Inside offloaded regions, the preferred way to should be that the device
already has this information initialized (once) when the device is
initialized.
And the function merely returns the stored value.
...
+++ b/libgomp/testsuite/libgomp.c-c++-common/ta
On Fri, Jul 23, 2021 at 06:21:41PM +0800, Chung-Lin Tang wrote:
> --- a/libgomp/icv-device.c
> +++ b/libgomp/icv-device.c
> @@ -61,8 +61,17 @@ omp_is_initial_device (void)
>return 1;
> }
>
> +int
> +omp_get_device_num (void)
> +{
> + /* By specification, this is equivalent to omp_get_initia