This is the mail archive of the fortran@gcc.gnu.org mailing list for the GNU Fortran 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: First Patch


On 06/09/2011 08:04 PM, Tobias Burnus wrote:
   if (count > 0)
     {
       fprintf (stderr, "COARRAY ERROR: SYNC IMAGES not yet implemented");
       error_stop (1);
     }

Frankly, I do not understand that failure. The SYNC IMAGES(1) is executed on image 1 ("MPI_ABORT was invoked on rank 0") and before the code above is executed,

I think I understand the problem. We have:



if (count == 0 || (count == 1 && images[0] == caf_this_image)) *stat = 0; ... if (count > 0) { fprintf (stderr, "COARRAY ERROR: SYNC IMAGES not yet implemented"); error_stop (1); }


Clearly, if count==1 and images[0]==caf_this_image, what this program will do is first set *stat=0 and then go on to give an error. Perhaps what we really want to do is:



... if (count == 0 || (count == 1 && images[0] == caf_this_image)) *stat = 0; else if (count > 0) { fprintf (stderr, "COARRAY ERROR: SYNC IMAGES not yet implemented"); error_stop (1); }


So the "if (count > 0)" is only triggered if we are not in the trivial case where "SYNC IMAGES(1)" and we are image 1.


The reason for the failure is probably the same: A missing
gfc_build_addr_expr for imageset ...

I added gfc_build_addr_expr for the imageset but that didn't make the error go away. I'm new here but I suspect that we need the "else if" that I suggested above.


Daniel.
--
I'm not overweight, I'm undertall.


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