Skip to content

Conversation

@hahnjo
Copy link
Contributor

@hahnjo hahnjo commented Jul 15, 2015

This corner case may occur in benchmarks that want to measure data movement.

I didn't know how to implement a test case for the global initializer, but I could verify with a simple program:

int main(int argc, char* argv[])
{
        int a = 0;
        #pragma omp target data map(a)
        {
        }

        return 0;
}

This corner case may occur in benchmarks that want to measure data movement.
@sfantao
Copy link

sfantao commented Jul 28, 2015

Hi hahnjo,

Thanks for the patch! However, I don't think we should do a registration for this case. Avoiding a registrations is something we should always do, as long as we provide the right functionality. If a user is interested in measuring data movements he should do something like:

int a;
#pragma omp target data map(alloc:a)
{
  // start timer
  #pragma omp target update to(a)
  // stop timer

  #pragma omp target 
  {} 
}

Regards,
Samuel

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants