This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [Fortran-caf, patch, committed] Fix array support for CAF send, handle rank > 1 arrays


Tobias Burnus wrote:
Testing showed that the test case doesn't work with num_images() > 1. Fixed by the commit Rev. 209170.

I forgot two functions - now it looks as if it really works with multiple images :-)

Tobias
Index: gcc/testsuite/ChangeLog.fortran-caf
===================================================================
--- gcc/testsuite/ChangeLog.fortran-caf	(Revision 209173)
+++ gcc/testsuite/ChangeLog.fortran-caf	(Arbeitskopie)
@@ -1,3 +1,8 @@
+2014-04-07  Tobias Burnus  <burnus@net-b.de>
+
+	* gfortran.dg/coarray/send_array.f90: Really fix support
+	for num_images() > 1.
+
 2014-04-06  Tobias Burnus  <burnus@net-b.de>
 
 	* gfortran.dg/coarray/send_array.f90: Fix support
Index: gcc/testsuite/gfortran.dg/coarray/send_array.f90
===================================================================
--- gcc/testsuite/gfortran.dg/coarray/send_array.f90	(Revision 209173)
+++ gcc/testsuite/gfortran.dg/coarray/send_array.f90	(Arbeitskopie)
@@ -130,7 +130,7 @@ subroutine two()
   a(:,:) = b(lb1, lb2)
   sync all
   if (this_image() == 1) then
-    caf(:,:)[this_image()] = b(lb1, lb2)
+    caf(:,:)[num_images()] = b(lb1, lb2)
   end if
   sync all
   if (this_image() == num_images()) then
@@ -144,7 +144,7 @@ subroutine two()
   a(:,:) = b(:, :)
   sync all
   if (this_image() == 1) then
-    caf(:,:)[this_image()] = b(:, :)
+    caf(:,:)[num_images()] = b(:, :)
   end if
   sync all
   if (this_image() == num_images()) then
@@ -167,7 +167,8 @@ subroutine two()
                   a(i:i_e:i_s*i_sgn1, j:j_e:j_s*i_sgn2) = b(lb1, lb2)
                   sync all
                   if (this_image() == 1) then
-                    caf(i:i_e:i_s*i_sgn1, j:j_e:j_s*i_sgn2)[1] = b(lb1, lb2)
+                    caf(i:i_e:i_s*i_sgn1, j:j_e:j_s*i_sgn2)[num_images()] &
+                        = b(lb1, lb2)
                   end if
                   sync all
 
@@ -178,7 +179,7 @@ subroutine two()
                       = b(i:i_e:i_s*i_sgn1, j:j_e:j_s*i_sgn2)
                   sync all
                   if (this_image() == 1) then
-                    caf(i:i_e:i_s*i_sgn1, j:j_e:j_s*i_sgn2)[1] &
+                    caf(i:i_e:i_s*i_sgn1, j:j_e:j_s*i_sgn2)[num_images()] &
                         = b(i:i_e:i_s*i_sgn1, j:j_e:j_s*i_sgn2)
                   end if
                   sync all
@@ -222,7 +223,7 @@ subroutine three()
   a(:,:) = b(lb1, lb2)
   sync all
   if (this_image() == 1) then
-    caf(:,:)[this_image()] = b(lb1, lb2)
+    caf(:,:)[num_images()] = b(lb1, lb2)
   end if
   sync all
   if (this_image() == num_images()) then
@@ -236,7 +237,7 @@ subroutine three()
   a(:,:) = b(:, :)
   sync all
   if (this_image() == 1) then
-    caf(:,:)[this_image()] = b(:, :)
+    caf(:,:)[num_images()] = b(:, :)
   end if
   sync all
   if (this_image() == num_images()) then
@@ -259,7 +260,8 @@ subroutine three()
                   a(i:i_e:i_s*i_sgn1, j:j_e:j_s*i_sgn2) = b(lb1, lb2)
                   sync all
                   if (this_image() == 1) then
-                    caf(i:i_e:i_s*i_sgn1, j:j_e:j_s*i_sgn2)[1] = b(lb1, lb2)
+                    caf(i:i_e:i_s*i_sgn1, j:j_e:j_s*i_sgn2)[num_images()] &
+                        = b(lb1, lb2)
                   end if
                   sync all
 
@@ -270,7 +272,7 @@ subroutine three()
                       = b(i:i_e:i_s*i_sgn1, j:j_e:j_s*i_sgn2)
                   sync all
                   if (this_image() == 1) then
-                    caf(i:i_e:i_s*i_sgn1, j:j_e:j_s*i_sgn2)[1] &
+                    caf(i:i_e:i_s*i_sgn1, j:j_e:j_s*i_sgn2)[num_images()] &
                         = b(i:i_e:i_s*i_sgn1, j:j_e:j_s*i_sgn2)
                   end if
                   sync all

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]