Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8704939
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 13, 20262026-06-13T03:14:03+00:00 2026-06-13T03:14:03+00:00

I have a 2D matrix SIZE x SIZE, which I’m trying to copy to

  • 0

I have a 2D matrix SIZE x SIZE, which I’m trying to copy to the GPU.

I allocate the matrix this way:

#define SIZE 1024
float (*a)(SIZE) = (float(*)[SIZE]) malloc(SIZE * SIZE * sizeof(float));

And I have this on my ACC region:

void mmul_acc(restrict float a[][SIZE],
              restrict float b[][SIZE],
              restrict float c[][SIZE]) {
#pragma acc data copyin(a[0:SIZE][0:SIZE], b[0:SIZE][0:SIZE]) \
    copyout c[0:SIZE][0:SIZE])
{
  ... code here...
}

When compiling with the PGI compiler, using -Minfo=acc, the compiler tells me:

Generating copyin(a[0:1024][0:])

What does a[0:1024][0:] mean? Why not a[0:1024][0:1024] ???

If instead of declaring matrices I declare arrays with size SIZE*SIZE, doing

#pragma acc copyin(a[0:SIZE*SIZE])

Generates the following compiler message

Generating copyin(a[0:16777216])

The code actually works the same way, same performance, same result.

Apparently in both ways the compiler generates the same code, as it should be, but the message is not straightforward.

I’m using the PGI accelerator 12.8, in a Linux64 machine. I’m compiling with -Minfo=acc

Note: this question was edited and now it doesn’t really make much sense, but maybe it can useful to more people.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-13T03:14:04+00:00Added an answer on June 13, 2026 at 3:14 am

    This issue is fixed in latest PGI Compiler 12.9.0. The compiler now returns following messsage:

    Generating copyin(a[0:1024][0:1024])
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have this matrix of size 10000 by 1. I want to remove some
Hi I have the 3D matrix daily_renewables_excess which I am trying to plot a
I have a matrix (Data) which looks like this: (start) (stop) (strand) (gene number)
I have a 2d matrix which can be any size but always a square.
I have this matrix A of size 100x100. Now I have another vector Z=(1,24,5,80...)
I have to multiply a very small sized matrix ( size - 10x10 )
I have a matrix A consisting of 200 vectors of size d. I want
I have matrix (a) with (1:10),<10 x 1> double. I would like to copy
I have a matrix A which I want to convert into a data.frame of
I have a matrix of objects that contains data in this form: name A,2,name

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.