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: [Patch, Fortran] Add STAT_STOPPED_IMAGE to SYNC ALL / SYNC IMAGES


Hi Daniel,

Daniel Carrera wrote:
I agree, except that I don't know what va_{list,start,end} do. But other than that, I agree that a "runtime_error" function would be good.

See http://en.wikipedia.org/wiki/Stdarg.h


As a side effect, it fixes the potentially wrong wording of
"ERROR: Image %d is stopped", caf_this_image
While that's currently the case, when moving to a true multi-image
implementation, the stopped image is usually not the current image but
some other remote image.

I'm probably confused. I was thinking that caf_is_finalized would only be 1 if the current image has stopped, in which case, the error would be correct. Am I wrong?

Well, that's definitely the case with the current code. But for a truly multi-image code, I would expect that a finalizing image tells the other images that it is about to close down - before it enters the message processing loop, waiting for the other images to confirm that it can stop now (and meanwhile processing remote requests).


Thus, a finalizing image can still process all requests, but it won't be able to participate in any collective action such as SYNC ALL or ALLOCATE/DEALLOCATE, which have to be executed on all images.

While it is not impossible that one calls allocate/deallocate/sync when the *current* image is already stopped, it is difficult to do so in practice as the finalize function is automatically only called for STOP or when the main program ends - and it is difficult to do something afterwards. (One way is mult-language programming, where one manually calls finalize.)

On the other hand, the case that a remote image stopped can happen much easier - though it should be most of the time (always?) a programming bug of the user.

Tobias

PS: For the final patch, please remember to CC gcc-patches@


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