You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In your real code, you are allocating your arrays forcing indexing to start at (0,0) and end at (n-1,m-1). Therefore using the shape indicated above fails to cover the whole array (check your compiling -Minfo). Therefore, you may consider to use A(:,:), Anew(:,:) in your notes. (You are already using :,: in the real code.) Or, even better, modify your indexing in the creation of your arrays to comply with natural fortran indexing starting from (1,1).
Now a suggestion:
I suggest you to keep using the same size of Arrays as in the original example:
First Typo
In the block showing syntax for copying many arrays at once, you are using "c" syntax:
while it should be
Second Typo (together with a bug)
In the update section, you use twice:
!acc data copyin( A(n,m), Anew(n,m))
and once:
While it should be:
!$acc data copyin( A(n,m), Anew(n,m)) . . . !$acc update self(A(n,m))
Now the bug:
In your real code, you are allocating your arrays forcing indexing to start at (0,0) and end at (n-1,m-1). Therefore using the shape indicated above fails to cover the whole array (check your compiling -Minfo). Therefore, you may consider to use
A(:,:), Anew(:,:)
in your notes. (You are already using :,: in the real code.) Or, even better, modify your indexing in the creation of your arrays to comply with natural fortran indexing starting from (1,1).Now a suggestion:
I suggest you to keep using the same size of Arrays as in the original example:
so that we can compare timings and performance.
And just print a partial size of the total array:
The text was updated successfully, but these errors were encountered: